mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
tint->dawn: Shuffle source tree in preperation of merging repos
docs/ -> docs/tint/ fuzzers/ -> src/tint/fuzzers/ samples/ -> src/tint/cmd/ src/ -> src/tint/ test/ -> test/tint/ BUG=tint:1418,tint:1433 Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
38f1e9c75c
commit
dbc13af287
7
test/tint/expressions/zero_init/struct/array.wgsl
Normal file
7
test/tint/expressions/zero_init/struct/array.wgsl
Normal file
@@ -0,0 +1,7 @@
|
||||
struct S {
|
||||
a : array<f32, 4>;
|
||||
};
|
||||
|
||||
fn f() {
|
||||
var v = S();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 310 es
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
struct S {
|
||||
float a[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
S v = S(float[4](0.0f, 0.0f, 0.0f, 0.0f));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
float a[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
S v = (S)0;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
struct S {
|
||||
tint_array_wrapper a;
|
||||
};
|
||||
|
||||
void f() {
|
||||
S v = {};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 15
|
||||
; 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 %f "f"
|
||||
OpName %S "S"
|
||||
OpMemberName %S 0 "a"
|
||||
OpName %v "v"
|
||||
OpMemberDecorate %S 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_4 ArrayStride 4
|
||||
%void = OpTypeVoid
|
||||
%1 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%S = OpTypeStruct %_arr_float_uint_4
|
||||
%12 = OpConstantNull %S
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%unused_entry_point = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %1
|
||||
%6 = OpLabel
|
||||
%v = OpVariable %_ptr_Function_S Function %12
|
||||
OpStore %v %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,7 @@
|
||||
struct S {
|
||||
a : array<f32, 4>;
|
||||
}
|
||||
|
||||
fn f() {
|
||||
var v = S();
|
||||
}
|
||||
10
test/tint/expressions/zero_init/struct/scalar.wgsl
Normal file
10
test/tint/expressions/zero_init/struct/scalar.wgsl
Normal file
@@ -0,0 +1,10 @@
|
||||
struct S {
|
||||
i : i32;
|
||||
u : u32;
|
||||
f : f32;
|
||||
b : bool;
|
||||
};
|
||||
|
||||
fn f() {
|
||||
var v = S();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#version 310 es
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
struct S {
|
||||
int i;
|
||||
uint u;
|
||||
float f;
|
||||
bool b;
|
||||
};
|
||||
|
||||
void f() {
|
||||
S v = S(0, 0u, 0.0f, false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int i;
|
||||
uint u;
|
||||
float f;
|
||||
bool b;
|
||||
};
|
||||
|
||||
void f() {
|
||||
S v = (S)0;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct S {
|
||||
int i;
|
||||
uint u;
|
||||
float f;
|
||||
bool b;
|
||||
};
|
||||
|
||||
void f() {
|
||||
S v = {};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 15
|
||||
; 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 %f "f"
|
||||
OpName %S "S"
|
||||
OpMemberName %S 0 "i"
|
||||
OpMemberName %S 1 "u"
|
||||
OpMemberName %S 2 "f"
|
||||
OpMemberName %S 3 "b"
|
||||
OpName %v "v"
|
||||
OpMemberDecorate %S 0 Offset 0
|
||||
OpMemberDecorate %S 1 Offset 4
|
||||
OpMemberDecorate %S 2 Offset 8
|
||||
OpMemberDecorate %S 3 Offset 12
|
||||
%void = OpTypeVoid
|
||||
%1 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%float = OpTypeFloat 32
|
||||
%bool = OpTypeBool
|
||||
%S = OpTypeStruct %int %uint %float %bool
|
||||
%12 = OpConstantNull %S
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%unused_entry_point = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %1
|
||||
%6 = OpLabel
|
||||
%v = OpVariable %_ptr_Function_S Function %12
|
||||
OpStore %v %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,10 @@
|
||||
struct S {
|
||||
i : i32;
|
||||
u : u32;
|
||||
f : f32;
|
||||
b : bool;
|
||||
}
|
||||
|
||||
fn f() {
|
||||
var v = S();
|
||||
}
|
||||
Reference in New Issue
Block a user