Could you upload the problematic shader or a simplified version that reproduces the issue?
This is the msbuild task which builds the shader, to h file, which is embedded into the executable
g_%(Filename) $(IntermediateOutputPath)\%(Filename).h RootSignature rootsig_1.1 g_%(Filename) $(IntermediateOutputPath)\%(Filename).h Vertex 6.0 -Zi -all_resources_bound -Fd %(Filename).pdb</FxCompile>
g_%(Filename)
$(IntermediateOutputPath)\%(Filename).h
Pixel
6.0
-Zi -all_resources_bound -Fd %(Filename).pdb
these are the two shaders, the problem first happens to the vertex shader, it does not get to the pixel shader,
proton version is from main pulled out two days ago
I'll have a look, it might be possible that we don't properly check the stage visibility somewhere.
I can reproduce it.
Nothing extracted yet.
Hello,
I have a signature which looks like this
#define MyRS_D3DStats "RootFlags( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT ), "
"CBV(b0, visibility = SHADER_VISIBILITY_VERTEX, flags = DATA_STATIC_WHILE_SET_AT_EXECUTE ), "
"RootConstants(num32BitConstants=8, b0, visibility = SHADER_VISIBILITY_PIXEL), "
"DescriptorTable(SRV(t0, numDescriptors = 1, flags = DATA_STATIC_WHILE_SET_AT_EXECUTE ), visibility = SHADER_VISIBILITY_PIXEL),"
"StaticSampler(s0, addressU = TEXTURE_ADDRESS_CLAMP, addressV = TEXTURE_ADDRESS_CLAMP, addressW = TEXTURE_ADDRESS_CLAMP, filter = FILTER_MIN_MAG_MIP_LINEAR )"
On load i get break point here in the spir converter:
member index = 13,
num_elements = 10
if i increase the num32BitConstants to 16 or 32, it works
If i convert this to cbv works also
The shaders are compiled with dxc
The pixel shader which uses the root constans is:
struct LitMaterialPixel
{
float4 m_alpha_factor;
float4 m_texture_factor;
};
ConstantBuffer g_MaterialPixel : register(b0);