mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Reduce parameters that need to be passed for viewing shaders
This commit is contained in:
@@ -1403,18 +1403,15 @@ IShaderViewer *CaptureContext::EditShader(bool customShader, const QString &entr
|
||||
|
||||
IShaderViewer *CaptureContext::DebugShader(const ShaderBindpointMapping *bind,
|
||||
const ShaderReflection *shader, ResourceId pipeline,
|
||||
ShaderStage stage, ShaderDebugTrace *trace,
|
||||
const QString &debugContext)
|
||||
ShaderDebugTrace *trace, const QString &debugContext)
|
||||
{
|
||||
return ShaderViewer::DebugShader(*this, bind, shader, pipeline, stage, trace, debugContext,
|
||||
return ShaderViewer::DebugShader(*this, bind, shader, pipeline, trace, debugContext,
|
||||
m_MainWindow->Widget());
|
||||
}
|
||||
|
||||
IShaderViewer *CaptureContext::ViewShader(const ShaderBindpointMapping *bind,
|
||||
const ShaderReflection *shader, ResourceId pipeline,
|
||||
ShaderStage stage)
|
||||
IShaderViewer *CaptureContext::ViewShader(const ShaderReflection *shader, ResourceId pipeline)
|
||||
{
|
||||
return ShaderViewer::ViewShader(*this, bind, shader, pipeline, stage, m_MainWindow->Widget());
|
||||
return ShaderViewer::ViewShader(*this, shader, pipeline, m_MainWindow->Widget());
|
||||
}
|
||||
|
||||
IBufferViewer *CaptureContext::ViewBuffer(uint64_t byteOffset, uint64_t byteSize, ResourceId id,
|
||||
|
||||
@@ -192,11 +192,10 @@ public:
|
||||
IShaderViewer::CloseCallback closeCallback) override;
|
||||
|
||||
IShaderViewer *DebugShader(const ShaderBindpointMapping *bind, const ShaderReflection *shader,
|
||||
ResourceId pipeline, ShaderStage stage, ShaderDebugTrace *trace,
|
||||
ResourceId pipeline, ShaderDebugTrace *trace,
|
||||
const QString &debugContext) override;
|
||||
|
||||
IShaderViewer *ViewShader(const ShaderBindpointMapping *bind, const ShaderReflection *shader,
|
||||
ResourceId pipeline, ShaderStage stage) override;
|
||||
IShaderViewer *ViewShader(const ShaderReflection *shader, ResourceId pipeline) override;
|
||||
|
||||
IBufferViewer *ViewBuffer(uint64_t byteOffset, uint64_t byteSize, ResourceId id,
|
||||
const QString &format = QString()) override;
|
||||
|
||||
@@ -1618,7 +1618,6 @@ through the execution of a given shader.
|
||||
:param ~renderdoc.ShaderReflection shader: The reflection data for the shader to view.
|
||||
:param ~renderdoc.ResourceId pipeline: The pipeline state object, if applicable, that this shader is
|
||||
bound to.
|
||||
:param ~renderdoc.ShaderStage stage: The stage that the shader is bound to.
|
||||
:param ~renderdoc.ShaderDebugTrace trace: The execution trace of the debugged shader.
|
||||
:param str debugContext: A human-readable context string describing which invocation of this shader
|
||||
was debugged. For example 'Pixel 12,34 at EID 678'.
|
||||
@@ -1627,22 +1626,17 @@ through the execution of a given shader.
|
||||
)");
|
||||
virtual IShaderViewer *DebugShader(const ShaderBindpointMapping *bind,
|
||||
const ShaderReflection *shader, ResourceId pipeline,
|
||||
ShaderStage stage, ShaderDebugTrace *trace,
|
||||
const QString &debugContext) = 0;
|
||||
ShaderDebugTrace *trace, const QString &debugContext) = 0;
|
||||
|
||||
DOCUMENT(R"(Show a new :class:`ShaderViewer` window, showing a read-only view of a given shader.
|
||||
|
||||
:param ~renderdoc.ShaderBindpointMapping bind: The bindpoint mapping for the shader to view.
|
||||
:param ~renderdoc.ShaderReflection shader: The reflection data for the shader to view.
|
||||
:param ~renderdoc.ResourceId pipeline: The pipeline state object, if applicable, that this shader is
|
||||
bound to.
|
||||
:param ~renderdoc.ShaderStage stage: The stage that the shader is bound to.
|
||||
:return: The new :class:`ShaderViewer` window opened, but not shown.
|
||||
:rtype: ShaderViewer
|
||||
)");
|
||||
virtual IShaderViewer *ViewShader(const ShaderBindpointMapping *bind,
|
||||
const ShaderReflection *shader, ResourceId pipeline,
|
||||
ShaderStage stage) = 0;
|
||||
virtual IShaderViewer *ViewShader(const ShaderReflection *shader, ResourceId pipeline) = 0;
|
||||
|
||||
DOCUMENT(R"(Show a new :class:`BufferViewer` window, showing a read-only view of buffer data.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user