mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 06:56:40 +00:00
Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters: sample primitive and a new parameter view Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
This commit is contained in:
@@ -2235,3 +2235,23 @@ struct Thumbnail
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(Thumbnail);
|
||||
|
||||
DOCUMENT(
|
||||
"Contains the properties used to select which fragment to debug, used as an input to "
|
||||
"DebugPixel.");
|
||||
struct DebugPixelInputs
|
||||
{
|
||||
DOCUMENT("");
|
||||
DebugPixelInputs() : sample(~0U), primitive(~0U), view(~0U) {}
|
||||
DebugPixelInputs(const DebugPixelInputs &) = default;
|
||||
DebugPixelInputs &operator=(const DebugPixelInputs &) = default;
|
||||
|
||||
DOCUMENT("The multi-sampled sample.");
|
||||
uint32_t sample;
|
||||
DOCUMENT("The primitive index.");
|
||||
uint32_t primitive;
|
||||
DOCUMENT("The layered or multiview rendering view index.");
|
||||
uint32_t view;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(DebugPixelInputs);
|
||||
|
||||
@@ -967,15 +967,16 @@ bucket when the pixel values are divided between ``minval`` and ``maxval``.
|
||||
|
||||
:param int x: The x co-ordinate.
|
||||
:param int y: The y co-ordinate.
|
||||
:param int sample: The multi-sampled sample. Ignored if non-multisampled texture.
|
||||
:param int primitive: Debug the pixel from this primitive if there's ambiguity. If set to
|
||||
:param DebugPixelInputs inputs: Specific properties to select which fragment to debug e.g.
|
||||
sample: The multi-sampled sample. Ignored if non-multisampled texture.
|
||||
primitive: Debug the pixel from this primitive if there's ambiguity. If set to
|
||||
:data:`NoPreference` then a random fragment writing to the given co-ordinate is debugged.
|
||||
:return: The resulting trace resulting from debugging. Destroy with
|
||||
:meth:`FreeTrace`.
|
||||
view: Debug the fragment writing to this view for layered or multiview rendering,
|
||||
ignored if set to :data:`NoPreference`.
|
||||
:return: The resulting trace resulting from debugging. Destroy with :meth:`FreeTrace`.
|
||||
:rtype: ShaderDebugTrace
|
||||
)");
|
||||
virtual ShaderDebugTrace *DebugPixel(uint32_t x, uint32_t y, uint32_t sample,
|
||||
uint32_t primitive) = 0;
|
||||
virtual ShaderDebugTrace *DebugPixel(uint32_t x, uint32_t y, const DebugPixelInputs &inputs) = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve a debugging trace from running a compute thread.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user