Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIR-V] DXC crash #6568

Open
jbright282 opened this issue Apr 26, 2024 · 1 comment
Open

[SPIR-V] DXC crash #6568

jbright282 opened this issue Apr 26, 2024 · 1 comment
Labels
bug Bug, regression, crash spirv Work related to SPIR-V

Comments

@jbright282
Copy link

Description
Small shader crashes DXC. Verified with nightlies.

Steps to Reproduce

Commandline:
dxc.exe -T cs_6_2 -E csAccumulate -spirv -fspv-target-env="vulkan1.1" -Fo output.spv .\badfile.hlsl

I've got the shader down to:

struct CommonParams
{
 float2 paramA;
};

void ComputeProj(const CommonParams params, out float2 paramA)
{
}

void RectifyHistory( inout float3 fHistoryColor, inout float3 fHistoryWeight)
{
}

CommonParams InitParams(int2 iPxHrPos)
{
 CommonParams params;
 ComputeProj(params, params.paramA);
 return params;
}

void Accumulate(int2 iPxHrPos)
{
 const CommonParams params = InitParams(iPxHrPos);

 float3 fHistoryColor = float3(0, 0, 0);
 float fHistoryWeight = float(0);
 RectifyHistory(fHistoryColor, fHistoryWeight);
}

[numthreads(8, 8, 1)]
void csAccumulate(int2 iDispatchThreadID : SV_DispatchThreadID, int2 iGroupId : SV_GroupID, int2 iGroupThreadId : SV_GroupThreadID, int iGroupThreadIndex : SV_GroupIndex)
{
    Accumulate(iDispatchThreadID);
}

Note the float/float3 mismatch with fHistoryWeight. This throws a warning compiling for DX. SPIRV crashes with no error.

Environment

  • DXC version dxcompiler.dll: 1.8 - 1.8.2403.37 (11e1318c3); dxil.dll: 1.8(101.8.2403.24)
  • Host Operating System: Win10
@jbright282 jbright282 added bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V labels Apr 26, 2024
@sudonatalie
Copy link
Collaborator

@jbright282 Thanks for reporting, we'll take a look.

@sudonatalie sudonatalie removed the needs-triage Awaiting triage label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash spirv Work related to SPIR-V
Projects
Status: Triaged
Development

No branches or pull requests

2 participants