@@ -21,6 +21,7 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
21
21
using device_base_t = application_templates::BasicMultiQueueApplication;
22
22
using asset_base_t = application_templates::MonoAssetManagerAndBuiltinResourceApplication;
23
23
24
+ // TODO: would be cool if we used `system::ISystem::listItemsInDirectory(sharedInputCWD/"GLI")` as our dataset
24
25
static constexpr std::array imagesToLoad = {
25
26
" ../app_resources/test0.png" ,
26
27
" ../app_resources/test1.png" ,
@@ -54,7 +55,6 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
54
55
m_histogramSavedSemaphore = m_device->createSemaphore (TIMELINE_SEMAPHORE_STARTING_VALUE);
55
56
56
57
// TODO: create/initialize array of atomic pointers to IGPUImage* and IGPUBuffer* to hold results
57
- // no need i think
58
58
59
59
std::thread loadImagesThread (&StagingAndMultipleQueuesApp::loadImages, this );
60
60
std::thread saveHistogramsThread (&StagingAndMultipleQueuesApp::saveHistograms, this );
@@ -212,7 +212,6 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
212
212
if (!cmdBuff->pipelineBarrier (E_DEPENDENCY_FLAGS::EDF_NONE, pplnBarrierDepInfo0))
213
213
logFailAndTerminate (" Failed to issue barrier!\n " );
214
214
215
- transferUpQueue->startCapture ();
216
215
const uint64_t oldCntr = intendedSubmit.scratchSemaphore .value ;
217
216
const bool uploadCommendRecorded = m_utils->updateImageViaStagingBuffer (
218
217
intendedSubmit, cpuImages[imageIdx]->getBuffer (), cpuImages[imageIdx]->getCreationParameters ().format ,
@@ -234,6 +233,7 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
234
233
cmdBuff->end ();
235
234
236
235
const IQueue::SSubmitInfo::SSemaphoreInfo signalSemaphore = {.semaphore =m_imagesLoadedSemaphore.get (),.value =imageIdx+1u ,.stageMask =PIPELINE_STAGE_FLAGS::COPY_BIT};
236
+ transferUpQueue->startCapture ();
237
237
getTransferUpQueue ()->submit (intendedSubmit.popSubmit ({&signalSemaphore,1 }));
238
238
transferUpQueue->endCapture ();
239
239
@@ -409,7 +409,6 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
409
409
};
410
410
m_device->updateDescriptorSets (1 , write, 0u , nullptr );
411
411
412
- computeQueue->startCapture ();
413
412
cmdBuff->begin (IGPUCommandBuffer::USAGE::NONE);
414
413
cmdBuff->beginDebugMarker (" My Compute Dispatch" , core::vectorSIMDf (0 , 1 , 0 , 1 ));
415
414
cmdBuff->bindComputePipeline (pipeline.get ());
@@ -440,6 +439,7 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
440
439
submitInfo[0 ].commandBuffers = cmdBuffSubmitInfo;
441
440
submitInfo[0 ].signalSemaphores = signalSemaphoreSubmitInfo;
442
441
submitInfo[0 ].waitSemaphores = {waitSemaphoreSubmitInfo, imageToProcessId < FRAMES_IN_FLIGHT ? 1u : 2u };
442
+ computeQueue->startCapture ();
443
443
computeQueue->submit (submitInfo);
444
444
computeQueue->endCapture ();
445
445
std::string msg = std::string (" Image nr " ) + std::to_string (imageToProcessId) + " processed. Resource idx: " + std::to_string (resourceIdx);
0 commit comments