-
Notifications
You must be signed in to change notification settings - Fork 844
[spirv] -fspv-flatten-resource-arrays crashes reflection #2413
Copy link
Copy link
Closed
Labels
spirvWork related to SPIR-VWork related to SPIR-V
Description
when compiling the following code with -fspv-flatten-resource-arrays,
no %OpName is generated for Tex
and if I add -fspv-reflect, dxc aborts with:
external/SPIRV-Tools/source/opt/desc_sroa.cpp:238: uint32_t spvtools::opt::DescriptorScalarReplacement::CreateReplacementVariable(spvtools::opt::Instruction*, uint32_t): Assertion old_decoration->opcode() == SpvOpDecorate' failed.`
struct PS_INPUT {
float4 Pos : SV_Position;
};
struct PS_OUTPUT {
float4 Color : SV_Target0;
};
SamplerState S;
Texture2D<float> Tex[4];
PS_OUTPUT psMain(const PS_INPUT In)
{
PS_OUTPUT Out;
Out.Color = float4(1,0,0,1);
Out.Color.y += Tex[0].SampleLevel(S, In.Pos.xy, 0).x;
return Out;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
spirvWork related to SPIR-VWork related to SPIR-V