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:
Ben Clayton
2021-06-21 19:37:58 +00:00
committed by Tint LUCI CQ
parent 3b02d54ab0
commit 41f21fe05b
28 changed files with 46 additions and 53 deletions

View File

@@ -5,12 +5,12 @@ struct QuicksortObject {
tint_array_wrapper numbers;
};
static QuicksortObject obj;
static float4 gl_FragCoord;
static QuicksortObject obj = {{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}};
static float4 gl_FragCoord = float4(0.0f, 0.0f, 0.0f, 0.0f);
cbuffer cbuffer_x_188 : register(b0, space0) {
uint4 x_188[1];
};
static float4 x_GLF_color;
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void swap_i1_i1_(inout int i, inout int j) {
int temp = 0;