Skip to content

Commit b42ff43

Browse files
committed
[FIX][Vulkan] Avoid default PrimType construction
1 parent d68923f commit b42ff43

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/backend/vulkan/codegen/ir_builder.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,11 @@ Value IRBuilder::GetBuiltInValue(spv::BuiltIn built_in, uint32_t index, const st
394394
}
395395
}
396396

397-
PrimType data_type;
398-
PrimType global_arr_type;
397+
PrimType data_type = PrimType::Int(32);
398+
PrimType global_arr_type = data_type.WithLanes(3);
399399
switch (built_in) {
400400
case spv::BuiltInLocalInvocationId:
401401
case spv::BuiltInWorkgroupId:
402-
data_type = PrimType::Int(32);
403-
global_arr_type = data_type.WithLanes(3);
404402
break;
405403

406404
default:

0 commit comments

Comments
 (0)