mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-16 18:56:58 +00:00
Add shader's ID and entry point to the shader reflection struct
* This allows better identification of a shader from its reflection bundle. The entry point was already 'optionally' in the debug info struct which is no longer a great location for it. * For APIs where the entry point isn't contractual and it might not be listed, instead we just fall back to 'main'. This means that the UI or anyone fetching the info can be guaranteed that some sensible entry point will be listed. * Also for the debug info, remove the 'entryFile' index and instead just guarantee that as much as possible the entry point will be in the first file in the list.
This commit is contained in:
1 parent
c2b0c2d7d8
commit
bdf2a68c71
26 files changed
+298
-256
No files matched your search
@@ -531,9 +531,9 @@ bool PipelineStateViewer::PrepareShaderEditing(const ShaderReflection *shaderDet
|
||||
QString &entryFunc, QStringMap &files,
|
||||
QString &mainfile)
|
||||
{
|
||||
if(!shaderDetails->DebugInfo.entryFunc.empty() && !shaderDetails->DebugInfo.files.empty())
|
||||
if(!shaderDetails->DebugInfo.files.empty())
|
||||
{
|
||||
entryFunc = ToQStr(shaderDetails->DebugInfo.entryFunc);
|
||||
entryFunc = ToQStr(shaderDetails->EntryPoint);
|
||||
|
||||
QStringList uniqueFiles;
|
||||
|
||||
@@ -550,11 +550,7 @@ bool PipelineStateViewer::PrepareShaderEditing(const ShaderReflection *shaderDet
|
||||
files[filename] = ToQStr(s.second);
|
||||
}
|
||||
|
||||
int entryFile = shaderDetails->DebugInfo.entryFile;
|
||||
if(entryFile < 0 || entryFile >= shaderDetails->DebugInfo.files.count)
|
||||
entryFile = 0;
|
||||
|
||||
mainfile = ToQStr(shaderDetails->DebugInfo.files[entryFile].first);
|
||||
mainfile = ToQStr(shaderDetails->DebugInfo.files[0].first);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user