writer[spirv,hlsl]: Call UnwrapRef() for splats

The TypeConstructorExpression logic that tested for splats was not considering references. This led to broken emission for the SPIR-V and HLSL backends.

Fixed: tint:992
Change-Id: I9824b71f526997f91d380c09b459f4fd73065b19
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58397
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2021-07-18 15:41:25 +00:00
committed by Tint LUCI CQ
parent 76feb6b626
commit 595b0547d4
29 changed files with 527 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
fn f() {
var v = true || false;
var v2 : vec2<bool> = vec2<bool>(v);
var v3 : vec3<bool> = vec3<bool>(v);
var v4 : vec4<bool> = vec4<bool>(v);
}