mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +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
@@ -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));
|
||||
})");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user