dawn-cmake/test/var/initialization/function/struct.wgsl.expected.hlsl
Ben Clayton 2bb45389b7 writer/hlsl: Zero initialize with (T) 0
For structures and arrays.
This behaves identically to the per-element zero-initialization, but can be significantly less verbose.

Change-Id: I380ef86f16c2b3f37a9de2820e707f368955b761
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56764
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-07-02 19:27:42 +00:00

12 lines
102 B
HLSL

struct S {
int a;
float b;
};
[numthreads(1, 1, 1)]
void main() {
S v = (S)0;
v;
return;
}