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 crashed with asuint() #6713

Open
shobomaru opened this issue Jun 20, 2024 · 1 comment
Open

[SPIR-V] DXC crashed with asuint() #6713

shobomaru opened this issue Jun 20, 2024 · 1 comment
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V

Comments

@shobomaru
Copy link

Description
LLVM assertion failed.

Steps to Reproduce
dxc -T cs_6_0 -spirv path/to/file.hlsl

HLSL code:

RWSturcturedBuffer<uint> Out;
[numthreads(1, 1, 1)]
void main()
{
	Out[0] = asuint(-1);
}

If we change the code as follows, the issue is not occurred.

Out[0] = asuint(-1 * 1);

Actual Behavior

Assertion failed: (SI.isSigned() == E->getType()->isSignedIntegerOrEnumerationType() && "Invalid evaluation result."), function Success, file ExprConstant.cpp, line 6199.

Environment

  • DXC version: libdxcompiler.dylib: 1.8(dev;4640-45018c75)
  • Host Operating System: Windows 11 23H2 and macOS 14.5
@shobomaru shobomaru added bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V labels Jun 20, 2024
@gorrila007
Copy link

RWStructuredBuffer Out;
[numthreads(1, 1, 1)]
void main()
{
Out[0] = asuint(-1); // Ensure correct handling of -1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V
Projects
Status: For Google
Development

No branches or pull requests

2 participants