diff options
| author | Anders Leino <aleino@nvidia.com> | 2025-02-01 07:14:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-31 21:14:17 -0800 |
| commit | 2949b786a7f04ad31c113b622039fb5b72bc8622 (patch) | |
| tree | 25a3667ecef81bb6dbf7df3f81dd35088f5da0f9 /tools/render-test | |
| parent | 16b7be65d3edf99c420fe5147d7daed27224d473 (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')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 3 | ||||
| -rw-r--r-- | tools/render-test/shader-input-layout.h | 2 | ||||
| -rw-r--r-- | tools/render-test/slang-support.h | 2 |
3 files changed, 4 insertions, 3 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)) { diff --git a/tools/render-test/shader-input-layout.h b/tools/render-test/shader-input-layout.h index 187cc0b84..c7a8a6918 100644 --- a/tools/render-test/shader-input-layout.h +++ b/tools/render-test/shader-input-layout.h @@ -324,7 +324,7 @@ public: public: Slang::String derivedTypeName; Slang::String baseTypeName; - Int idOverride = -1; + Slang::Int idOverride = -1; }; Slang::List<TypeConformanceVal> typeConformances; diff --git a/tools/render-test/slang-support.h b/tools/render-test/slang-support.h index d52e94b47..d5574e903 100644 --- a/tools/render-test/slang-support.h +++ b/tools/render-test/slang-support.h @@ -36,7 +36,7 @@ struct ShaderCompileRequest public: Slang::String derivedTypeName; Slang::String baseTypeName; - Int idOverride; + Slang::Int idOverride; }; SourceInfo source; |
