mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
writer/hlsl: Emit zero values for private variables
Also remove the unreachanble constructor logic in EmitHandleVariable. Variables of the handle storage class cannot have initializers. Fixed: tint:173 Change-Id: I7c997a8b6a70308ff9b5c42fa1198810ee365bac Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55258 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
3b02d54ab0
commit
41f21fe05b
@@ -1,4 +1,4 @@
|
||||
static int I;
|
||||
static int I = 0;
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
|
||||
@@ -2,7 +2,7 @@ struct S {
|
||||
int i;
|
||||
};
|
||||
|
||||
static S V;
|
||||
static S V = {0};
|
||||
|
||||
void main_1() {
|
||||
int i = 0;
|
||||
|
||||
@@ -2,7 +2,7 @@ struct S {
|
||||
int i;
|
||||
};
|
||||
|
||||
static S V;
|
||||
static S V = {0};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static int I;
|
||||
static int I = 0;
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
|
||||
@@ -2,7 +2,7 @@ struct S {
|
||||
int i;
|
||||
};
|
||||
|
||||
static S V;
|
||||
static S V = {0};
|
||||
|
||||
void main_1() {
|
||||
V.i = 5;
|
||||
|
||||
Reference in New Issue
Block a user