You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is, the data is stored as 3 consecutive float4 rows, which is what row_major implies.
The code for implementing the fetch, loads one row using a cbuffer fetch, but then only extracts three scalar values for the row (a row which should have four values...)
The following compute shader code exposes a code generation issue on the version of dxc that ships in the RS5 SDK:
The header comment on the generated DXIL shows that the matrix has been laid out properly, consuming 3 16-byte "registers" in the
cbuffer
:That is, the data is stored as 3 consecutive
float4
rows, which is whatrow_major
implies.The code for implementing the fetch, loads one row using a cbuffer fetch, but then only extracts three scalar values for the row (a row which should have four values...)
The generated code then constructs a local 3-element array for indexing (even though the row has four values):
Then it indexes into the row using a value in 0-3 (generated by an
and
with 3), which can obviously index out of the bounds of the local array:(Aside: I'm also not clear on how the
%11
getelementptr
instruction is referencing%13
which is being computed later in the same block).I have observed this miscompilation leading to garbage values being read in shader code I am testing.
The text was updated successfully, but these errors were encountered: