mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
writer/hlsl: Zero-initialize var declarations
Don't construct these with undefined values Change-Id: I6225d9be0973ebc1a8594526aa32ec6775b5e865 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51300 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
bb3d963405
commit
6aa5a92a10
@@ -1,6 +1,6 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float3x3 m;
|
||||
float3x3 m = float3x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
const float3 v = m[1];
|
||||
const float f = v[1];
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float3 v;
|
||||
float3 v = float3(0.0f, 0.0f, 0.0f);
|
||||
const float scalar = v.y;
|
||||
const float2 swizzle2 = v.xz;
|
||||
const float3 swizzle3 = v.xzy;
|
||||
|
||||
Reference in New Issue
Block a user