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

Naga drops HLSL row_major qualifier for global matrices #1836

Closed
jimblandy opened this issue Apr 16, 2022 · 0 comments · Fixed by #1846
Closed

Naga drops HLSL row_major qualifier for global matrices #1836

jimblandy opened this issue Apr 16, 2022 · 0 comments · Fixed by #1846
Assignees
Labels
area: back-end Outputs of shader conversion kind: bug Something isn't working lang: HLSL High-Level Shading Language

Comments

@jimblandy
Copy link
Member

Naga fails to emit the row_major qualifier in HLSL cbuffer declarations generated for global variables of type mat4x4<f32>.

The following WGSL input:

@group(0) @binding(0)
var<uniform> global_mat: mat4x4<f32>;

produces the following HLSL output:

cbuffer global_mat : register(b0) { float4x4 global_mat; }

Instead, it should produce:

cbuffer global_mat : register(b0) { row_major float4x4 global_mat; }

This was never noticed before because WGSL used to require that all globals have struct types, and Naga does include the row_major qualifier when emitting a struct declaration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: back-end Outputs of shader conversion kind: bug Something isn't working lang: HLSL High-Level Shading Language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant