mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
wgsl: Replace use of [[attribute]] with @attribute
Bug: tint:1382 Change-Id: I58ad2c88fde1e7c96f2ae8257e6df924b94b61db Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/77660 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
facbc82d6c
commit
a9ca8cb4ab
@@ -66,14 +66,14 @@ void init() {
|
||||
scalar : f32;
|
||||
scalarOffset : f32;
|
||||
};
|
||||
[[group(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>;
|
||||
@location(0) v_color : vec4<f32>;
|
||||
@builtin(position) Position : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]] fn main([[builtin(vertex_index)]] 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),
|
||||
@@ -113,8 +113,7 @@ void init() {
|
||||
})");
|
||||
|
||||
wgpu::ShaderModule fsModule = utils::CreateShaderModule(device, R"(
|
||||
[[stage(fragment)]] fn main([[location(0)]] v_color : vec4<f32>)
|
||||
-> [[location(0)]] vec4<f32> {
|
||||
@stage(fragment) fn main(@location(0) v_color : vec4<f32>) -> @location(0) vec4<f32> {
|
||||
return v_color;
|
||||
})");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user