mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
wgsl: Remove [[access]] and [[offset]] decorations
These have been deprecated, and their usages in Dawn, CTS and samples have been updated. Fixed: tint:846 Change-Id: I74b831fd5be2e7ca02e8208835eac8beddcef9af Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54325 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
@@ -5,4 +5,4 @@ struct Light {
|
||||
[[block]] struct Lights {
|
||||
light : [[stride(32)]] array<Light>;
|
||||
};
|
||||
[[set(0), binding(1)]] var<storage> lights : [[access(read)]] Lights;
|
||||
[[set(0), binding(1)]] var<storage, read> lights : Lights;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/294.wgsl:8:24 warning: use of deprecated language feature: declare access with var<storage, read> instead of using [[access]] decoration
|
||||
[[set(0), binding(1)]] var<storage> lights : [[access(read)]] Lights;
|
||||
^^^
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/294.wgsl:8:24 warning: use of deprecated language feature: declare access with var<storage, read> instead of using [[access]] decoration
|
||||
[[set(0), binding(1)]] var<storage> lights : [[access(read)]] Lights;
|
||||
^^^
|
||||
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/294.wgsl:8:24 warning: use of deprecated language feature: declare access with var<storage, read> instead of using [[access]] decoration
|
||||
[[set(0), binding(1)]] var<storage> lights : [[access(read)]] Lights;
|
||||
^^^
|
||||
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/294.wgsl:8:24 warning: use of deprecated language feature: declare access with var<storage, read> instead of using [[access]] decoration
|
||||
[[set(0), binding(1)]] var<storage> lights : [[access(read)]] Lights;
|
||||
^^^
|
||||
|
||||
struct Light {
|
||||
position : vec3<f32>;
|
||||
colour : vec3<f32>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[group(0), binding(0)]] var Src : [[access(read)]] texture_storage_2d<r32uint>;
|
||||
[[group(0), binding(1)]] var Dst : [[access(write)]] texture_storage_2d<r32uint>;
|
||||
[[group(0), binding(0)]] var Src : texture_storage_2d<r32uint, read>;
|
||||
[[group(0), binding(1)]] var Dst : texture_storage_2d<r32uint, write>;
|
||||
|
||||
[[stage(compute)]]
|
||||
fn main() {
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
bug/tint/453.wgsl:1:79 warning: use of deprecated language feature: access control is expected as last parameter of storage textures
|
||||
[[group(0), binding(0)]] var Src : [[access(read)]] texture_storage_2d<r32uint>;
|
||||
^
|
||||
|
||||
bug/tint/453.wgsl:2:80 warning: use of deprecated language feature: access control is expected as last parameter of storage textures
|
||||
[[group(0), binding(1)]] var Dst : [[access(write)]] texture_storage_2d<r32uint>;
|
||||
^
|
||||
|
||||
Texture2D<uint4> Src : register(t0, space0);
|
||||
RWTexture2D<uint4> Dst : register(u1, space0);
|
||||
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
bug/tint/453.wgsl:1:79 warning: use of deprecated language feature: access control is expected as last parameter of storage textures
|
||||
[[group(0), binding(0)]] var Src : [[access(read)]] texture_storage_2d<r32uint>;
|
||||
^
|
||||
|
||||
bug/tint/453.wgsl:2:80 warning: use of deprecated language feature: access control is expected as last parameter of storage textures
|
||||
[[group(0), binding(1)]] var Dst : [[access(write)]] texture_storage_2d<r32uint>;
|
||||
^
|
||||
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
bug/tint/453.wgsl:1:79 warning: use of deprecated language feature: access control is expected as last parameter of storage textures
|
||||
[[group(0), binding(0)]] var Src : [[access(read)]] texture_storage_2d<r32uint>;
|
||||
^
|
||||
|
||||
bug/tint/453.wgsl:2:80 warning: use of deprecated language feature: access control is expected as last parameter of storage textures
|
||||
[[group(0), binding(1)]] var Dst : [[access(write)]] texture_storage_2d<r32uint>;
|
||||
^
|
||||
|
||||
[[group(0), binding(0)]] var Src : texture_storage_2d<r32uint, read>;
|
||||
|
||||
[[group(0), binding(1)]] var Dst : texture_storage_2d<r32uint, write>;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
[[block]] struct Constants {
|
||||
[[offset(0)]] level : i32;
|
||||
level : i32;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<uniform> constants : Constants;
|
||||
[[group(0), binding(1)]] var myTexture : texture_2d_array<f32>;
|
||||
|
||||
[[block]] struct Result {
|
||||
[[offset(0)]] values : [[stride(4)]] array<f32>;
|
||||
values : [[stride(4)]] array<f32>;
|
||||
};
|
||||
[[group(0), binding(3)]] var<storage, read_write> result : Result;
|
||||
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
bug/tint/757.wgsl:3:5 warning: use of deprecated language feature: [[offset]] has been replaced with [[size]] and [[align]]
|
||||
[[offset(0)]] level : i32;
|
||||
^^^^^^
|
||||
|
||||
bug/tint/757.wgsl:10:5 warning: use of deprecated language feature: [[offset]] has been replaced with [[size]] and [[align]]
|
||||
[[offset(0)]] values : [[stride(4)]] array<f32>;
|
||||
^^^^^^
|
||||
|
||||
struct Constants {
|
||||
int level;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
bug/tint/757.wgsl:3:5 warning: use of deprecated language feature: [[offset]] has been replaced with [[size]] and [[align]]
|
||||
[[offset(0)]] level : i32;
|
||||
^^^^^^
|
||||
|
||||
bug/tint/757.wgsl:10:5 warning: use of deprecated language feature: [[offset]] has been replaced with [[size]] and [[align]]
|
||||
[[offset(0)]] values : [[stride(4)]] array<f32>;
|
||||
^^^^^^
|
||||
|
||||
[[block]]
|
||||
struct Constants {
|
||||
level : i32;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
let width : u32 = 128u;
|
||||
|
||||
[[group(0), binding(0)]] var tex : texture_depth_2d;
|
||||
[[group(0), binding(1)]] var<storage> result : [[access(read_write)]] Result;
|
||||
[[group(0), binding(1)]] var<storage, read_write> result : Result;
|
||||
|
||||
[[stage(compute)]] fn main(
|
||||
[[builtin(global_invocation_id)]] GlobalInvocationId : vec3<u32>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/827.wgsl:8:26 warning: use of deprecated language feature: declare access with var<storage, read_write> instead of using [[access]] decoration
|
||||
[[group(0), binding(1)]] var<storage> result : [[access(read_write)]] Result;
|
||||
^^^
|
||||
|
||||
static const uint width = 128u;
|
||||
Texture2D tex : register(t0, space0);
|
||||
RWByteAddressBuffer result : register(u1, space0);
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/827.wgsl:8:26 warning: use of deprecated language feature: declare access with var<storage, read_write> instead of using [[access]] decoration
|
||||
[[group(0), binding(1)]] var<storage> result : [[access(read_write)]] Result;
|
||||
^^^
|
||||
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
bug/tint/827.wgsl:8:26 warning: use of deprecated language feature: declare access with var<storage, read_write> instead of using [[access]] decoration
|
||||
[[group(0), binding(1)]] var<storage> result : [[access(read_write)]] Result;
|
||||
^^^
|
||||
|
||||
[[block]]
|
||||
struct Result {
|
||||
values : array<f32>;
|
||||
|
||||
Reference in New Issue
Block a user