mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add begin/end iterators for each section to ease iteration
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user