Hongtae Kim hace 5 años
padre
commit
a2fa0452b2
Se han modificado 1 ficheros con 15 adiciones y 3 borrados
  1. 15
    3
      Samples/ComputeShader/ComputeShader.cpp

+ 15
- 3
Samples/ComputeShader/ComputeShader.cpp Ver fichero

@@ -230,9 +230,21 @@ public:
230 230
     {
231 231
         // Device and Queue Preperation
232 232
         DKObject<DKGraphicsDevice> device = DKGraphicsDevice::SharedInstance();
233
-        DKObject<DKCommandQueue> graphicsQueue = device->CreateCommandQueue(DKCommandQueue::Graphics| DKCommandQueue::Compute);
234
-        //DKObject<DKCommandQueue> computeQueue = device->CreateCommandQueue(DKCommandQueue::Compute);
235
-        DKObject<DKCommandQueue> computeQueue = graphicsQueue;
233
+
234
+        DKObject<DKCommandQueue> graphicsQueue;
235
+        DKObject<DKCommandQueue> computeQueue;
236
+
237
+        bool useSingleQueue = false;
238
+        if (useSingleQueue)
239
+        {
240
+            graphicsQueue = device->CreateCommandQueue(DKCommandQueue::Graphics | DKCommandQueue::Compute);
241
+            computeQueue = graphicsQueue;
242
+        }
243
+        else
244
+        {
245
+            graphicsQueue = device->CreateCommandQueue(DKCommandQueue::Graphics);
246
+            computeQueue = device->CreateCommandQueue(DKCommandQueue::Compute);
247
+        }
236 248
 
237 249
         // Geometry Initialzie
238 250
         quad->InitializeGpuResource(graphicsQueue);