Skip to content

Commit c3b47c2

Browse files
ConvertUBOToPushConstantPass: do not fail on unknown pointer-producing opcodes
Log a warning and stop propagating on this path
1 parent bf3a482 commit c3b47c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Graphics/ShaderTools/src/ConvertUBOToPushConstant.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,12 @@ class ConvertUBOToPushConstantPass : public spvtools::opt::Pass
443443
default:
444444
// Unexpected pointer-producing instruction. This may indicate
445445
// a new SPIR-V extension or pattern not yet handled.
446-
UNEXPECTED("Unexpected instruction with pointer result type: opcode ", static_cast<uint32_t>(inst.opcode()));
446+
// Stop propagation on this path and log a warning.
447+
LOG_WARNING_MESSAGE("ConvertUBOToPushConstantPass: unhandled pointer-producing opcode ",
448+
static_cast<uint32_t>(inst.opcode()),
449+
" (", spvOpcodeString(inst.opcode()),
450+
"). Storage-class propagation stopped for this chain. "
451+
"If this causes issues, please report it to the developers.");
447452
return false;
448453
}
449454
}

0 commit comments

Comments
 (0)