summaryrefslogtreecommitdiffstats
path: root/tools/render-test/render-test-main.cpp
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2025-02-01 07:14:17 +0200
committerGitHub <noreply@github.com>2025-01-31 21:14:17 -0800
commit2949b786a7f04ad31c113b622039fb5b72bc8622 (patch)
tree25a3667ecef81bb6dbf7df3f81dd35088f5da0f9 /tools/render-test/render-test-main.cpp
parent16b7be65d3edf99c420fe5147d7daed27224d473 (diff)
Update Slang-RHI and enable any debug layers up-front (#6226)
* Update Slang-RHI and enable any debug layers up-front As [1] shows, creating a D3D12 device and then enabling debug layers causes future device creation to fail. That means enabling debug layers is a process-wide decision that should be done at startup, and not just before creating an individual device. Previously, Slang-RHI enabled debug layers as part of device creation. The new Slang-RHI revision doesn't do that anymore, but instead allows the user to enable debug layers earlier, with a separate API. This change calls the mentioned API before creating any device. This closes #6172. * Compile fixes needed after updating slang-rhi --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
-rw-r--r--tools/render-test/render-test-main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index 648e5a4bd..a8bd00bd4 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -1404,10 +1404,11 @@ static SlangResult _innerMain(
}
}
- desc.nvapiExtnSlot = int(nvapiExtnSlot);
+ desc.nvapiExtUavSlot = uint32_t(nvapiExtnSlot);
desc.slang.slangGlobalSession = session;
desc.slang.targetProfile = options.profileName.getBuffer();
{
+ getRHI()->enableDebugLayers();
SlangResult res = getRHI()->createDevice(desc, device.writeRef());
if (SLANG_FAILED(res))
{