@@ -753,7 +753,7 @@ void RenderTestApp::_initializeAccelerationStructure()
753
753
passEncoder->buildAccelerationStructure (buildDesc, draftAS, nullptr , scratchBuffer, 1 , &compactedSizeQueryDesc);
754
754
passEncoder->end ();
755
755
commandBuffer->close ();
756
- m_queue->executeCommandBuffer (commandBuffer);
756
+ m_queue->submit (commandBuffer);
757
757
m_queue->waitOnHost ();
758
758
759
759
uint64_t compactedSize = 0 ;
@@ -768,7 +768,7 @@ void RenderTestApp::_initializeAccelerationStructure()
768
768
m_bottomLevelAccelerationStructure, draftAS, AccelerationStructureCopyMode::Compact);
769
769
passEncoder->end ();
770
770
commandBuffer->close ();
771
- m_queue->executeCommandBuffer (commandBuffer);
771
+ m_queue->submit (commandBuffer);
772
772
m_queue->waitOnHost ();
773
773
}
774
774
@@ -835,7 +835,7 @@ void RenderTestApp::_initializeAccelerationStructure()
835
835
passEncoder->buildAccelerationStructure (buildDesc, m_topLevelAccelerationStructure, nullptr , scratchBuffer, 0 , nullptr );
836
836
passEncoder->end ();
837
837
commandBuffer->close ();
838
- m_queue->executeCommandBuffer (commandBuffer);
838
+ m_queue->submit (commandBuffer);
839
839
m_queue->waitOnHost ();
840
840
}
841
841
}
@@ -982,7 +982,7 @@ Result RenderTestApp::update()
982
982
commandBuffer->close ();
983
983
984
984
m_startTicks = Process::getClockTick ();
985
- m_queue->executeCommandBuffer (commandBuffer);
985
+ m_queue->submit (commandBuffer);
986
986
m_queue->waitOnHost ();
987
987
988
988
// If we are in a mode where output is requested, we need to snapshot the back buffer here
@@ -1244,26 +1244,15 @@ static SlangResult _innerMain(Slang::StdWriters* stdWriters, SlangSession* sessi
1244
1244
}
1245
1245
}
1246
1246
1247
- #ifdef _DEBUG
1248
- rhiEnableDebugLayer ();
1249
- #endif
1250
1247
StdWritersDebugCallback debugCallback;
1251
1248
debugCallback.writers = stdWriters;
1252
- rhiSetDebugCallback (&debugCallback);
1253
- struct ResetDebugCallbackRAII
1254
- {
1255
- ~ResetDebugCallbackRAII ()
1256
- {
1257
- rhiSetDebugCallback (nullptr );
1258
- }
1259
- } resetDebugCallbackRAII;
1260
1249
1261
1250
// Use the profile name set on options if set
1262
1251
input.profile = options.profileName .getLength () ? options.profileName : input.profile ;
1263
1252
1264
1253
StringBuilder rendererName;
1265
1254
auto info =
1266
- rendererName << " [" << rhiGetDeviceTypeName (options.deviceType ) << " ] " ;
1255
+ rendererName << " [" << getRHI ()-> getDeviceTypeName (options.deviceType ) << " ] " ;
1267
1256
1268
1257
if (options.onlyStartup )
1269
1258
{
@@ -1310,9 +1299,15 @@ static SlangResult _innerMain(Slang::StdWriters* stdWriters, SlangSession* sessi
1310
1299
1311
1300
Slang::ComPtr<IDevice> device;
1312
1301
{
1313
- IDevice::Desc desc = {};
1302
+ DeviceDesc desc = {};
1314
1303
desc.deviceType = options.deviceType ;
1315
1304
1305
+ #if _DEBUG
1306
+ desc.enableValidation = true ;
1307
+ desc.enableBackendValidation = true ;
1308
+ desc.debugCallback = &debugCallback;
1309
+ #endif
1310
+
1316
1311
desc.slang .lineDirectiveMode = SLANG_LINE_DIRECTIVE_MODE_NONE;
1317
1312
if (options.generateSPIRVDirectly )
1318
1313
desc.slang .targetFlags = SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY;
@@ -1343,7 +1338,7 @@ static SlangResult _innerMain(Slang::StdWriters* stdWriters, SlangSession* sessi
1343
1338
desc.slang .slangGlobalSession = session;
1344
1339
desc.slang .targetProfile = options.profileName .getBuffer ();
1345
1340
{
1346
- SlangResult res = rhiCreateDevice (& desc, device.writeRef ());
1341
+ SlangResult res = getRHI ()-> createDevice ( desc, device.writeRef ());
1347
1342
if (SLANG_FAILED (res))
1348
1343
{
1349
1344
// We need to be careful here about SLANG_E_NOT_AVAILABLE. This return value means that the renderer couldn't
0 commit comments