mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 23:16:31 +00:00
Require explicit debug information to support source debugging
* SPIR-V files currently can have source files, but not source debugging information, which is a distinction that didn't exist otherwise.
This commit is contained in:
@@ -542,10 +542,10 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
ui->floatView->hide();
|
||||
}
|
||||
|
||||
if(m_ShaderDetails->debugInfo.files.isEmpty())
|
||||
if(!m_ShaderDetails->debugInfo.sourceDebugInformation)
|
||||
{
|
||||
ui->debugToggle->setEnabled(false);
|
||||
ui->debugToggle->setText(tr("Source Unavailable"));
|
||||
ui->debugToggle->setText(tr("Source debugging Unavailable"));
|
||||
}
|
||||
|
||||
ui->debugVars->setColumns({tr("Name"), tr("Value")});
|
||||
|
||||
@@ -1298,6 +1298,10 @@ functionality
|
||||
)");
|
||||
bool debuggable = true;
|
||||
|
||||
DOCUMENT(R"(Indicates whether this shader has debug information to allow source-level debugging.
|
||||
)");
|
||||
bool sourceDebugInformation = false;
|
||||
|
||||
DOCUMENT(R"(If :data:`debuggable` is false then this contains a simple explanation of why the
|
||||
shader is not supported for debugging
|
||||
)");
|
||||
|
||||
@@ -247,6 +247,8 @@ void MakeShaderReflection(DXBC::DXBCContainer *dxbc, ShaderReflection *refl,
|
||||
|
||||
refl->debugInfo.encoding = ShaderEncoding::HLSL;
|
||||
|
||||
refl->debugInfo.sourceDebugInformation = true;
|
||||
|
||||
refl->debugInfo.compileFlags = dxbc->GetDebugInfo()->GetShaderCompileFlags();
|
||||
|
||||
refl->debugInfo.files.resize(dxbc->GetDebugInfo()->Files.size());
|
||||
|
||||
Reference in New Issue
Block a user