Skip to content

Commit

Permalink
Add the KHR suffix for OpExtInstWithForwardRefsKHR instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
arcady-lunarg committed Jun 6, 2024
1 parent 81f7045 commit 73eccd4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions SPIRV/SpvBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ Id Builder::makePointerDebugType(StorageClass storageClass, Id const baseType)
return type->getResultId();
}

// Emit a OpExtInstWithForwardRefs nonsemantic instruction for a pointer debug type
// Emit a OpExtInstWithForwardRefsKHR nonsemantic instruction for a pointer debug type
// where we don't have the pointee yet. Since we don't have the pointee yet, it just
// points to itself and we rely on patching it later.
Id Builder::makeForwardPointerDebugType(StorageClass storageClass)
Expand All @@ -1067,7 +1067,7 @@ Id Builder::makeForwardPointerDebugType(StorageClass storageClass)

this->addExtension(spv::E_SPV_KHR_relaxed_extended_instruction);

Instruction *type = new Instruction(getUniqueId(), makeVoidType(), OpExtInstWithForwardRefs);
Instruction *type = new Instruction(getUniqueId(), makeVoidType(), OpExtInstWithForwardRefsKHR);
type->addIdOperand(nonSemanticShaderDebugInfo);
type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypePointer);
type->addIdOperand(type->getResultId());
Expand Down
8 changes: 4 additions & 4 deletions SPIRV/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ const char* OpcodeString(int op)
case 4429: return "OpSubgroupAnyKHR";
case 4430: return "OpSubgroupAllEqualKHR";
case 4432: return "OpSubgroupReadInvocationKHR";
case 4433: return "OpExtInstWithForwardRefs";
case 4433: return "OpExtInstWithForwardRefsKHR";

case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR";
case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR";
Expand Down Expand Up @@ -1897,9 +1897,9 @@ void Parameterize()
InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");

InstructionDesc[OpExtInstWithForwardRefs].operands.push(OperandId, "'Set'");
InstructionDesc[OpExtInstWithForwardRefs].operands.push(OperandLiteralNumber, "'Instruction'");
InstructionDesc[OpExtInstWithForwardRefs].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
InstructionDesc[OpExtInstWithForwardRefsKHR].operands.push(OperandId, "'Set'");
InstructionDesc[OpExtInstWithForwardRefsKHR].operands.push(OperandLiteralNumber, "'Instruction'");
InstructionDesc[OpExtInstWithForwardRefsKHR].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");

InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
Expand Down
4 changes: 2 additions & 2 deletions SPIRV/spirv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ enum Op {
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpExtInstWithForwardRefsKHR = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down Expand Up @@ -2396,7 +2396,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
case OpExtInstWithForwardRefs: *hasResult = true; *hasResultType = true; break;
case OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break;
case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
Expand Down
2 changes: 1 addition & 1 deletion Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void main() {
17: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20
TypeForwardPointer 28 PhysicalStorageBufferEXT
29: 7(int) Constant 5349
30: 4 ExtInstWithForwardRefs 1(NonSemantic.Shader.DebugInfo.100) 3 48 29 12
30: 4 ExtInstWithForwardRefsKHR 1(NonSemantic.Shader.DebugInfo.100) 3 48 29 12
31(Mesh): TypeStruct 28
34: 7(int) Constant 9
35: 7(int) Constant 23
Expand Down
4 changes: 2 additions & 2 deletions known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools",
"commit": "6a2bdeee75eb35e5349c6993d33c9afe30237d79"
"commit": "ce46482db7ab3ea9c52fce832d27ca40b14f8e87"
},
{
"name" : "spirv-tools/external/spirv-headers",
"site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Headers",
"subdir" : "External/spirv-tools/external/spirv-headers",
"commit" : "ff2afc3afc48dff4eec2a10f0212402a80708e38"
"commit" : "eb49bb7b1136298b77945c52b4bbbc433f7885de"
},
{
"name": "googletest",
Expand Down

0 comments on commit 73eccd4

Please sign in to comment.