We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description
The following struct
template<typename T, uint32_t OutputBits> struct result_t { static result_t invalid() { result_t retval; retval.exclusivePrefixSum = retval.outputIndex = ~0u; return retval; } T outputIndex : OutputBits; T exclusivePrefixSum : (sizeof(T)*8-OutputBits); };
Steps to Reproduce
SPIR-V https://godbolt.org/z/GTc3do6od
Its not a BDA only issue, for interpolants it also gets confused https://godbolt.org/z/KK1G8czqq
I think the DXIL codegen is also wrong https://godbolt.org/z/cPohsxvYa
Actual Behavior
The codegen results in
%result_t = OpTypeStruct %uint %uint
for the function definition, and
OpCompositeExtract %uint %20 1
for the access on exclusivePrefixSum.
exclusivePrefixSum
The codegen treats the two bitfields as separate values.
The DXIL is also wrong
%1 = call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef), !dbg !58 %2 = call i32 @dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 0, i32 undef), !dbg !58
Declaring the struct as
T outputIndex : 7; T exclusivePrefixSum : (32-7);
doesn't introduce this issue.
Environment
The text was updated successfully, but these errors were encountered:
SpIR-V tag should be removed
Sorry, something went wrong.
No branches or pull requests
Description
The following struct
Steps to Reproduce
SPIR-V
https://godbolt.org/z/GTc3do6od
Its not a BDA only issue, for interpolants it also gets confused
https://godbolt.org/z/KK1G8czqq
I think the DXIL codegen is also wrong
https://godbolt.org/z/cPohsxvYa
Actual Behavior
The codegen results in
for the function definition, and
for the access on
exclusivePrefixSum
.The codegen treats the two bitfields as separate values.
The DXIL is also wrong
Declaring the struct as
doesn't introduce this issue.
Environment
The text was updated successfully, but these errors were encountered: