mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Propagate command line arguments from DebugEntryPoint
This commit is contained in:
@@ -597,6 +597,7 @@ void Reflector::RegisterOp(Iter it)
|
||||
else if(dbg.inst == ShaderDbg::EntryPoint)
|
||||
{
|
||||
funcToBaseFile[dbg.arg<Id>(0)] = compUnitToFileIndex[dbg.arg<Id>(1)];
|
||||
funcToCmdLine[dbg.arg<Id>(0)] = strings[dbg.arg<Id>(3)];
|
||||
}
|
||||
else if(dbg.inst == ShaderDbg::GlobalVariable)
|
||||
{
|
||||
@@ -831,9 +832,6 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
reflection.dispatchThreadsDimension[2] = 0;
|
||||
}
|
||||
|
||||
if(!cmdline.empty())
|
||||
reflection.debugInfo.compileFlags.flags = {{"@cmdline", cmdline}};
|
||||
|
||||
for(size_t i = 0; i < sources.size(); i++)
|
||||
{
|
||||
switch(sources[i].lang)
|
||||
@@ -866,6 +864,15 @@ void Reflector::MakeReflection(const GraphicsAPI sourceAPI, const ShaderStage st
|
||||
reflection.debugInfo.editBaseFile = (int32_t)it->second;
|
||||
}
|
||||
|
||||
if(!cmdline.empty())
|
||||
reflection.debugInfo.compileFlags.flags = {{"@cmdline", cmdline}};
|
||||
|
||||
{
|
||||
auto it = funcToCmdLine.find(entry->id);
|
||||
if(it != funcToCmdLine.end())
|
||||
reflection.debugInfo.compileFlags.flags = {{"@cmdline", it->second}};
|
||||
}
|
||||
|
||||
PreprocessLineDirectives(reflection.debugInfo.files);
|
||||
|
||||
// we do a mini-preprocess of the files from the debug info to handle #line directives.
|
||||
|
||||
@@ -131,6 +131,7 @@ private:
|
||||
SparseIdMap<size_t> debugSources;
|
||||
SparseIdMap<size_t> compUnitToFileIndex;
|
||||
SparseIdMap<size_t> funcToBaseFile;
|
||||
SparseIdMap<rdcstr> funcToCmdLine;
|
||||
SparseIdMap<LineColumnInfo> debugFuncToLocation;
|
||||
SparseIdMap<LineColumnInfo> funcToLocation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user