Browse Source

no message

Hongtae Kim 5 years ago
parent
commit
a2fa0452b2
1 changed files with 15 additions and 3 deletions
  1. 15
    3
      Samples/ComputeShader/ComputeShader.cpp

+ 15
- 3
Samples/ComputeShader/ComputeShader.cpp View File

230
     {
230
     {
231
         // Device and Queue Preperation
231
         // Device and Queue Preperation
232
         DKObject<DKGraphicsDevice> device = DKGraphicsDevice::SharedInstance();
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
         // Geometry Initialzie
249
         // Geometry Initialzie
238
         quad->InitializeGpuResource(graphicsQueue);
250
         quad->InitializeGpuResource(graphicsQueue);