mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
tint/ast: Generate ast::BuiltinValue from intrinsics.def
Emit unit tests for parsing and printing. Emit benchmarks for parsing. Uses intrinsics.def as a single-source-of-truth. The generators provide a way to optimize the enum parsers. Change-Id: Ic95177b8b60a51f0bcd6dab4138984f54f30ed6d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97201 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
99ad82a8aa
commit
fe8e6ee682
@@ -3163,7 +3163,7 @@ fn vert_main() -> @builtin(position) vec4<f32> {
|
||||
auto* expect = R"(
|
||||
@builtin(position) @internal(disable_validation__ignore_storage_class) var<out> value : vec4<f32>;
|
||||
|
||||
@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size : f32;
|
||||
@builtin(point_size) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size : f32;
|
||||
|
||||
fn vert_main_inner() -> vec4<f32> {
|
||||
return vec4<f32>();
|
||||
@@ -3197,7 +3197,7 @@ fn vert_main() -> @builtin(position) vec4<f32> {
|
||||
struct tint_symbol {
|
||||
@builtin(position)
|
||||
value : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size : f32,
|
||||
}
|
||||
|
||||
@@ -3238,7 +3238,7 @@ fn vert_main() -> VertOut {
|
||||
auto* expect = R"(
|
||||
@builtin(position) @internal(disable_validation__ignore_storage_class) var<out> pos_1 : vec4<f32>;
|
||||
|
||||
@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size : f32;
|
||||
@builtin(point_size) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size : f32;
|
||||
|
||||
struct VertOut {
|
||||
pos : vec4<f32>,
|
||||
@@ -3279,7 +3279,7 @@ struct VertOut {
|
||||
auto* expect = R"(
|
||||
@builtin(position) @internal(disable_validation__ignore_storage_class) var<out> pos_1 : vec4<f32>;
|
||||
|
||||
@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size : f32;
|
||||
@builtin(point_size) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size : f32;
|
||||
|
||||
fn vert_main_inner() -> VertOut {
|
||||
return VertOut();
|
||||
@@ -3325,7 +3325,7 @@ struct VertOut {
|
||||
struct tint_symbol {
|
||||
@builtin(position)
|
||||
pos : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size : f32,
|
||||
}
|
||||
|
||||
@@ -3367,7 +3367,7 @@ struct VertOut {
|
||||
struct tint_symbol {
|
||||
@builtin(position)
|
||||
pos : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size : f32,
|
||||
}
|
||||
|
||||
@@ -3432,7 +3432,7 @@ fn vert_main(collide : VertIn1, collide_1 : VertIn2) -> VertOut {
|
||||
|
||||
@builtin(position) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size_1_1 : vec4<f32>;
|
||||
|
||||
@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size_4 : f32;
|
||||
@builtin(point_size) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size_4 : f32;
|
||||
|
||||
var<private> vertex_point_size : f32;
|
||||
|
||||
@@ -3510,7 +3510,7 @@ struct VertOut {
|
||||
|
||||
@builtin(position) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size_1_1 : vec4<f32>;
|
||||
|
||||
@builtin(pointsize) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size_4 : f32;
|
||||
@builtin(point_size) @internal(disable_validation__ignore_storage_class) var<out> vertex_point_size_4 : f32;
|
||||
|
||||
fn vert_main_inner(collide : VertIn1, collide_1 : VertIn2) -> VertOut {
|
||||
let x = (collide.collide + collide_1.collide);
|
||||
@@ -3601,7 +3601,7 @@ struct tint_symbol_2 {
|
||||
vertex_point_size : vec4<f32>,
|
||||
@builtin(position)
|
||||
vertex_point_size_1 : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size_2 : f32,
|
||||
}
|
||||
|
||||
@@ -3664,7 +3664,7 @@ struct tint_symbol_2 {
|
||||
vertex_point_size : vec4<f32>,
|
||||
@builtin(position)
|
||||
vertex_point_size_1 : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size_2 : f32,
|
||||
}
|
||||
|
||||
@@ -3753,7 +3753,7 @@ struct tint_symbol_2 {
|
||||
vertex_point_size : vec4<f32>,
|
||||
@builtin(position)
|
||||
vertex_point_size_1 : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size_2 : f32,
|
||||
}
|
||||
|
||||
@@ -3816,7 +3816,7 @@ struct tint_symbol_2 {
|
||||
vertex_point_size : vec4<f32>,
|
||||
@builtin(position)
|
||||
vertex_point_size_1 : vec4<f32>,
|
||||
@builtin(pointsize)
|
||||
@builtin(point_size)
|
||||
vertex_point_size_2 : f32,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user