tint: fix identity initializer of vec from vec of abstract not remaining abstract

For "vec3(vec3<T>) -> vec3<T>", this CL makes T also include abstract
int and float (all scalars).

Bug: tint:1731
Change-Id: I776c7ba6872c3d680982dbec6b0970389e720611
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107540
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Antonio Maiorano
2022-10-28 15:58:38 +00:00
committed by Dawn LUCI CQ
parent c303bdf705
commit 2048d4f6ef
10 changed files with 4664 additions and 4593 deletions

View File

@@ -0,0 +1,4 @@
fn g() {
const a = vec3(vec3(1, 2, 3));
const b = a.x << 40;
}

View File

@@ -0,0 +1,7 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
void g() {
}

View File

@@ -0,0 +1,7 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
void g() {
}

View File

@@ -0,0 +1,9 @@
#version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void unused_entry_point() {
return;
}
void g() {
}

View File

@@ -0,0 +1,6 @@
#include <metal_stdlib>
using namespace metal;
void g() {
}

View File

@@ -0,0 +1,21 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 7
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %unused_entry_point "unused_entry_point"
OpName %g "g"
%void = OpTypeVoid
%1 = OpTypeFunction %void
%unused_entry_point = OpFunction %void None %1
%4 = OpLabel
OpReturn
OpFunctionEnd
%g = OpFunction %void None %1
%6 = OpLabel
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,4 @@
fn g() {
const a = vec3(vec3(1, 2, 3));
const b = (a.x << 40);
}