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
@@ -38,9 +38,9 @@ void init() {
|
||||
wgpuSwapChainConfigure(swapchain, swapChainFormat, WGPUTextureUsage_RenderAttachment, 640, 480);
|
||||
|
||||
const char* vs = R"(
|
||||
[[stage(vertex)]] fn main(
|
||||
[[builtin(vertex_index)]] VertexIndex : u32
|
||||
) -> [[builtin(position)]] vec4<f32> {
|
||||
@stage(vertex) fn main(
|
||||
@builtin(vertex_index) VertexIndex : u32
|
||||
) -> @builtin(position) vec4<f32> {
|
||||
var pos = array<vec2<f32>, 3>(
|
||||
vec2<f32>( 0.0, 0.5),
|
||||
vec2<f32>(-0.5, -0.5),
|
||||
@@ -51,7 +51,7 @@ void init() {
|
||||
WGPUShaderModule vsModule = utils::CreateShaderModule(device, vs).Release();
|
||||
|
||||
const char* fs = R"(
|
||||
[[stage(fragment)]] fn main() -> [[location(0)]] vec4<f32> {
|
||||
@stage(fragment) fn main() -> @location(0) vec4<f32> {
|
||||
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
})";
|
||||
WGPUShaderModule fsModule = utils::CreateShaderModule(device, fs).Release();
|
||||
|
||||
Reference in New Issue
Block a user