mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
writer/hlsl: Swizzle depth texture intrinsics
HLSL usually implicitly casts a vector down to a scalar, but this breaks when passing the vector to RWByteAddressBuffer.Store (for DXC only). Fixed: tint:827 Change-Id: I67d0bc6e9185de3d434a7aaeb575d83850111ec5 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55760 Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
9cae45e6ca
commit
c8434889d8
@@ -9,6 +9,6 @@ struct tint_symbol_1 {
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(tint_symbol_1 tint_symbol) {
|
||||
const uint3 GlobalInvocationId = tint_symbol.GlobalInvocationId;
|
||||
result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0), 0)));
|
||||
result.Store((4u * ((GlobalInvocationId.y * width) + GlobalInvocationId.x)), asuint(tex.Load(int3(int(GlobalInvocationId.x), int(GlobalInvocationId.y), 0), 0).x));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user