Improve handling of compilers & command line for edited shaders

* We store the compiler used (when known) in shader debug info and use that to
  select the compiler for editing as even higher priority than the default for a
  given language/encoding combination.
* We also ensure that for known tools we add the input and output parameters
  last, after any custom parameters, so that they are always present regardless
  of what the user puts in.
This commit is contained in:
baldurk
2022-08-10 14:30:54 +01:00
parent e29d48a2a8
commit e061ea3b2e
22 changed files with 333 additions and 203 deletions
+3 -3
View File
@@ -754,13 +754,13 @@ struct CaptureContextInvoker : ObjectForwarder<ICaptureContext>
InvokeVoidFunction(&ICaptureContext::ShowResourceInspector);
}
virtual IShaderViewer *EditShader(ResourceId id, ShaderStage stage, const rdcstr &entryPoint,
const rdcstrpairs &files, ShaderEncoding shaderEncoding,
ShaderCompileFlags flags,
const rdcstrpairs &files, KnownShaderTool knownTool,
ShaderEncoding shaderEncoding, ShaderCompileFlags flags,
IShaderViewer::SaveCallback saveCallback,
IShaderViewer::RevertCallback revertCallback) override
{
return InvokeRetFunction<IShaderViewer *>(&ICaptureContext::EditShader, id, stage, entryPoint,
files, shaderEncoding, flags, saveCallback,
files, knownTool, shaderEncoding, flags, saveCallback,
revertCallback);
}