mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
GLSL: move entry point handling to CanonicalizeEntryPointIO transform.
Move builtin_to_string() and builtin_type() to the CanonicalizeEntryPointIO transform. Use the former to rename entry point IO variables to the gl_ names, and the latter to cast values to the correct type. Change-Id: Iddfad574ddd660ff1bfd89a399a001b967b6b67e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78380 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
f34038b1a0
commit
0b39270e01
@@ -5,11 +5,6 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
unused_entry_point();
|
||||
}
|
||||
|
||||
struct S {
|
||||
ivec4 arr[4];
|
||||
};
|
||||
|
||||
@@ -5,11 +5,6 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
unused_entry_point();
|
||||
}
|
||||
|
||||
struct S {
|
||||
ivec4 arr[4];
|
||||
};
|
||||
|
||||
@@ -5,11 +5,6 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
unused_entry_point();
|
||||
}
|
||||
|
||||
struct S {
|
||||
ivec4 arr[4];
|
||||
};
|
||||
|
||||
@@ -5,11 +5,6 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
unused_entry_point();
|
||||
}
|
||||
|
||||
struct S {
|
||||
int arr[4];
|
||||
};
|
||||
|
||||
@@ -5,11 +5,6 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
unused_entry_point();
|
||||
}
|
||||
|
||||
struct S {
|
||||
ivec4 arr[4];
|
||||
};
|
||||
|
||||
@@ -13,7 +13,6 @@ float f3(float a[2][3][4]) {
|
||||
return a[1][2][3];
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
float a1[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float a2[3][4] = float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f));
|
||||
@@ -21,10 +20,10 @@ void tint_symbol() {
|
||||
float v1 = f1(a1);
|
||||
float v2 = f2(a2);
|
||||
float v3 = f3(a3);
|
||||
return;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
tint_symbol();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,15 +16,14 @@ float[2][3][4] f3() {
|
||||
return tint_symbol_3;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
float a1[4] = f1();
|
||||
float a2[3][4] = f2();
|
||||
float a3[2][3][4] = f3();
|
||||
return;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
tint_symbol();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,9 @@ void tint_symbol() {
|
||||
float unsigned_constant[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
signed_literal = unsigned_constant;
|
||||
signed_constant = unsigned_literal;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tint_symbol();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
int x = 42;
|
||||
int empty[4] = int[4](0, 0, 0, 0);
|
||||
@@ -36,10 +35,10 @@ void tint_symbol() {
|
||||
int tint_symbol_19[4] = int[4](1, x, (x + 1), nonempty[3]);
|
||||
int tint_symbol_20[2][4] = int[2][4](tint_symbol_19, nested_nonempty[1][2]);
|
||||
int subexpr_nested_nonempty_with_expr[4] = tint_symbol_20[1];
|
||||
return;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
tint_symbol();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user