mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Fix overrides in array size.
This CL fixes the usage of overrides in array sizes. Currently the usage will generate a validation error as we check that the array size is const. Bug: tint:1660 Change-Id: Ibf440905c30a73b581d55b0c071b8621b61605e6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101900 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: dan sinclair <dsinclair@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
534a198f88
commit
78f8067fd5
5
test/tint/bug/tint/1660.wgsl
Normal file
5
test/tint/bug/tint/1660.wgsl
Normal file
@@ -0,0 +1,5 @@
|
||||
// flags: --transform substitute_override
|
||||
|
||||
override size = 2;
|
||||
|
||||
var<workgroup> a : array<f32, size>;
|
||||
6
test/tint/bug/tint/1660.wgsl.expected.dxc.hlsl
Normal file
6
test/tint/bug/tint/1660.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,6 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
groupshared float a[2];
|
||||
6
test/tint/bug/tint/1660.wgsl.expected.fxc.hlsl
Normal file
6
test/tint/bug/tint/1660.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,6 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
groupshared float a[2];
|
||||
7
test/tint/bug/tint/1660.wgsl.expected.glsl
Normal file
7
test/tint/bug/tint/1660.wgsl.expected.glsl
Normal file
@@ -0,0 +1,7 @@
|
||||
#version 310 es
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
shared float a[2];
|
||||
3
test/tint/bug/tint/1660.wgsl.expected.msl
Normal file
3
test/tint/bug/tint/1660.wgsl.expected.msl
Normal file
@@ -0,0 +1,3 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
24
test/tint/bug/tint/1660.wgsl.expected.spvasm
Normal file
24
test/tint/bug/tint/1660.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,24 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 11
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
|
||||
OpExecutionMode %unused_entry_point LocalSize 1 1 1
|
||||
OpName %a "a"
|
||||
OpName %unused_entry_point "unused_entry_point"
|
||||
OpDecorate %_arr_float_uint_2 ArrayStride 4
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%_ptr_Workgroup__arr_float_uint_2 = OpTypePointer Workgroup %_arr_float_uint_2
|
||||
%a = OpVariable %_ptr_Workgroup__arr_float_uint_2 Workgroup
|
||||
%void = OpTypeVoid
|
||||
%7 = OpTypeFunction %void
|
||||
%unused_entry_point = OpFunction %void None %7
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
3
test/tint/bug/tint/1660.wgsl.expected.wgsl
Normal file
3
test/tint/bug/tint/1660.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,3 @@
|
||||
const size = 2;
|
||||
|
||||
var<workgroup> a : array<f32, size>;
|
||||
Reference in New Issue
Block a user