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:
Ben Clayton
2022-01-25 16:29:04 +00:00
committed by Dawn LUCI CQ
parent facbc82d6c
commit a9ca8cb4ab
101 changed files with 1307 additions and 1312 deletions

View File

@@ -97,17 +97,17 @@ void init() {
initTextures();
wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"(
[[stage(vertex)]] fn main([[location(0)]] pos : vec4<f32>)
-> [[builtin(position)]] vec4<f32> {
@stage(vertex) fn main(@location(0) pos : vec4<f32>)
-> @builtin(position) vec4<f32> {
return pos;
})");
wgpu::ShaderModule fsModule = utils::CreateShaderModule(device, R"(
[[group(0), binding(0)]] var mySampler: sampler;
[[group(0), binding(1)]] var myTexture : texture_2d<f32>;
@group(0) @binding(0) var mySampler: sampler;
@group(0) @binding(1) var myTexture : texture_2d<f32>;
[[stage(fragment)]] fn main([[builtin(position)]] FragCoord : vec4<f32>)
-> [[location(0)]] vec4<f32> {
@stage(fragment) fn main(@builtin(position) FragCoord : vec4<f32>)
-> @location(0) vec4<f32> {
return textureSample(myTexture, mySampler, FragCoord.xy / vec2<f32>(640.0, 480.0));
})");