diff --git a/renderdoc/driver/shaders/spirv/spirv_editor.cpp b/renderdoc/driver/shaders/spirv/spirv_editor.cpp index d39ed4e8c..c91859173 100644 --- a/renderdoc/driver/shaders/spirv/spirv_editor.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_editor.cpp @@ -312,21 +312,36 @@ SPIRVIterator SPIRVEditor::GetEntry(SPIRVId id) return SPIRVIterator(); } -SPIRVIterator SPIRVEditor::GetDebugInstructions() +SPIRVIterator SPIRVEditor::BeginDebug() { return SPIRVIterator(spirv, debugSection.startOffset); } -SPIRVIterator SPIRVEditor::GetDecorationInstructions() +SPIRVIterator SPIRVEditor::BeginDecorations() { return SPIRVIterator(spirv, decorationSection.startOffset); } -SPIRVIterator SPIRVEditor::GetTypeInstructions() +SPIRVIterator SPIRVEditor::BeginTypes() { return SPIRVIterator(spirv, typeVarSection.startOffset); } +SPIRVIterator SPIRVEditor::EndDebug() +{ + return SPIRVIterator(spirv, debugSection.endOffset); +} + +SPIRVIterator SPIRVEditor::EndDecorations() +{ + return SPIRVIterator(spirv, decorationSection.endOffset); +} + +SPIRVIterator SPIRVEditor::EndTypes() +{ + return SPIRVIterator(spirv, typeVarSection.endOffset); +} + SPIRVId SPIRVEditor::DeclareType(const SPIRVVoid &) { if(voidType) diff --git a/renderdoc/driver/shaders/spirv/spirv_editor.h b/renderdoc/driver/shaders/spirv/spirv_editor.h index 8c078fc31..47b9b13fd 100644 --- a/renderdoc/driver/shaders/spirv/spirv_editor.h +++ b/renderdoc/driver/shaders/spirv/spirv_editor.h @@ -326,9 +326,12 @@ public: // the entry point has 'two' opcodes, the entrypoint declaration and the function. // This returns the first, GetID returns the second. SPIRVIterator GetEntry(SPIRVId id); - SPIRVIterator GetDebugInstructions(); - SPIRVIterator GetDecorationInstructions(); - SPIRVIterator GetTypeInstructions(); + SPIRVIterator BeginDebug(); + SPIRVIterator BeginDecorations(); + SPIRVIterator BeginTypes(); + SPIRVIterator EndDebug(); + SPIRVIterator EndDecorations(); + SPIRVIterator EndTypes(); // fetches the id of this type. If it exists already the old ID will be returned, otherwise it // will be declared and the new ID returned