Expand SPIR-V disassemblers to general shader processing tools

* Instead of just configuring SPIR-V disassemblers and picking only the first
  one when we need to edit SPIR-V, we allow setting up any shader processor that
  goes between two shader encodings.
* When editing, the default will still be to use embedded source, and then after
  that the first tool that goes from the native shader format to a text format,
  but the drop-down allows you to pick any of them.
* Similarly in the shader viewer you can configure the compilation options and
  method, to choose the compiler you want to use. Embedded command line
  parameters in the shader are automatically appended.
This commit is contained in:
baldurk
2018-08-09 16:56:53 +01:00
parent a81e4a2b45
commit 3c7b420e59
30 changed files with 1485 additions and 615 deletions
@@ -69,14 +69,26 @@ extern "C" PyObject *QWidgetToPy(QWidget *widget)
}
////////////////////////////////////////////////////////////////////////////////
// SPIRVDisassembler.cpp stubs
// ShaderProcessingTool.cpp stubs
////////////////////////////////////////////////////////////////////////////////
rdcstr SPIRVDisassembler::DisassembleShader(QWidget *window, const ShaderReflection *shaderDetails) const
rdcstr ShaderProcessingTool::DefaultArguments() const
{
return "";
}
rdcstr ShaderProcessingTool::DisassembleShader(QWidget *window, const ShaderReflection *shaderDetails,
rdcstr arguments) const
{
return "";
}
bytebuf ShaderProcessingTool::CompileShader(QWidget *window, rdcstr source, rdcstr entryPoint,
ShaderStage stage, rdcstr arguments) const
{
return bytebuf();
}
////////////////////////////////////////////////////////////////////////////////
// PersistantConfig.cpp stubs
////////////////////////////////////////////////////////////////////////////////