Skip to content

Commit af91479

Browse files
baderdwoodwor-intel
authored andcommitted
Initialize work group size variables
Original commit: KhronosGroup/SPIRV-LLVM-Translator@1b8a007
1 parent d0bb906 commit af91479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm-spirv/lib/SPIRV/SPIRVWriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4511,15 +4511,15 @@ bool LLVMToSPIRVBase::transExecutionMode() {
45114511
break;
45124512
case spv::ExecutionModeLocalSize:
45134513
case spv::ExecutionModeLocalSizeHint: {
4514-
unsigned X, Y, Z;
4514+
unsigned X = 0, Y = 0, Z = 0;
45154515
N.get(X).get(Y).get(Z);
45164516
BF->addExecutionMode(BM->add(new SPIRVExecutionMode(
45174517
BF, static_cast<ExecutionMode>(EMode), X, Y, Z)));
45184518
} break;
45194519
case spv::ExecutionModeMaxWorkgroupSizeINTEL: {
45204520
if (BM->isAllowedToUseExtension(
45214521
ExtensionID::SPV_INTEL_kernel_attributes)) {
4522-
unsigned X, Y, Z;
4522+
unsigned X = 0, Y = 0, Z = 0;
45234523
N.get(X).get(Y).get(Z);
45244524
BF->addExecutionMode(BM->add(new SPIRVExecutionMode(
45254525
BF, static_cast<ExecutionMode>(EMode), X, Y, Z)));

0 commit comments

Comments
 (0)