@@ -300,7 +300,7 @@ class ArythmeticUnitTestApp : public NonGraphicalApplicationBase
300
300
void onAppInitialized_impl () override
301
301
{
302
302
CommonAPI::InitOutput initOutput;
303
- CommonAPI::InitWithNoExt (initOutput, nbl::video::EAT_OPENGL , " Subgroup Arithmetic Test" );
303
+ CommonAPI::InitWithNoExt (initOutput, nbl::video::EAT_VULKAN , " Subgroup Arithmetic Test" );
304
304
gl = std::move (initOutput.apiConnection );
305
305
gpuPhysicalDevice = std::move (initOutput.physicalDevice );
306
306
logicalDevice = std::move (initOutput.logicalDevice );
@@ -405,6 +405,17 @@ class ArythmeticUnitTestApp : public NonGraphicalApplicationBase
405
405
// no need to wait on fences because its only a shader create, does not result in the filling of image or buffers
406
406
};
407
407
408
+ auto logTestOutcome = [this ](bool passed, uint32_t workgroupSize)
409
+ {
410
+ if (passed)
411
+ logger->log (" Passed test #%u" , system::ILogger::ELL_INFO, workgroupSize);
412
+ else
413
+ {
414
+ totalFailCount++;
415
+ logger->log (" Failed test #%u" , system::ILogger::ELL_ERROR, workgroupSize);
416
+ }
417
+ };
418
+
408
419
// max workgroup size is hardcoded to 1024
409
420
const auto ds = descriptorSet.get ();
410
421
auto computeQueue = initOutput.queues [CommonAPI::InitOutput::EQT_COMPUTE];
@@ -423,19 +434,17 @@ class ArythmeticUnitTestApp : public NonGraphicalApplicationBase
423
434
424
435
const video::IGPUDescriptorSet* ds = descriptorSet.get ();
425
436
passed = runTest<emulatedSubgroupReduction>(logicalDevice.get (), computeQueue, fence.get (), cmdbuf.get (), pipelines[0u ].get (), descriptorSet.get (), inputData, workgroupSize, buffers, logger.get ()) && passed;
437
+ logTestOutcome (passed, workgroupSize);
426
438
passed = runTest<emulatedSubgroupScanExclusive>(logicalDevice.get (), computeQueue, fence.get (), cmdbuf.get (), pipelines[1u ].get (), descriptorSet.get (), inputData, workgroupSize, buffers, logger.get ()) && passed;
439
+ logTestOutcome (passed, workgroupSize);
427
440
passed = runTest<emulatedSubgroupScanInclusive>(logicalDevice.get (), computeQueue, fence.get (), cmdbuf.get (), pipelines[2u ].get (), descriptorSet.get (), inputData, workgroupSize, buffers, logger.get ()) && passed;
441
+ logTestOutcome (passed, workgroupSize);
428
442
passed = runTest<emulatedWorkgroupReduction>(logicalDevice.get (), computeQueue, fence.get (), cmdbuf.get (), pipelines[3u ].get (), descriptorSet.get (), inputData, workgroupSize, buffers, logger.get (), true ) && passed;
443
+ logTestOutcome (passed, workgroupSize);
429
444
passed = runTest<emulatedWorkgroupScanExclusive>(logicalDevice.get (), computeQueue, fence.get (), cmdbuf.get (), pipelines[4u ].get (), descriptorSet.get (), inputData, workgroupSize, buffers, logger.get (), true ) && passed;
445
+ logTestOutcome (passed, workgroupSize);
430
446
passed = runTest<emulatedWorkgroupScanInclusive>(logicalDevice.get (), computeQueue, fence.get (), cmdbuf.get (), pipelines[5u ].get (), descriptorSet.get (), inputData, workgroupSize, buffers, logger.get (), true ) && passed;
431
-
432
- if (passed)
433
- logger->log (" Passed test #%u" , system::ILogger::ELL_INFO, workgroupSize);
434
- else
435
- {
436
- totalFailCount++;
437
- logger->log (" Failed test #%u" , system::ILogger::ELL_ERROR, workgroupSize);
438
- }
447
+ logTestOutcome (passed, workgroupSize);
439
448
}
440
449
computeQueue->endCapture ();
441
450
}
0 commit comments