commit | 144ebed4c7ee7c6ecddeedfa81d607bbf256e8f2 | [log] [tgz] |
---|---|---|
author | Antonio Maiorano <amaiorano@google.com> | Tue Jan 30 16:30:15 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 30 16:30:15 2024 +0000 |
tree | 49a7e00c2498c573956bd66ce7891fb307f360ee | |
parent | 0880e0643379ff2535187662cb21a803ce974cfa [diff] [blame] |
tint/hlsl: widen scope of workaround of DXC bug with const structs/arrays Initial fix was not good enough: https://dawn-review.googlesource.com/c/dawn/+/156900 In HLSL, composite types are all treated the same: arrays, structs, vectors, and matrices. The bug happens when intializing a const variable of composite type with another composite type. Any dynamic writes to the rhs beforehand are ignored. To fix this, we simply will not emit 'const' for any lets. I've updated the upstream issue with these findings: https://github.com/microsoft/DirectXShaderCompiler/issues/5883 Bug: tint:2059 Bug: tint:2150 Change-Id: I1df1017ee130514b3f6564791d1679145d8b1e7e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/171880 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl index 5c89b92..7885929 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl
@@ -17,7 +17,7 @@ } tint_symbol vertex_main() { - const float4 inner_result = vertex_main_inner(); + float4 inner_result = vertex_main_inner(); tint_symbol wrapper_result = (tint_symbol)0; wrapper_result.value = inner_result; return wrapper_result;