Update WGSL vertex_idx i32 -> u32

Bug: dawn:572
Change-Id: I7d477481d06ffdfde6590c2297f2c3f5e704b044
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng 2020-11-26 00:02:35 +00:00 committed by Commit Bot service account
parent 2b606e9297
commit 9175f00eec
6 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ namespace dawn_native {
[[location(0)]] var<out> texCoord: vec2<f32>; [[location(0)]] var<out> texCoord: vec2<f32>;
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[binding(0), set(0)]] var<uniform> uniforms : Uniforms; [[binding(0), set(0)]] var<uniform> uniforms : Uniforms;
[[stage(vertex)]] [[stage(vertex)]]
fn main() -> void { fn main() -> void {

View File

@ -34,7 +34,7 @@ class ClipSpaceTest : public DawnTest {
vec3<f32>(-1.0, -1.0, 0.5), vec3<f32>(-1.0, -1.0, 0.5),
vec3<f32>( 1.0, -1.0, 0.0)); vec3<f32>( 1.0, -1.0, 0.0));
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[stage(vertex)]] fn main() -> void { [[stage(vertex)]] fn main() -> void {

View File

@ -30,7 +30,7 @@ class ColorStateTest : public DawnTest {
DawnTest::SetUp(); DawnTest::SetUp();
vsModule = utils::CreateShaderModuleFromWGSL(device, R"( vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[stage(vertex)]] fn main() -> void { [[stage(vertex)]] fn main() -> void {

View File

@ -143,7 +143,7 @@ class CompressedTextureBCFormatTest : public DawnTest {
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[location(0)]] var<out> texCoord : vec2 <f32>; [[location(0)]] var<out> texCoord : vec2 <f32>;
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[stage(vertex)]] fn main() -> void { [[stage(vertex)]] fn main() -> void {
const pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>( const pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(

View File

@ -34,7 +34,7 @@ class CullingTest : public DawnTest {
vec2<f32>( 1.0, 0.0), vec2<f32>( 1.0, 0.0),
vec2<f32>( 1.0, -1.0)); vec2<f32>( 1.0, -1.0));
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[stage(vertex)]] fn main() -> void { [[stage(vertex)]] fn main() -> void {

View File

@ -36,7 +36,7 @@ class DepthBiasTests : public DawnTest {
case QuadAngle::Flat: case QuadAngle::Flat:
// Draw a square at z = 0.25 // Draw a square at z = 0.25
vertexSource = R"( vertexSource = R"(
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[stage(vertex)]] fn main() -> void { [[stage(vertex)]] fn main() -> void {
const pos : array<vec2<f32>, 6> = array<vec2<f32>, 6>( const pos : array<vec2<f32>, 6> = array<vec2<f32>, 6>(
@ -54,7 +54,7 @@ class DepthBiasTests : public DawnTest {
case QuadAngle::TiltedX: case QuadAngle::TiltedX:
// Draw a square ranging from 0 to 0.5, bottom to top // Draw a square ranging from 0 to 0.5, bottom to top
vertexSource = R"( vertexSource = R"(
[[builtin(vertex_idx)]] var<in> VertexIndex : i32; [[builtin(vertex_idx)]] var<in> VertexIndex : u32;
[[builtin(position)]] var<out> Position : vec4<f32>; [[builtin(position)]] var<out> Position : vec4<f32>;
[[stage(vertex)]] fn main() -> void { [[stage(vertex)]] fn main() -> void {
const pos : array<vec3<f32>, 6> = array<vec3<f32>, 6>( const pos : array<vec3<f32>, 6> = array<vec3<f32>, 6>(