Tint/E2E: Fix testcases for bug/chromium/1367602

This CL rearranges testcases for E2E test/tint/bug/chromium/1367602,
now it has testcases for both function, private, and storage address
space array variable, with and without explicit initializer, and array
count less than 65536.

Bug: chromium:1367602
Change-Id: Ica0ec9c36586bc7eae0d46473575284e9b734092
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105282
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
Zhaoming Jiang 2022-10-14 02:50:38 +00:00 committed by Dawn LUCI CQ
parent 771c14c405
commit 32718a5527
36 changed files with 150 additions and 6 deletions

View File

@ -1,6 +0,0 @@
SKIP: FAILED
bug/chromium/1367602-1.wgsl:2:23 error: array size (65536) must be less than 65536
var v = array<bool, 65536>();
^^^^^

View File

@ -0,0 +1,8 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
void f() {
bool v[65535] = (bool[65535])0;
}

View File

@ -0,0 +1,3 @@
var<private> v = array<bool, 65535>();
fn f() {}

View File

@ -0,0 +1,9 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
static bool v[65535] = (bool[65535])0;
void f() {
}

View File

@ -0,0 +1,9 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
static bool v[65535] = (bool[65535])0;
void f() {
}

File diff suppressed because one or more lines are too long

View File

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

View File

@ -0,0 +1,30 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 14
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %f "f"
OpDecorate %_arr_bool_uint_65535 ArrayStride 4
%bool = OpTypeBool
%uint = OpTypeInt 32 0
%uint_65535 = OpConstant %uint 65535
%_arr_bool_uint_65535 = OpTypeArray %bool %uint_65535
%5 = OpConstantNull %_arr_bool_uint_65535
%_ptr_Private__arr_bool_uint_65535 = OpTypePointer Private %_arr_bool_uint_65535
%v = OpVariable %_ptr_Private__arr_bool_uint_65535 Private %5
%void = OpTypeVoid
%8 = OpTypeFunction %void
%unused_entry_point = OpFunction %void None %8
%11 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %8
%13 = OpLabel
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,4 @@
var<private> v = array<bool, 65535>();
fn f() {
}

View File

@ -0,0 +1,3 @@
var<private> v : array<bool, 65535>;
fn f() {}

View File

@ -0,0 +1,9 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
static bool v[65535] = (bool[65535])0;
void f() {
}

View File

@ -0,0 +1,9 @@
[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
static bool v[65535] = (bool[65535])0;
void f() {
}

File diff suppressed because one or more lines are too long

View File

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

View File

@ -0,0 +1,30 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 14
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %f "f"
OpDecorate %_arr_bool_uint_65535 ArrayStride 4
%bool = OpTypeBool
%uint = OpTypeInt 32 0
%uint_65535 = OpConstant %uint 65535
%_arr_bool_uint_65535 = OpTypeArray %bool %uint_65535
%_ptr_Private__arr_bool_uint_65535 = OpTypePointer Private %_arr_bool_uint_65535
%7 = OpConstantNull %_arr_bool_uint_65535
%v = OpVariable %_ptr_Private__arr_bool_uint_65535 Private %7
%void = OpTypeVoid
%8 = OpTypeFunction %void
%unused_entry_point = OpFunction %void None %8
%11 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %8
%13 = OpLabel
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,4 @@
var<private> v : array<bool, 65535>;
fn f() {
}