Remove all use of deprecated tint APIs and WGSL syntax

Tint:
* Use the new transform::VertexFormat enum names

WGSL:
* The [[set(n)]] decoration is now [[group(n)]]
* [[builtin(vertex_idx)]] is now [[builtin(vertex_index)]]

Change-Id: I9cbf1368074488c4bb7fa81430bb12ec7581c1fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2021-06-30 11:33:04 +00:00
committed by Dawn LUCI CQ
parent 1ce20bf5cf
commit bf832f07d6
6 changed files with 49 additions and 49 deletions

View File

@@ -65,14 +65,14 @@ void init() {
scalar : f32;
scalarOffset : f32;
};
[[set(0), binding(0)]] var<uniform> c : Constants;
[[group(0), binding(0)]] var<uniform> c : Constants;
struct VertexOut {
[[location(0)]] v_color : vec4<f32>;
[[builtin(position)]] Position : vec4<f32>;
};
[[stage(vertex)]] fn main([[builtin(vertex_idx)]] VertexIndex : u32) -> VertexOut {
[[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOut {
var positions : array<vec4<f32>, 3> = array<vec4<f32>, 3>(
vec4<f32>( 0.0, 0.1, 0.0, 1.0),
vec4<f32>(-0.1, -0.1, 0.0, 1.0),