mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 03:30:06 +00:00
parent
e2e95172df
commit
c0e9807094
@ -59,6 +59,8 @@ Pass::Status GenerateWebGPUInitializersPass::Process() {
|
||||
changed = true;
|
||||
|
||||
auto* constant_inst = GetNullConstantForVariable(inst);
|
||||
if (!constant_inst) return Status::Failure;
|
||||
|
||||
if (seen_null_constants_.find(constant_inst) ==
|
||||
seen_null_constants_.end()) {
|
||||
constant_inst->InsertBefore(inst);
|
||||
|
Loading…
Reference in New Issue
Block a user