GLSL: add location layout qualifier before in/out variables.

Bug: tint:1398
Change-Id: I89c985d01d539ed166661ee5e858247cde4702b3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78080
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White
2022-01-25 19:44:14 +00:00
committed by Tint LUCI CQ
parent fc792989e1
commit 8e01c45e54
181 changed files with 382 additions and 352 deletions

View File

@@ -34,10 +34,10 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
wrapper_result.value = inner_result;
return wrapper_result;
}
in int loc0;
in uint loc1;
in uint loc1_1;
in vec4 loc3;
layout(location = 0) in int loc0;
layout(location = 1) in uint loc1;
layout(location = 2) in uint loc1_1;
layout(location = 3) in vec4 loc3;
void main() {
tint_symbol_2 inputs;
inputs.loc0 = loc0;

View File

@@ -50,7 +50,7 @@ tint_symbol_3 vs_main(tint_symbol_2 tint_symbol_1) {
wrapper_result.position = inner_result.position;
return wrapper_result;
}
out vec2 texcoords;
layout(location = 0) out vec2 texcoords;
void main() {
tint_symbol_2 inputs;
inputs.VertexIndex = uint(gl_VertexID);
@@ -105,8 +105,8 @@ tint_symbol_6 fs_main(tint_symbol_5 tint_symbol_4) {
wrapper_result_1.value = inner_result_1;
return wrapper_result_1;
}
in vec2 texcoord;
out vec4 value;
layout(location = 0) in vec2 texcoord;
layout(location = 0) out vec4 value;
void main() {
tint_symbol_5 inputs;
inputs.texcoord = texcoord;

View File

@@ -49,8 +49,8 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
wrapper_result.value = inner_result;
return wrapper_result;
}
in vec2 vUV;
out vec4 value;
layout(location = 0) in vec2 vUV;
layout(location = 0) out vec4 value;
void main() {
tint_symbol_2 inputs;
inputs.vUV = vUV;

View File

@@ -59,11 +59,11 @@ tint_symbol_4 tint_symbol(tint_symbol_3 tint_symbol_2) {
wrapper_result.color = inner_result.color;
return wrapper_result;
}
in vec4 view_position;
in vec4 normal;
in vec2 uv;
in vec4 color;
out vec4 color;
layout(location = 0) in vec4 view_position;
layout(location = 1) in vec4 normal;
layout(location = 2) in vec2 uv;
layout(location = 3) in vec4 color;
layout(location = 0) out vec4 color;
void main() {
tint_symbol_3 inputs;
inputs.view_position = view_position;

View File

@@ -33,9 +33,9 @@ tint_symbol_4 tint_symbol(tint_symbol_3 tint_symbol_2) {
wrapper_result.mask = inner_result.mask;
return wrapper_result;
}
in float a;
in float b;
out float a;
layout(location = 0) in float a;
layout(location = 1) in float b;
layout(location = 0) out float a;
void main() {
tint_symbol_3 inputs;
inputs.a = a;

View File

@@ -34,8 +34,8 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
wrapper_result.value = inner_result;
return wrapper_result;
}
in ivec3 x;
out int value;
layout(location = 1) in ivec3 x;
layout(location = 2) out int value;
void main() {
tint_symbol_2 inputs;
inputs.x = x;

View File

@@ -77,10 +77,10 @@ tint_symbol_4 tint_symbol_1(tint_symbol_3 tint_symbol_2) {
wrapper_result.vUV_1 = inner_result.vUV_1;
return wrapper_result;
}
in vec3 position_param;
in vec3 normal_param;
in vec2 uv_param;
out vec2 vUV_1;
layout(location = 0) in vec3 position_param;
layout(location = 1) in vec3 normal_param;
layout(location = 2) in vec2 uv_param;
layout(location = 0) out vec2 vUV_1;
void main() {
tint_symbol_3 inputs;
inputs.position_param = position_param;

View File

@@ -1566,7 +1566,7 @@ tint_symbol_5 tint_symbol_1(tint_symbol_4 tint_symbol_3) {
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}
out vec4 x_GLF_color_1;
layout(location = 0) out vec4 x_GLF_color_1;
void main() {
tint_symbol_4 inputs;
inputs.tint_symbol_2 = gl_FragCoord;

View File

@@ -31,7 +31,7 @@ tint_symbol_4 tint_symbol(tint_symbol_3 tint_symbol_2) {
wrapper_result.color = inner_result.color;
return wrapper_result;
}
out vec4 color;
layout(location = 0) out vec4 color;
void main() {
tint_symbol_3 inputs;
inputs.VertexIndex = uint(gl_VertexID);

View File

@@ -161,13 +161,13 @@ tint_symbol_4 tint_symbol_1(tint_symbol_3 tint_symbol_2) {
wrapper_result.member = inner_result.member;
return wrapper_result;
}
in vec3 a_Position;
in vec2 a_UV;
in vec4 a_Color;
in vec3 a_Normal;
in float a_PosMtxIdx;
out vec4 v_Color;
out vec2 v_TexCoord;
layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec2 a_UV;
layout(location = 2) in vec4 a_Color;
layout(location = 3) in vec3 a_Normal;
layout(location = 4) in float a_PosMtxIdx;
layout(location = 0) out vec4 v_Color;
layout(location = 1) out vec2 v_TexCoord;
void main() {
tint_symbol_3 inputs;
inputs.a_Position = a_Position;

View File

@@ -205,13 +205,13 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
return wrapper_result;
}
in vec3 vPosition_param;
in vec2 vUV_param;
in vec2 tUV_param;
in vec2 stageUnits_1_param;
in vec2 levelUnits_param;
in vec2 tileID_1_param;
out vec4 glFragColor_1;
layout(location = 0) in vec3 vPosition_param;
layout(location = 1) in vec2 vUV_param;
layout(location = 2) in vec2 tUV_param;
layout(location = 3) in vec2 stageUnits_1_param;
layout(location = 4) in vec2 levelUnits_param;
layout(location = 5) in vec2 tileID_1_param;
layout(location = 0) out vec4 glFragColor_1;
void main() {
tint_symbol_2 inputs;
inputs.vPosition_param = vPosition_param;

View File

@@ -378,11 +378,11 @@ tint_symbol_5 tint_symbol_1(tint_symbol_4 tint_symbol_3) {
wrapper_result.glFragColor_1 = inner_result.glFragColor_1;
return wrapper_result;
}
in vec4 v_output1_param;
in vec2 vMainuv_param;
in vec4 v_output2_param;
in vec2 v_uv_param;
out vec4 glFragColor_1;
layout(location = 0) in vec4 v_output1_param;
layout(location = 1) in vec2 vMainuv_param;
layout(location = 2) in vec4 v_output2_param;
layout(location = 3) in vec2 v_uv_param;
layout(location = 0) out vec4 glFragColor_1;
void main() {
tint_symbol_4 inputs;
inputs.v_output1_param = v_output1_param;

View File

@@ -32,8 +32,8 @@ tint_symbol_4 tint_symbol(tint_symbol_3 tint_symbol_2) {
wrapper_result.color = inner_result.color;
return wrapper_result;
}
in vec2 vUv;
out vec4 color;
layout(location = 2) in vec2 vUv;
layout(location = 0) out vec4 color;
void main() {
tint_symbol_3 inputs;
inputs.vUv = vUv;

View File

@@ -17,7 +17,7 @@ tint_symbol frag_main() {
wrapper_result.value = inner_result;
return wrapper_result;
}
out vec4 value;
layout(location = 0) out vec4 value;
void main() {
tint_symbol outputs;
outputs = frag_main();