mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
tint/test-runner: Split expectations for FXC and DXC
Change tint's `--fxc` flag to take the path of the FXC compiler DLL. Have tint attempt to validate with both FXC and DXC if `--validate` is passed. Fix the 'dirsWithNoPassExpectations' logic which looks like it got broken with the tint -> dawn merge. It also incorrectly applied filepath.FromSlash() on windows. Change-Id: I0f46aa5c21bc48a2abc48402c41f846aff4a8633 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96800 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
0778d9a48f
commit
7d34de88f1
@@ -0,0 +1,70 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_6[4] = (int4[4])0;
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_7 = (S)0;
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_2_ret[4];
|
||||
tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr_1[i] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
int4 tint_symbol[4] = (int4[4])0;
|
||||
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol = tint_symbol_8;
|
||||
tint_symbol = src_param;
|
||||
tint_symbol = ret_arr();
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol = src_let;
|
||||
tint_symbol = src_function;
|
||||
tint_symbol = src_private;
|
||||
tint_symbol = src_workgroup;
|
||||
const S tint_symbol_1 = ret_struct_arr();
|
||||
tint_symbol = tint_symbol_1.arr;
|
||||
tint_symbol = tint_symbol_2(src_uniform, 0u);
|
||||
tint_symbol = tint_symbol_4(src_storage, 0u);
|
||||
int dst_nested[4][3][2] = (int[4][3][2])0;
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
dst_nested = src_nested;
|
||||
}
|
||||
70
test/tint/array/assign_to_private_var.wgsl.expected.fxc.hlsl
Normal file
70
test/tint/array/assign_to_private_var.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,70 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
static int4 tint_symbol[4] = (int4[4])0;
|
||||
static int dst_nested[4][3][2] = (int[4][3][2])0;
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_6[4] = (int4[4])0;
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_7 = (S)0;
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_2_ret[4];
|
||||
tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr_1[i] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol = tint_symbol_8;
|
||||
tint_symbol = src_param;
|
||||
tint_symbol = ret_arr();
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol = src_let;
|
||||
tint_symbol = src_function;
|
||||
tint_symbol = src_private;
|
||||
tint_symbol = src_workgroup;
|
||||
const S tint_symbol_1 = ret_struct_arr();
|
||||
tint_symbol = tint_symbol_1.arr;
|
||||
tint_symbol = tint_symbol_2(src_uniform, 0u);
|
||||
tint_symbol = tint_symbol_4(src_storage, 0u);
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
dst_nested = src_nested;
|
||||
}
|
||||
107
test/tint/array/assign_to_storage_var.wgsl.expected.fxc.hlsl
Normal file
107
test/tint/array/assign_to_storage_var.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,107 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
RWByteAddressBuffer tint_symbol : register(u2, space0);
|
||||
RWByteAddressBuffer dst_nested : register(u3, space0);
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_13[4] = (int4[4])0;
|
||||
return tint_symbol_13;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_14 = (S)0;
|
||||
return tint_symbol_14;
|
||||
}
|
||||
|
||||
void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, int4 value[4]) {
|
||||
int4 array[4] = value;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
buffer.Store4((offset + (i * 16u)), asuint(array[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_5_ret[4];
|
||||
tint_symbol_5_ret tint_symbol_5(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i_1 * 16u))) / 4;
|
||||
arr_1[i_1] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_7_ret[4];
|
||||
tint_symbol_7_ret tint_symbol_7(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
|
||||
arr_2[i_2] = asint(buffer.Load4((offset + (i_2 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int value[2]) {
|
||||
int array_3[2] = value;
|
||||
{
|
||||
[loop] for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
|
||||
buffer.Store((offset + (i_3 * 4u)), asuint(array_3[i_3]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, int value[3][2]) {
|
||||
int array_2[3][2] = value;
|
||||
{
|
||||
[loop] for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
|
||||
tint_symbol_11(buffer, (offset + (i_4 * 8u)), array_2[i_4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, int value[4][3][2]) {
|
||||
int array_1[4][3][2] = value;
|
||||
{
|
||||
[loop] for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
|
||||
tint_symbol_10(buffer, (offset + (i_5 * 24u)), array_1[i_5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
const int4 tint_symbol_15[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_15);
|
||||
tint_symbol_3(tint_symbol, 0u, src_param);
|
||||
const int4 tint_symbol_1[4] = ret_arr();
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_1);
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol_3(tint_symbol, 0u, src_let);
|
||||
tint_symbol_3(tint_symbol, 0u, src_function);
|
||||
tint_symbol_3(tint_symbol, 0u, src_private);
|
||||
tint_symbol_3(tint_symbol, 0u, src_workgroup);
|
||||
const S tint_symbol_2 = ret_struct_arr();
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_2.arr);
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_5(src_uniform, 0u));
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_7(src_storage, 0u));
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
tint_symbol_9(dst_nested, 0u, src_nested);
|
||||
}
|
||||
20
test/tint/array/assign_to_subexpr.wgsl.expected.fxc.hlsl
Normal file
20
test/tint/array/assign_to_subexpr.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,20 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int arr[4];
|
||||
};
|
||||
|
||||
void foo() {
|
||||
const int src[4] = (int[4])0;
|
||||
int tint_symbol[4] = (int[4])0;
|
||||
S dst_struct = (S)0;
|
||||
int dst_array[2][4] = (int[2][4])0;
|
||||
dst_struct.arr = src;
|
||||
dst_array[1] = src;
|
||||
tint_symbol = src;
|
||||
dst_struct.arr = src;
|
||||
dst_array[0] = src;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
groupshared int4 tint_symbol[4];
|
||||
groupshared int dst_nested[4][3][2];
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_6[4] = (int4[4])0;
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_7 = (S)0;
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_2_ret[4];
|
||||
tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr_1[i] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol = tint_symbol_8;
|
||||
tint_symbol = src_param;
|
||||
tint_symbol = ret_arr();
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol = src_let;
|
||||
tint_symbol = src_function;
|
||||
tint_symbol = src_private;
|
||||
tint_symbol = src_workgroup;
|
||||
const S tint_symbol_1 = ret_struct_arr();
|
||||
tint_symbol = tint_symbol_1.arr;
|
||||
tint_symbol = tint_symbol_2(src_uniform, 0u);
|
||||
tint_symbol = tint_symbol_4(src_storage, 0u);
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
dst_nested = src_nested;
|
||||
}
|
||||
22
test/tint/array/function_parameter.wgsl.expected.fxc.hlsl
Normal file
22
test/tint/array/function_parameter.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,22 @@
|
||||
float f1(float a[4]) {
|
||||
return a[3];
|
||||
}
|
||||
|
||||
float f2(float a[3][4]) {
|
||||
return a[2][3];
|
||||
}
|
||||
|
||||
float f3(float a[2][3][4]) {
|
||||
return a[1][2][3];
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float a1[4] = (float[4])0;
|
||||
const float a2[3][4] = (float[3][4])0;
|
||||
const float a3[2][3][4] = (float[2][3][4])0;
|
||||
const float v1 = f1(a1);
|
||||
const float v2 = f2(a2);
|
||||
const float v3 = f3(a3);
|
||||
return;
|
||||
}
|
||||
30
test/tint/array/function_return_type.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/array/function_return_type.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
typedef float f1_ret[4];
|
||||
f1_ret f1() {
|
||||
const float tint_symbol_5[4] = (float[4])0;
|
||||
return tint_symbol_5;
|
||||
}
|
||||
|
||||
typedef float f2_ret[3][4];
|
||||
f2_ret f2() {
|
||||
const float tint_symbol[4] = f1();
|
||||
const float tint_symbol_1[4] = f1();
|
||||
const float tint_symbol_2[4] = f1();
|
||||
const float tint_symbol_6[3][4] = {tint_symbol, tint_symbol_1, tint_symbol_2};
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
typedef float f3_ret[2][3][4];
|
||||
f3_ret f3() {
|
||||
const float tint_symbol_3[3][4] = f2();
|
||||
const float tint_symbol_4[3][4] = f2();
|
||||
const float tint_symbol_7[2][3][4] = {tint_symbol_3, tint_symbol_4};
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float a1[4] = f1();
|
||||
const float a2[3][4] = f2();
|
||||
const float a3[2][3][4] = f3();
|
||||
return;
|
||||
}
|
||||
9
test/tint/array/size.wgsl.expected.fxc.hlsl
Normal file
9
test/tint/array/size.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,9 @@
|
||||
void main() {
|
||||
float signed_literal[4] = (float[4])0;
|
||||
float unsigned_literal[4] = (float[4])0;
|
||||
float signed_constant[4] = (float[4])0;
|
||||
float unsigned_constant[4] = (float[4])0;
|
||||
signed_literal = unsigned_constant;
|
||||
signed_constant = unsigned_literal;
|
||||
return;
|
||||
}
|
||||
103
test/tint/array/strides.spvasm.expected.fxc.hlsl
Normal file
103
test/tint/array/strides.spvasm.expected.fxc.hlsl
Normal file
@@ -0,0 +1,103 @@
|
||||
struct strided_arr {
|
||||
float el;
|
||||
};
|
||||
struct strided_arr_1 {
|
||||
strided_arr el[3][2];
|
||||
};
|
||||
|
||||
RWByteAddressBuffer s : register(u0, space0);
|
||||
|
||||
strided_arr tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
const strided_arr tint_symbol_12 = {asfloat(buffer.Load((offset + 0u)))};
|
||||
return tint_symbol_12;
|
||||
}
|
||||
|
||||
typedef strided_arr tint_symbol_3_ret[2];
|
||||
tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) {
|
||||
strided_arr arr[2] = (strided_arr[2])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
arr[i] = tint_symbol_4(buffer, (offset + (i * 8u)));
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
typedef strided_arr tint_symbol_2_ret[3][2];
|
||||
tint_symbol_2_ret tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
|
||||
strided_arr arr_1[3][2] = (strided_arr[3][2])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 3u); i_1 = (i_1 + 1u)) {
|
||||
arr_1[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
strided_arr_1 tint_symbol_1(RWByteAddressBuffer buffer, uint offset) {
|
||||
const strided_arr_1 tint_symbol_13 = {tint_symbol_2(buffer, (offset + 0u))};
|
||||
return tint_symbol_13;
|
||||
}
|
||||
|
||||
typedef strided_arr_1 tint_symbol_ret[4];
|
||||
tint_symbol_ret tint_symbol(RWByteAddressBuffer buffer, uint offset) {
|
||||
strided_arr_1 arr_2[4] = (strided_arr_1[4])0;
|
||||
{
|
||||
[loop] for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
|
||||
arr_2[i_2] = tint_symbol_1(buffer, (offset + (i_2 * 128u)));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, strided_arr value) {
|
||||
buffer.Store((offset + 0u), asuint(value.el));
|
||||
}
|
||||
|
||||
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, strided_arr value[2]) {
|
||||
strided_arr array_2[2] = value;
|
||||
{
|
||||
[loop] for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
|
||||
tint_symbol_10(buffer, (offset + (i_3 * 8u)), array_2[i_3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, strided_arr value[3][2]) {
|
||||
strided_arr array_1[3][2] = value;
|
||||
{
|
||||
[loop] for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
|
||||
tint_symbol_9(buffer, (offset + (i_4 * 16u)), array_1[i_4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value) {
|
||||
tint_symbol_8(buffer, (offset + 0u), value.el);
|
||||
}
|
||||
|
||||
void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value[4]) {
|
||||
strided_arr_1 array[4] = value;
|
||||
{
|
||||
[loop] for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
|
||||
tint_symbol_7(buffer, (offset + (i_5 * 128u)), array[i_5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void f_1() {
|
||||
const strided_arr_1 x_19[4] = tint_symbol(s, 0u);
|
||||
const strided_arr x_24[3][2] = tint_symbol_2(s, 384u);
|
||||
const strided_arr x_28[2] = tint_symbol_3(s, 416u);
|
||||
const float x_32 = asfloat(s.Load(424u));
|
||||
const strided_arr_1 tint_symbol_14[4] = (strided_arr_1[4])0;
|
||||
tint_symbol_6(s, 0u, tint_symbol_14);
|
||||
s.Store(424u, asuint(5.0f));
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
f_1();
|
||||
return;
|
||||
}
|
||||
37
test/tint/array/type_constructor.wgsl.expected.fxc.hlsl
Normal file
37
test/tint/array/type_constructor.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,37 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const int x = 42;
|
||||
const int empty[4] = (int[4])0;
|
||||
const int nonempty[4] = {1, 2, 3, 4};
|
||||
const int nonempty_with_expr[4] = {1, x, (x + 1), nonempty[3]};
|
||||
const int nested_empty[2][3][4] = (int[2][3][4])0;
|
||||
const int tint_symbol[4] = {1, 2, 3, 4};
|
||||
const int tint_symbol_1[4] = {5, 6, 7, 8};
|
||||
const int tint_symbol_2[4] = {9, 10, 11, 12};
|
||||
const int tint_symbol_3[3][4] = {tint_symbol, tint_symbol_1, tint_symbol_2};
|
||||
const int tint_symbol_4[4] = {13, 14, 15, 16};
|
||||
const int tint_symbol_5[4] = {17, 18, 19, 20};
|
||||
const int tint_symbol_6[4] = {21, 22, 23, 24};
|
||||
const int tint_symbol_7[3][4] = {tint_symbol_4, tint_symbol_5, tint_symbol_6};
|
||||
const int nested_nonempty[2][3][4] = {tint_symbol_3, tint_symbol_7};
|
||||
const int tint_symbol_8[4] = {1, 2, x, (x + 1)};
|
||||
const int tint_symbol_9[4] = {5, 6, nonempty[2], (nonempty[3] + 1)};
|
||||
const int tint_symbol_10[3][4] = {tint_symbol_8, tint_symbol_9, nonempty};
|
||||
const int nested_nonempty_with_expr[2][3][4] = {tint_symbol_10, nested_nonempty[1]};
|
||||
const int tint_symbol_11[4] = (int[4])0;
|
||||
const int subexpr_empty = tint_symbol_11[1];
|
||||
const int tint_symbol_12[4] = {1, 2, 3, 4};
|
||||
const int subexpr_nonempty = tint_symbol_12[2];
|
||||
const int tint_symbol_13[4] = {1, x, (x + 1), nonempty[3]};
|
||||
const int subexpr_nonempty_with_expr = tint_symbol_13[2];
|
||||
const int tint_symbol_14[2][4] = (int[2][4])0;
|
||||
const int subexpr_nested_empty[4] = tint_symbol_14[1];
|
||||
const int tint_symbol_15[4] = {1, 2, 3, 4};
|
||||
const int tint_symbol_16[4] = {5, 6, 7, 8};
|
||||
const int tint_symbol_17[2][4] = {tint_symbol_15, tint_symbol_16};
|
||||
const int subexpr_nested_nonempty[4] = tint_symbol_17[1];
|
||||
const int tint_symbol_18[4] = {1, x, (x + 1), nonempty[3]};
|
||||
const int tint_symbol_19[2][4] = {tint_symbol_18, nested_nonempty[1][2]};
|
||||
const int subexpr_nested_nonempty_with_expr[4] = tint_symbol_19[1];
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user