Tint/HLSL: Don't pack level in coords for textureLoad on read-write storage textures
This patch sets pack_level_in_coords to false for textureLoad() on read-write
storage textures as mip levels aren't supported for RWTexture*D.load().
Without this patch when the HLSL shader with RWTexture*D.load() is compiled:
- Below warning will be reported by FXC:
warning X3206: 'Load': implicit truncation of vector type
- Below warning will be reported by DXC:
warning: implicit truncation of vector type [-Wconversion]
This patch also updates the tint end2end tests by running ./test/run-all.sh with
"--generate-expected".
Bug: dawn:1972
Change-Id: I7a28b73a214d1363bec0b301b1d0d11ede026d37
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/159920
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.fxc.hlsl
index 8d19706..f793c7b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/a3733f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0, space2);
void textureLoad_a3733f() {
- uint4 res = arg_0.Load(int3((1).xx, 0));
+ uint4 res = arg_0.Load(int2((1).xx));
prevent_dce.Store4(0u, asuint(res));
}