GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL.

The OpenGL ES 3.1 spec says:

"The point size is taken from the shader built-in gl_PointSize written by the vertex shader, and clamped to the implementation-dependent point size range. If the value written to gl_PointSize is less than or equal to zero, or if no value is written, the point size is undefined."

ANGLE/D3D11 will emit a warning on this and abort processing, causing dawn_end2end tests to fail.

Bug: dawn:1390
Change-Id: I6a56467842ba80d8a070af7240ee07bb111089dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87720
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White
2022-04-22 21:25:02 +00:00
committed by Dawn LUCI CQ
parent c0fe68907b
commit 790e4c2d60
745 changed files with 685 additions and 1474 deletions

View File

@@ -18,6 +18,7 @@ Interface vert_main() {
}
void main() {
gl_PointSize = 1.0;
Interface inner_result = vert_main();
i_1 = inner_result.i;
u_1 = inner_result.u;

View File

@@ -26,6 +26,7 @@ Out tint_symbol_1() {
}
void main() {
gl_PointSize = 1.0;
Out inner_result = tint_symbol_1();
gl_Position = inner_result.pos;
none_1 = inner_result.none;

View File

@@ -5,6 +5,7 @@ vec4 tint_symbol() {
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = tint_symbol();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);

View File

@@ -10,6 +10,7 @@ Out tint_symbol() {
}
void main() {
gl_PointSize = 1.0;
Out inner_result = tint_symbol();
gl_Position = inner_result.pos;
gl_Position.y = -(gl_Position.y);

View File

@@ -14,6 +14,7 @@ Interface vert_main() {
}
void main() {
gl_PointSize = 1.0;
Interface inner_result = vert_main();
col1_1 = inner_result.col1;
col2_1 = inner_result.col2;

View File

@@ -16,6 +16,7 @@ VertexOutput vert_main1() {
}
void main() {
gl_PointSize = 1.0;
VertexOutput inner_result = vert_main1();
gl_Position = inner_result.pos;
loc0_1 = inner_result.loc0;
@@ -41,6 +42,7 @@ VertexOutput vert_main2() {
}
void main() {
gl_PointSize = 1.0;
VertexOutput inner_result = vert_main2();
gl_Position = inner_result.pos;
loc0_1 = inner_result.loc0;

View File

@@ -6,6 +6,7 @@ vec4 tint_symbol(uint vertex_index, uint instance_index) {
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = tint_symbol(uint(gl_VertexID), uint(gl_InstanceID));
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);

View File

@@ -11,6 +11,7 @@ vec4 tint_symbol(VertexInputs inputs) {
}
void main() {
gl_PointSize = 1.0;
VertexInputs tint_symbol_1 = VertexInputs(uint(gl_VertexID), uint(gl_InstanceID));
vec4 inner_result = tint_symbol(tint_symbol_1);
gl_Position = inner_result;

View File

@@ -13,6 +13,7 @@ vec4 tint_symbol(int loc0, uint loc1, float loc2, vec4 loc3) {
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = tint_symbol(loc0_1, loc1_1, loc2_1, loc3_1);
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);

View File

@@ -20,6 +20,7 @@ vec4 tint_symbol(VertexInputs inputs) {
}
void main() {
gl_PointSize = 1.0;
VertexInputs tint_symbol_1 = VertexInputs(loc0_1, loc1_1, loc2_1, loc3_1);
vec4 inner_result = tint_symbol(tint_symbol_1);
gl_Position = inner_result;

View File

@@ -24,6 +24,7 @@ vec4 tint_symbol(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexIn
}
void main() {
gl_PointSize = 1.0;
VertexInputs0 tint_symbol_1 = VertexInputs0(uint(gl_VertexID), loc0_1);
VertexInputs1 tint_symbol_2 = VertexInputs1(loc2_1, loc3_1);
vec4 inner_result = tint_symbol(tint_symbol_1, loc1_1, uint(gl_InstanceID), tint_symbol_2);

View File

@@ -5,6 +5,7 @@ vec4 tint_symbol() {
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = tint_symbol();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);

View File

@@ -10,6 +10,7 @@ VertexOutputs tint_symbol() {
}
void main() {
gl_PointSize = 1.0;
VertexOutputs inner_result = tint_symbol();
gl_Position = inner_result.position;
gl_Position.y = -(gl_Position.y);

View File

@@ -18,6 +18,7 @@ VertexOutputs tint_symbol() {
}
void main() {
gl_PointSize = 1.0;
VertexOutputs inner_result = tint_symbol();
loc0_1 = inner_result.loc0;
loc1_1 = inner_result.loc1;