mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Specify entry point when disassembling with spirv-cross. Closes #2342
This commit is contained in:
@@ -698,7 +698,7 @@ ShaderProcessingTool::ShaderProcessingTool(const QVariant &var)
|
||||
rdcstr ShaderProcessingTool::DefaultArguments() const
|
||||
{
|
||||
if(tool == KnownShaderTool::SPIRV_Cross)
|
||||
return "--output {output_file} {input_file} --vulkan-semantics";
|
||||
return "--output {output_file} {input_file} --vulkan-semantics --entry {entry_point}";
|
||||
else if(tool == KnownShaderTool::spirv_dis)
|
||||
return "--no-color -o {output_file} {input_file}";
|
||||
else if(tool == KnownShaderTool::glslangValidatorGLSL)
|
||||
|
||||
@@ -213,6 +213,12 @@ ShaderToolOutput ShaderProcessingTool::DisassembleShader(QWidget *window,
|
||||
arg = input_file;
|
||||
if(arg == lit("{output_file}"))
|
||||
arg = output_file = tmpPath(lit("shader_output"));
|
||||
if(arg == lit("{entry_point}"))
|
||||
{
|
||||
arg = shaderDetails->entryPoint;
|
||||
if(arg.isEmpty())
|
||||
arg = lit("main");
|
||||
}
|
||||
|
||||
// allow substring matches from the left, to enable e.g. {hlsl_stage2}_6_0
|
||||
if(arg.left(13) == lit("{glsl_stage4}"))
|
||||
|
||||
Reference in New Issue
Block a user