mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
tint/hlsl: fix assignment to matrix element
When calling the generated helper, the column and row arguments were swapped. Improved the unit tests to actually show this, rather than passing in a single value for both column and row. Bug: tint:1824 Bug: tint:1333 Change-Id: I32a92dec5e594dabd9d8d2b08474c0d6f3645520 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118420 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
a4117ca21b
commit
f031ca2d44
@@ -16,6 +16,6 @@ cbuffer cbuffer_uniforms : register(b4, space1) {
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, 0, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ cbuffer cbuffer_uniforms : register(b4, space1) {
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, 0, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ cbuffer cbuffer_uniforms : register(b4, space1) {
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].y, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ cbuffer cbuffer_uniforms : register(b4, space1) {
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].y, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, uniforms[0].y, 0, 1.0f);
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, uniforms[0].y, 0, 1.0f);
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, 0, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, 0, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, uniforms[0].y, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, uniforms[0].y, uniforms[0].x, 1.0f);
|
||||
set_scalar_float2x4(m1, uniforms[0].x, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, uniforms[0].y, 0, 1.0f);
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
set_scalar_float2x4(m1, uniforms[0].y, 0, 1.0f);
|
||||
set_scalar_float2x4(m1, 0, uniforms[0].y, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user