mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
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:
committed by
Dawn LUCI CQ
parent
c303bdf705
commit
2048d4f6ef
4
test/tint/bug/tint/1731.wgsl
Normal file
4
test/tint/bug/tint/1731.wgsl
Normal file
@@ -0,0 +1,4 @@
|
||||
fn g() {
|
||||
const a = vec3(vec3(1, 2, 3));
|
||||
const b = a.x << 40;
|
||||
}
|
||||
7
test/tint/bug/tint/1731.wgsl.expected.dxc.hlsl
Normal file
7
test/tint/bug/tint/1731.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,7 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void g() {
|
||||
}
|
||||
7
test/tint/bug/tint/1731.wgsl.expected.fxc.hlsl
Normal file
7
test/tint/bug/tint/1731.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,7 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void g() {
|
||||
}
|
||||
9
test/tint/bug/tint/1731.wgsl.expected.glsl
Normal file
9
test/tint/bug/tint/1731.wgsl.expected.glsl
Normal 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() {
|
||||
}
|
||||
|
||||
6
test/tint/bug/tint/1731.wgsl.expected.msl
Normal file
6
test/tint/bug/tint/1731.wgsl.expected.msl
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void g() {
|
||||
}
|
||||
|
||||
21
test/tint/bug/tint/1731.wgsl.expected.spvasm
Normal file
21
test/tint/bug/tint/1731.wgsl.expected.spvasm
Normal 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
|
||||
4
test/tint/bug/tint/1731.wgsl.expected.wgsl
Normal file
4
test/tint/bug/tint/1731.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,4 @@
|
||||
fn g() {
|
||||
const a = vec3(vec3(1, 2, 3));
|
||||
const b = (a.x << 40);
|
||||
}
|
||||
Reference in New Issue
Block a user