mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-11 06:27:54 +00:00
Resolver: Enforce vector constructor type rules
Added enforcement for vector constructor type rules according to the table in https://gpuweb.github.io/gpuweb/wgsl.html#type-constructor-expr. This surfaced a number of existing tests that violated some of these rules or had a type-declaration related bug, so this CL fixes those as well (these tests either passed the incorrect number of arguments to a vector constructor or relied on implicit conversions between numeric types). Fixed: tint:632 Fixed: tint:476 Change-Id: I8279be3eeae50b64db486ee7a91a43bd94fdff62 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44480 Commit-Queue: Arman Uguray <armansito@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
2f9ced0341
commit
3549e2ea8c
@@ -108,7 +108,7 @@ struct Uniforms {
|
||||
[[stage(vertex)]]
|
||||
fn main() -> void {
|
||||
const transform : mat2x2<f32> = ubo.transform;
|
||||
var coord : array<vec2<f32>, 3> = array<vec2<f32>, 3>(
|
||||
var coord : vec2<f32> = array<vec2<f32>, 3>(
|
||||
vec2<f32>(-1.0, 1.0),
|
||||
vec2<f32>( 1.0, 1.0),
|
||||
vec2<f32>(-1.0, -1.0)
|
||||
@@ -133,7 +133,7 @@ struct Uniforms {
|
||||
fn main() -> void {
|
||||
const transform : mat2x2<f32> = ubo.transform;
|
||||
const tint_symbol_1 : array<vec2<f32>, 3> = array<vec2<f32>, 3>(vec2<f32>(-1.0, 1.0), vec2<f32>(1.0, 1.0), vec2<f32>(-1.0, -1.0));
|
||||
var coord : array<vec2<f32>, 3> = tint_symbol_1[vertex_index];
|
||||
var coord : vec2<f32> = tint_symbol_1[vertex_index];
|
||||
position = vec4<f32>((transform * coord), 0.0, 1.0);
|
||||
}
|
||||
)";
|
||||
|
||||
Reference in New Issue
Block a user