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

Respect matrix orientation when doing store to raw buffer #3423

Closed
vcsharma opened this issue Feb 2, 2021 · 1 comment · Fixed by #3484
Closed

Respect matrix orientation when doing store to raw buffer #3423

vcsharma opened this issue Feb 2, 2021 · 1 comment · Fixed by #3484
Assignees
Labels
matrix-bug Bugs relating to matrix types

Comments

@vcsharma
Copy link
Contributor

vcsharma commented Feb 2, 2021

Notice that even with /Zpc flag, we store {1, 2, 3, 4} to the raw buffer instead of {1, 3, 2, 4}

cmd: dxc.exe /E main /T vs_6_5 /Zpc

RWByteAddressBuffer buffer;

void main()
{
	float2x2 t = {1,2,3,4};
	buffer.Store(0, t);
}
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
target triple = "dxil-ms-dx"

%dx.types.Handle = type { i8* }
%struct.RWByteAddressBuffer = type { i32 }

define void @main() {
  %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 1, i32 0, i32 0, i1 false)  ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
  call void @dx.op.rawBufferStore.f32(i32 140, %dx.types.Handle %1, i32 0, i32 undef, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, i8 15, i32 4)  ; RawBufferStore(uav,index,elementOffset,value0,value1,value2,value3,mask,alignment)
  ret void
}
@vcsharma vcsharma self-assigned this Feb 3, 2021
@Jasper-Bekkers
Copy link

Related: #3370 #3371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matrix-bug Bugs relating to matrix types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants