-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This Cl adds `LoadVectorElement`, `StoreVectorElement` and `Swizzle` support to the GLSL IR backend. Bug: 42251044 Change-Id: I0aac2b2f30f67621ab9407f50a9306cc950f233e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/204854 Commit-Queue: dan sinclair <[email protected]> Reviewed-by: James Price <[email protected]>
- Loading branch information
Showing
243 changed files
with
5,350 additions
and
2,412 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
void main_1() { | ||
mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); | ||
float x_16 = m[1].y; | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
main_1(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
void main_1() { | ||
vec3 v = vec3(0.0f); | ||
float x_14 = v.y; | ||
vec2 x_17 = v.xz; | ||
vec3 x_19 = v.xzy; | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
main_1(); | ||
} |
32 changes: 22 additions & 10 deletions
32
test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform mat2 u[4]; | ||
float s; | ||
float a(mat2 a_1[4]) { | ||
return a_1[0][0][0u]; | ||
} | ||
float b(mat2 m) { | ||
return m[0][0u]; | ||
} | ||
float c(vec2 v) { | ||
return v[0u]; | ||
} | ||
float d(float f) { | ||
return f; | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
float v_1 = a(u); | ||
float v_2 = (v_1 + b(u[1])); | ||
float v_3 = (v_2 + c(u[1][0].yx)); | ||
s = (v_3 + d(u[1][0].yx[0u])); | ||
} |
22 changes: 12 additions & 10 deletions
22
test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform mat2 u[4]; | ||
float s; | ||
mat2 p[4] = mat2[4](mat2(vec2(0.0f), vec2(0.0f)), mat2(vec2(0.0f), vec2(0.0f)), mat2(vec2(0.0f), vec2(0.0f)), mat2(vec2(0.0f), vec2(0.0f))); | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
p = u; | ||
p[1] = u[2]; | ||
p[1][0] = u[0][1].yx; | ||
p[1][0][0u] = u[0][1].x; | ||
s = p[1][0].x; | ||
} |
20 changes: 10 additions & 10 deletions
20
test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform mat2 u[4]; | ||
mat2 s[4]; | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
s = u; | ||
s[1] = u[2]; | ||
s[1][0] = u[0][1].yx; | ||
s[1][0][0u] = u[0][1].x; | ||
} |
33 changes: 23 additions & 10 deletions
33
test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
#extension GL_AMD_gpu_shader_half_float: require | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform f16mat2x3 u[4]; | ||
float16_t s; | ||
float16_t a(f16mat2x3 a_1[4]) { | ||
return a_1[0][0][0u]; | ||
} | ||
float16_t b(f16mat2x3 m) { | ||
return m[0][0u]; | ||
} | ||
float16_t c(f16vec3 v) { | ||
return v[0u]; | ||
} | ||
float16_t d(float16_t f) { | ||
return f; | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
float16_t v_1 = a(u); | ||
float16_t v_2 = (v_1 + b(u[1])); | ||
float16_t v_3 = (v_2 + c(u[1][0].zxy)); | ||
s = (v_3 + d(u[1][0].zxy[0u])); | ||
} |
23 changes: 13 additions & 10 deletions
23
test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
#extension GL_AMD_gpu_shader_half_float: require | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform f16mat2x3 u[4]; | ||
float16_t s; | ||
f16mat2x3 p[4] = f16mat2x3[4](f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))); | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
p = u; | ||
p[1] = u[2]; | ||
p[1][0] = u[0][1].zxy; | ||
p[1][0][0u] = u[0][1].x; | ||
s = p[1][0].x; | ||
} |
42 changes: 32 additions & 10 deletions
42
test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
#extension GL_AMD_gpu_shader_half_float: require | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform f16mat2x3 u[4]; | ||
f16mat2x3 s[4]; | ||
void tint_store_and_preserve_padding_1(inout f16mat2x3 target, f16mat2x3 value_param) { | ||
target[0u] = value_param[0u]; | ||
target[1u] = value_param[1u]; | ||
} | ||
void tint_store_and_preserve_padding(inout f16mat2x3 target[4], f16mat2x3 value_param[4]) { | ||
{ | ||
uint v = 0u; | ||
v = 0u; | ||
while(true) { | ||
uint v_1 = v; | ||
if ((v_1 >= 4u)) { | ||
break; | ||
} | ||
tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); | ||
{ | ||
v = (v_1 + 1u); | ||
} | ||
continue; | ||
} | ||
} | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
tint_store_and_preserve_padding(s, u); | ||
tint_store_and_preserve_padding_1(s[1], u[2]); | ||
s[1][0] = u[0][1].zxy; | ||
s[1][0][0u] = u[0][1].x; | ||
} |
32 changes: 22 additions & 10 deletions
32
test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform mat2x3 u[4]; | ||
float s; | ||
float a(mat2x3 a_1[4]) { | ||
return a_1[0][0][0u]; | ||
} | ||
float b(mat2x3 m) { | ||
return m[0][0u]; | ||
} | ||
float c(vec3 v) { | ||
return v[0u]; | ||
} | ||
float d(float f) { | ||
return f; | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
float v_1 = a(u); | ||
float v_2 = (v_1 + b(u[1])); | ||
float v_3 = (v_2 + c(u[1][0].zxy)); | ||
s = (v_3 + d(u[1][0].zxy[0u])); | ||
} |
22 changes: 12 additions & 10 deletions
22
test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
SKIP: FAILED | ||
#version 310 es | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store | ||
******************************************************************** | ||
* The tint shader compiler has encountered an unexpected error. * | ||
* * | ||
* Please help us fix this issue by submitting a bug report at * | ||
* crbug.com/tint with the source program that triggered the bug. * | ||
******************************************************************** | ||
|
||
tint executable returned error: signal: illegal instruction | ||
uniform mat2x3 u[4]; | ||
float s; | ||
mat2x3 p[4] = mat2x3[4](mat2x3(vec3(0.0f), vec3(0.0f)), mat2x3(vec3(0.0f), vec3(0.0f)), mat2x3(vec3(0.0f), vec3(0.0f)), mat2x3(vec3(0.0f), vec3(0.0f))); | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
p = u; | ||
p[1] = u[2]; | ||
p[1][0] = u[0][1].zxy; | ||
p[1][0][0u] = u[0][1].x; | ||
s = p[1][0].x; | ||
} |
Oops, something went wrong.