Commit 534d015d by Ben Clayton

Vulkan/Debug: Create a PhysicalFile if DebugSource has no content

`VirtualFile`s are typically used for files with no physical backing. Use `PhysicalFile` if there's no content provided in the debug info. Bug: b/148401179 Change-Id: I1e1ed75ce9a9fb0965420267aba7f6d8de958012 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43430Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 13f0ff7d
......@@ -1046,11 +1046,16 @@ void SpirvShader::Impl::Debugger::process(const SpirvShader *shader, const InsnI
if(insn.wordCount() > 6)
{
source->source = shader->getString(insn.word(6));
auto file = dbg->ctx->lock().createVirtualFile(source->file.c_str(), source->source.c_str());
source->dbgFile = file;
files.emplace(source->file.c_str(), file);
}
else
{
auto file = dbg->ctx->lock().createPhysicalFile(source->file.c_str());
source->dbgFile = file;
files.emplace(source->file.c_str(), file);
}
auto file = dbg->ctx->lock().createVirtualFile(source->file.c_str(), source->source.c_str());
source->dbgFile = file;
files.emplace(source->file.c_str(), file);
});
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment