Skip to content

Commit 2949b78

Browse files
aleino-nvcsyonghe
andauthored
Update Slang-RHI and enable any debug layers up-front (shader-slang#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 shader-slang#6172. * Compile fixes needed after updating slang-rhi --------- Co-authored-by: Yong He <yonghe@outlook.com>
1 parent 16b7be6 commit 2949b78

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

external/slang-rhi

Submodule slang-rhi updated 175 files

tools/render-test/render-test-main.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1404,10 +1404,11 @@ static SlangResult _innerMain(
14041404
}
14051405
}
14061406

1407-
desc.nvapiExtnSlot = int(nvapiExtnSlot);
1407+
desc.nvapiExtUavSlot = uint32_t(nvapiExtnSlot);
14081408
desc.slang.slangGlobalSession = session;
14091409
desc.slang.targetProfile = options.profileName.getBuffer();
14101410
{
1411+
getRHI()->enableDebugLayers();
14111412
SlangResult res = getRHI()->createDevice(desc, device.writeRef());
14121413
if (SLANG_FAILED(res))
14131414
{

tools/render-test/shader-input-layout.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class ShaderInputLayout
324324
public:
325325
Slang::String derivedTypeName;
326326
Slang::String baseTypeName;
327-
Int idOverride = -1;
327+
Slang::Int idOverride = -1;
328328
};
329329
Slang::List<TypeConformanceVal> typeConformances;
330330

tools/render-test/slang-support.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct ShaderCompileRequest
3636
public:
3737
Slang::String derivedTypeName;
3838
Slang::String baseTypeName;
39-
Int idOverride;
39+
Slang::Int idOverride;
4040
};
4141

4242
SourceInfo source;

0 commit comments

Comments
 (0)