[wgsl-reader] Remove explicit storage class from samplers/textures

Automatically set the storage class to UniformConstant.

Producing an error if an explicit storage class is given is deferred
until downstream users have caught up.

Bug: tint:332
Change-Id: I70e7390dc95d6f578a0fdeb675ca63a8b5b4fa26
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40160
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
This commit is contained in:
James Price
2021-02-04 18:26:00 +00:00
committed by Commit Bot service account
parent ef6eefdc8f
commit 0ff5e0bfb8
4 changed files with 80 additions and 21 deletions

View File

@@ -46,11 +46,11 @@ const c1 : bool = true;
var<uniform> g0 : u32 = 20u;
var<out> g1 : f32 = 123.0;
var<uniform> g2 : texture_2d<f32>;
var<uniform> g3 : [[access(read)]] texture_storage_2d<r32uint>;
var<uniform> g4 : [[access(write)]] texture_storage_2d<rg32float>;
var<uniform> g5 : [[access(read)]] texture_storage_2d<r32uint>;
var<uniform> g6 : [[access(write)]] texture_storage_2d<rg32float>;
var g2 : texture_2d<f32>;
var g3 : [[access(read)]] texture_storage_2d<r32uint>;
var g4 : [[access(write)]] texture_storage_2d<rg32float>;
var g5 : [[access(read)]] texture_storage_2d<r32uint>;
var g6 : [[access(write)]] texture_storage_2d<rg32float>;
[[builtin(position)]] var<uniform> g7 : vec3<f32>;
[[group(10), binding(20)]] var<storage> g7 : S;