-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tint] Update generator to add GLSL desktop flag
For the tint end2end tests which will only run on GLSL desktop (storage to an `rg` format or a `cube_array`) we add the flag to enable desktop generation mode so the expectations will generate without error. Bug: 42251044 Change-Id: I26b83dc3bb85ac4805c3143503883ce94391277e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/207194 Reviewed-by: James Price <[email protected]> Commit-Queue: dan sinclair <[email protected]>
- Loading branch information
Showing
1,115 changed files
with
16,539 additions
and
25,140 deletions.
There are no files selected for viewing
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
105 changes: 46 additions & 59 deletions
105
test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.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,94 +1,81 @@ | ||
SKIP: FAILED | ||
#version 460 | ||
|
||
#version 310 es | ||
|
||
layout(r8) uniform highp readonly image3D arg_0; | ||
layout(binding = 0, std430) buffer prevent_dce_block_ssbo { | ||
uvec3 inner; | ||
uint pad; | ||
} prevent_dce; | ||
|
||
void textureDimensions_00229f() { | ||
layout(binding = 0, r8) uniform highp readonly image3D arg_0; | ||
uvec3 textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
prevent_dce.inner = res; | ||
} | ||
|
||
vec4 vertex_main() { | ||
textureDimensions_00229f(); | ||
return vec4(0.0f); | ||
return res; | ||
} | ||
|
||
void main() { | ||
gl_PointSize = 1.0; | ||
vec4 inner_result = vertex_main(); | ||
gl_Position = inner_result; | ||
gl_Position.y = -(gl_Position.y); | ||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); | ||
return; | ||
} | ||
error: Error parsing GLSL shader: | ||
ERROR: 0:3: 'image load-store format' : not supported with this profile: es | ||
ERROR: 0:3: '' : compilation terminated | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
|
||
|
||
#version 310 es | ||
precision highp float; | ||
precision highp int; | ||
|
||
layout(r8) uniform highp readonly image3D arg_0; | ||
layout(binding = 0, std430) buffer prevent_dce_block_ssbo { | ||
uvec3 inner; | ||
uint pad; | ||
} prevent_dce; | ||
|
||
void textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
prevent_dce.inner = res; | ||
} | ||
struct VertexOutput { | ||
vec4 pos; | ||
uvec3 prevent_dce; | ||
}; | ||
|
||
void fragment_main() { | ||
textureDimensions_00229f(); | ||
prevent_dce.inner = textureDimensions_00229f(); | ||
} | ||
|
||
void main() { | ||
fragment_main(); | ||
return; | ||
} | ||
error: Error parsing GLSL shader: | ||
ERROR: 0:5: 'image load-store format' : not supported with this profile: es | ||
ERROR: 0:5: '' : compilation terminated | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
|
||
#version 460 | ||
|
||
#version 310 es | ||
|
||
layout(r8) uniform highp readonly image3D arg_0; | ||
layout(binding = 0, std430) buffer prevent_dce_block_ssbo { | ||
uvec3 inner; | ||
uint pad; | ||
} prevent_dce; | ||
|
||
void textureDimensions_00229f() { | ||
layout(binding = 0, r8) uniform highp readonly image3D arg_0; | ||
uvec3 textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
prevent_dce.inner = res; | ||
return res; | ||
} | ||
|
||
struct VertexOutput { | ||
vec4 pos; | ||
uvec3 prevent_dce; | ||
}; | ||
|
||
void compute_main() { | ||
textureDimensions_00229f(); | ||
prevent_dce.inner = textureDimensions_00229f(); | ||
} | ||
|
||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
compute_main(); | ||
return; | ||
} | ||
error: Error parsing GLSL shader: | ||
ERROR: 0:3: 'image load-store format' : not supported with this profile: es | ||
ERROR: 0:3: '' : compilation terminated | ||
ERROR: 2 compilation errors. No code generated. | ||
#version 460 | ||
|
||
layout(location = 0) flat out uvec3 prevent_dce_1; | ||
layout(binding = 0, r8) uniform highp readonly image3D arg_0; | ||
uvec3 textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
return res; | ||
} | ||
|
||
struct VertexOutput { | ||
vec4 pos; | ||
uvec3 prevent_dce; | ||
}; | ||
|
||
VertexOutput vertex_main() { | ||
VertexOutput tint_symbol = VertexOutput(vec4(0.0f, 0.0f, 0.0f, 0.0f), uvec3(0u, 0u, 0u)); | ||
tint_symbol.pos = vec4(0.0f); | ||
tint_symbol.prevent_dce = textureDimensions_00229f(); | ||
return tint_symbol; | ||
} | ||
|
||
void main() { | ||
gl_PointSize = 1.0; | ||
VertexOutput inner_result = vertex_main(); | ||
gl_Position = inner_result.pos; | ||
prevent_dce_1 = inner_result.prevent_dce; | ||
gl_Position.y = -(gl_Position.y); | ||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); | ||
return; | ||
} |
66 changes: 57 additions & 9 deletions
66
test/tint/builtins/gen/literal/textureDimensions/00229f.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,59 @@ | ||
SKIP: FAILED | ||
#version 460 | ||
precision highp float; | ||
precision highp int; | ||
|
||
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1423 internal compiler error: TINT_UNREACHABLE unhandled core builtin: textureDimensions | ||
******************************************************************** | ||
* 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. * | ||
******************************************************************** | ||
layout(binding = 0, std430) | ||
buffer tint_symbol_1_1_ssbo { | ||
uvec3 tint_symbol; | ||
} v; | ||
layout(binding = 0, r8) uniform highp readonly image3D arg_0; | ||
uvec3 textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
return res; | ||
} | ||
void main() { | ||
v.tint_symbol = textureDimensions_00229f(); | ||
} | ||
#version 460 | ||
|
||
tint executable returned error: signal: trace/BPT trap | ||
layout(binding = 0, std430) | ||
buffer tint_symbol_1_1_ssbo { | ||
uvec3 tint_symbol; | ||
} v; | ||
layout(binding = 0, r8) uniform highp readonly image3D arg_0; | ||
uvec3 textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
return res; | ||
} | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
v.tint_symbol = textureDimensions_00229f(); | ||
} | ||
#version 460 | ||
|
||
|
||
struct VertexOutput { | ||
vec4 pos; | ||
uvec3 prevent_dce; | ||
}; | ||
|
||
layout(binding = 0, r8) uniform highp readonly image3D arg_0; | ||
layout(location = 0) flat out uvec3 vertex_main_loc0_Output; | ||
uvec3 textureDimensions_00229f() { | ||
uvec3 res = uvec3(imageSize(arg_0)); | ||
return res; | ||
} | ||
VertexOutput vertex_main_inner() { | ||
VertexOutput tint_symbol = VertexOutput(vec4(0.0f), uvec3(0u)); | ||
tint_symbol.pos = vec4(0.0f); | ||
tint_symbol.prevent_dce = textureDimensions_00229f(); | ||
return tint_symbol; | ||
} | ||
void main() { | ||
VertexOutput v = vertex_main_inner(); | ||
gl_Position = v.pos; | ||
gl_Position[1u] = -(gl_Position.y); | ||
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w); | ||
vertex_main_loc0_Output = v.prevent_dce; | ||
gl_PointSize = 1.0f; | ||
} |
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
70 changes: 10 additions & 60 deletions
70
test/tint/builtins/gen/literal/textureDimensions/01e21e.wgsl.expected.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,91 +1,41 @@ | ||
SKIP: FAILED | ||
#version 460 | ||
|
||
#version 310 es | ||
|
||
layout(rg32ui) uniform highp writeonly uimage2D arg_0; | ||
layout(binding = 0, std430) buffer prevent_dce_block_ssbo { | ||
uint inner; | ||
} prevent_dce; | ||
|
||
void textureDimensions_01e21e() { | ||
layout(binding = 0, rg32ui) uniform highp writeonly uimage2D arg_0; | ||
uint textureDimensions_01e21e() { | ||
uint res = uvec2(imageSize(arg_0)).x; | ||
prevent_dce.inner = res; | ||
} | ||
|
||
vec4 vertex_main() { | ||
textureDimensions_01e21e(); | ||
return vec4(0.0f); | ||
} | ||
|
||
void main() { | ||
gl_PointSize = 1.0; | ||
vec4 inner_result = vertex_main(); | ||
gl_Position = inner_result; | ||
gl_Position.y = -(gl_Position.y); | ||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); | ||
return; | ||
} | ||
error: Error parsing GLSL shader: | ||
ERROR: 0:3: 'image load-store format' : not supported with this profile: es | ||
ERROR: 0:3: '' : compilation terminated | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
|
||
|
||
#version 310 es | ||
precision highp float; | ||
precision highp int; | ||
|
||
layout(rg32ui) uniform highp writeonly uimage2D arg_0; | ||
layout(binding = 0, std430) buffer prevent_dce_block_ssbo { | ||
uint inner; | ||
} prevent_dce; | ||
|
||
void textureDimensions_01e21e() { | ||
uint res = uvec2(imageSize(arg_0)).x; | ||
prevent_dce.inner = res; | ||
return res; | ||
} | ||
|
||
void fragment_main() { | ||
textureDimensions_01e21e(); | ||
prevent_dce.inner = textureDimensions_01e21e(); | ||
} | ||
|
||
void main() { | ||
fragment_main(); | ||
return; | ||
} | ||
error: Error parsing GLSL shader: | ||
ERROR: 0:5: 'image load-store format' : not supported with this profile: es | ||
ERROR: 0:5: '' : compilation terminated | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
#version 460 | ||
|
||
|
||
#version 310 es | ||
|
||
layout(rg32ui) uniform highp writeonly uimage2D arg_0; | ||
layout(binding = 0, std430) buffer prevent_dce_block_ssbo { | ||
uint inner; | ||
} prevent_dce; | ||
|
||
void textureDimensions_01e21e() { | ||
layout(binding = 0, rg32ui) uniform highp writeonly uimage2D arg_0; | ||
uint textureDimensions_01e21e() { | ||
uint res = uvec2(imageSize(arg_0)).x; | ||
prevent_dce.inner = res; | ||
return res; | ||
} | ||
|
||
void compute_main() { | ||
textureDimensions_01e21e(); | ||
prevent_dce.inner = textureDimensions_01e21e(); | ||
} | ||
|
||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
void main() { | ||
compute_main(); | ||
return; | ||
} | ||
error: Error parsing GLSL shader: | ||
ERROR: 0:3: 'image load-store format' : not supported with this profile: es | ||
ERROR: 0:3: '' : compilation terminated | ||
ERROR: 2 compilation errors. No code generated. | ||
|
||
|
||
|
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
Oops, something went wrong.