diff --git a/renderdoc/driver/shaders/dxil/dxil_bytecode.h b/renderdoc/driver/shaders/dxil/dxil_bytecode.h index 4f6759d69..aa04aebce 100644 --- a/renderdoc/driver/shaders/dxil/dxil_bytecode.h +++ b/renderdoc/driver/shaders/dxil/dxil_bytecode.h @@ -1280,6 +1280,8 @@ public: rdcarray GetEntryPoints(); void FillEntryPointInterfaces(); rdcstr GetResourceReferenceName(ResourceClass resClass, const BindingSlot &slot) const; + // false means stop processing + void ProcessFunctions(std::function callback) const; void FillRayPayloads( Program *executable, rdcflatmap> diff --git a/renderdoc/driver/shaders/dxil/dxil_reflect.cpp b/renderdoc/driver/shaders/dxil/dxil_reflect.cpp index 71d9eb36b..abfbf33d7 100644 --- a/renderdoc/driver/shaders/dxil/dxil_reflect.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_reflect.cpp @@ -1758,4 +1758,14 @@ const ResourceReference *Program::GetResourceReference(const rdcstr &handleStr) return NULL; } +void Program::ProcessFunctions(std::function callback) const +{ + for(const DXIL::Function *f : m_Functions) + { + // false means stop processing + if(!callback(f)) + break; + } +} + }; // namespace DXIL