mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-25 00:03:42 +00:00
Display VRS state in D3D12 pipeline state viewer
This commit is contained in:
9 files changed
+402
-205
No files matched your search
@@ -626,6 +626,34 @@ not force any sample count.
|
||||
uint32_t forcedSampleCount = 0;
|
||||
DOCUMENT("The current :class:`ConservativeRaster` mode.");
|
||||
ConservativeRaster conservativeRasterization = ConservativeRaster::Disabled;
|
||||
DOCUMENT(R"(The current base variable shading rate. This will always be 1x1 when variable shading
|
||||
is disabled.
|
||||
|
||||
:type: Tuple[int,int]
|
||||
)");
|
||||
rdcpair<uint32_t, uint32_t> baseShadingRate = {1, 1};
|
||||
DOCUMENT(R"(The shading rate combiners.
|
||||
|
||||
The combiners are applied as follows, according to the D3D spec:
|
||||
|
||||
``intermediateRate = combiner[0] ( baseShadingRate, shaderExportedShadingRate )``
|
||||
``finalRate = combiner[1] ( intermediateRate, imageBasedShadingRate )``
|
||||
|
||||
Where the first input is from :data:`baseShadingRate` and the second is the exported shading rate
|
||||
from a vertex or geometry shader, which defaults to 1x1 if not exported.
|
||||
|
||||
The intermediate result is then used as the first input to the second combiner, together with the
|
||||
shading rate sampled from the shading rate image.
|
||||
|
||||
:type: Tuple[ShadingRateCombiner,ShadingRateCombiner]
|
||||
)");
|
||||
rdcpair<ShadingRateCombiner, ShadingRateCombiner> shadingRateCombiners = {
|
||||
ShadingRateCombiner::Passthrough, ShadingRateCombiner::Passthrough};
|
||||
DOCUMENT(R"(The image bound as a shading rate image.
|
||||
|
||||
:type: ResourceId
|
||||
)");
|
||||
ResourceId shadingRateImage;
|
||||
};
|
||||
|
||||
DOCUMENT("Describes the rasterization state of the D3D12 pipeline.");
|
||||
|
||||
@@ -323,6 +323,20 @@ rdcstr DoStringise(const ConservativeRaster &el)
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
|
||||
template <>
|
||||
rdcstr DoStringise(const ShadingRateCombiner &el)
|
||||
{
|
||||
BEGIN_ENUM_STRINGISE(ShadingRateCombiner)
|
||||
{
|
||||
STRINGISE_ENUM_CLASS(Keep);
|
||||
STRINGISE_ENUM_CLASS(Replace);
|
||||
STRINGISE_ENUM_CLASS(Min);
|
||||
STRINGISE_ENUM_CLASS(Max);
|
||||
STRINGISE_ENUM_CLASS(Multiply);
|
||||
}
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
|
||||
template <>
|
||||
rdcstr DoStringise(const LineRaster &el)
|
||||
{
|
||||
|
||||
@@ -2709,6 +2709,50 @@ enum class ConservativeRaster : uint32_t
|
||||
|
||||
DECLARE_REFLECTION_ENUM(ConservativeRaster);
|
||||
|
||||
DOCUMENT(R"(A combiner to apply when determining a pixel shading rate.
|
||||
|
||||
.. data:: Keep
|
||||
|
||||
Keep the first input to the combiner.
|
||||
|
||||
.. data:: Passthrough
|
||||
|
||||
Keep the first input to the combiner. Alias for :data:`Keep`, for D3D terminology.
|
||||
|
||||
.. data:: Replace
|
||||
|
||||
Replace with the second input to the combiner.
|
||||
|
||||
.. data:: Override
|
||||
|
||||
Replace with the second input to the combiner. Alias for :data:`Replace`, for D3D terminology.
|
||||
|
||||
.. data:: Min
|
||||
|
||||
Use the minimum (finest rate) of the two inputs.
|
||||
|
||||
.. data:: Max
|
||||
|
||||
Use the maximum (coarsest rate) of the two inputs.
|
||||
|
||||
.. data:: Multiply
|
||||
|
||||
Multiply the two rates together (e.g. 1x1 and 1x2 = 1x2, 2x2 and 2x2 = 4x4). Note that D3D names
|
||||
this 'sum' misleadingly.
|
||||
)");
|
||||
enum class ShadingRateCombiner : uint32_t
|
||||
{
|
||||
Keep,
|
||||
Passthrough = Keep,
|
||||
Replace,
|
||||
Override = Replace,
|
||||
Min,
|
||||
Max,
|
||||
Multiply,
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_ENUM(ShadingRateCombiner);
|
||||
|
||||
DOCUMENT(R"(The line rasterization mode.
|
||||
|
||||
.. data:: Default
|
||||
|
||||
Reference in new issue
Block a user