mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Display VRS state in D3D12 pipeline state viewer
This commit is contained in:
@@ -1273,6 +1273,21 @@ QString ToQStr(const AddressMode addr, const GraphicsAPI apitype)
|
||||
return lit("Unknown");
|
||||
}
|
||||
|
||||
QString ToQStr(const ShadingRateCombiner addr, const GraphicsAPI apitype)
|
||||
{
|
||||
if(IsD3D(apitype))
|
||||
{
|
||||
switch(addr)
|
||||
{
|
||||
case ShadingRateCombiner::Keep: return lit("Passthrough");
|
||||
case ShadingRateCombiner::Replace: return lit("Override");
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
return ToQStr(addr);
|
||||
}
|
||||
|
||||
QString TypeString(const SigParameter &sig)
|
||||
{
|
||||
QString ret = ToQStr(sig.varType);
|
||||
|
||||
@@ -58,14 +58,11 @@ inline QString ToQStr(const T &el)
|
||||
return QString(ToStr(el));
|
||||
}
|
||||
|
||||
// overload for a couple of things that need to know the pipeline type when converting
|
||||
// overloads for a couple of things that need to know the pipeline type when converting
|
||||
QString ToQStr(const ResourceUsage usage, const GraphicsAPI apitype);
|
||||
|
||||
// overload for a couple of things that need to know the pipeline type when converting
|
||||
QString ToQStr(const ShaderStage stage, const GraphicsAPI apitype);
|
||||
|
||||
// overload for a couple of things that need to know the pipeline type when converting
|
||||
QString ToQStr(const AddressMode addr, const GraphicsAPI apitype);
|
||||
QString ToQStr(const ShadingRateCombiner addr, const GraphicsAPI apitype);
|
||||
|
||||
inline QMetaType::Type GetVariantMetatype(const QVariant &v)
|
||||
{
|
||||
|
||||
@@ -915,6 +915,10 @@ void D3D12PipelineStateViewer::clearState()
|
||||
ui->frontCCW->setPixmap(tick);
|
||||
ui->conservativeRaster->setPixmap(cross);
|
||||
|
||||
ui->baseShadingRate->setText(lit("1x1"));
|
||||
ui->shadingRateCombiners->setText(lit("Passthrough, Passthrough"));
|
||||
ui->shadingRateImage->setText(ToQStr(ResourceId()));
|
||||
|
||||
ui->depthBias->setText(lit("0.0"));
|
||||
ui->depthBiasClamp->setText(lit("0.0"));
|
||||
ui->slopeScaledBias->setText(lit("0.0"));
|
||||
@@ -1790,6 +1794,15 @@ void D3D12PipelineStateViewer::setState()
|
||||
state.rasterizer.state.conservativeRasterization != ConservativeRaster::Disabled ? tick
|
||||
: cross);
|
||||
|
||||
ui->baseShadingRate->setText(QFormatStr("%1x%2")
|
||||
.arg(state.rasterizer.state.baseShadingRate.first)
|
||||
.arg(state.rasterizer.state.baseShadingRate.second));
|
||||
ui->shadingRateCombiners->setText(
|
||||
QFormatStr("%1, %2")
|
||||
.arg(ToQStr(state.rasterizer.state.shadingRateCombiners.first, GraphicsAPI::D3D12))
|
||||
.arg(ToQStr(state.rasterizer.state.shadingRateCombiners.second, GraphicsAPI::D3D12)));
|
||||
ui->shadingRateImage->setText(ToQStr(state.rasterizer.state.shadingRateImage));
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// Output Merger
|
||||
|
||||
|
||||
@@ -2201,19 +2201,6 @@
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="fillModeLabel">
|
||||
<property name="text">
|
||||
<string>Fill Mode:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="fillMode">
|
||||
<property name="font">
|
||||
@@ -2232,28 +2219,15 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="cullModeLabel">
|
||||
<property name="text">
|
||||
<string>Cull Mode:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="cullMode">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="depthBias">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
<string>0.00</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@@ -2263,10 +2237,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="frontCCWLabel">
|
||||
<item row="3" column="2">
|
||||
<spacer name="rastVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="fillModeLabel">
|
||||
<property name="text">
|
||||
<string>Front CCW:</string>
|
||||
<string>Fill Mode:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@@ -2276,19 +2266,29 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="frontCCW">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="depthBiasLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
<string>Depth Bias:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="lineAALabel">
|
||||
<property name="text">
|
||||
<string>Line AA:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -2305,6 +2305,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QLabel" name="forcedSampleCountLabel">
|
||||
<property name="text">
|
||||
<string>Forced Sample Count:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLabel" name="conservativeRaster">
|
||||
<property name="text">
|
||||
@@ -2321,28 +2334,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="depthBiasLabel">
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="multisample">
|
||||
<property name="text">
|
||||
<string>Depth Bias:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="depthBias">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.00</string>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@@ -2352,28 +2350,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="depthBiasClampLabel">
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="frontCCW">
|
||||
<property name="text">
|
||||
<string>Depth Bias Clamp:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="depthBiasClamp">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.00</string>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@@ -2383,16 +2366,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="slopeScaledBiasLabel">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="depthClip">
|
||||
<property name="text">
|
||||
<string>Slope-Scaled Bias:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -2414,66 +2400,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QLabel" name="forcedSampleCountLabel">
|
||||
<property name="text">
|
||||
<string>Forced Sample Count:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<widget class="QLabel" name="forcedSampleCount">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="depthClipLabel">
|
||||
<property name="text">
|
||||
<string>Depth Clip:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="depthClip">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="multisampleLabel">
|
||||
<property name="text">
|
||||
@@ -2487,26 +2413,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="multisample">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<item row="0" column="10">
|
||||
<spacer name="rastHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="lineAALabel">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="depthClipLabel">
|
||||
<property name="text">
|
||||
<string>Line AA:</string>
|
||||
<string>Depth Clip:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@@ -2516,26 +2442,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QLabel" name="lineAA">
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="frontCCWLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
<string>Front CCW:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QLabel" name="sampleMaskLabel">
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="slopeScaledBiasLabel">
|
||||
<property name="text">
|
||||
<string>Sample Mask:</string>
|
||||
<string>Slope-Scaled Bias:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@@ -2563,37 +2486,162 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="rastVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="cullMode">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="depthBiasClamp">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.00</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="cullModeLabel">
|
||||
<property name="text">
|
||||
<string>Cull Mode:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="depthBiasClampLabel">
|
||||
<property name="text">
|
||||
<string>Depth Bias Clamp:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QLabel" name="sampleMaskLabel">
|
||||
<property name="text">
|
||||
<string>Sample Mask:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<spacer name="rastHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<widget class="QLabel" name="shadingRateLabel">
|
||||
<property name="text">
|
||||
<string>Base Shading Rate:</string>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QLabel" name="lineAA">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../Resources/resources.qrc">:/cross.png</pixmap>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<widget class="QLabel" name="forcedSampleCount">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="9">
|
||||
<widget class="QLabel" name="baseShadingRate">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1x1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="8">
|
||||
<widget class="QLabel" name="shadingRateImageLabel">
|
||||
<property name="text">
|
||||
<string>Shading Rate Image:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="9">
|
||||
<widget class="RDLabel" name="shadingRateImage"/>
|
||||
</item>
|
||||
<item row="1" column="8">
|
||||
<widget class="QLabel" name="shadingRateCombinersLabel">
|
||||
<property name="text">
|
||||
<string>Shading Rate Combiners:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="9">
|
||||
<widget class="QLabel" name="shadingRateCombiners">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Keep, Keep</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1515,6 +1515,41 @@ void D3D12Replay::SavePipelineState(uint32_t eventId)
|
||||
src.ConservativeRaster == D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON
|
||||
? ConservativeRaster::Overestimate
|
||||
: ConservativeRaster::Disabled;
|
||||
|
||||
switch(rs.shadingRate)
|
||||
{
|
||||
default:
|
||||
case D3D12_SHADING_RATE_1X1: dst.baseShadingRate = {1, 1}; break;
|
||||
case D3D12_SHADING_RATE_1X2: dst.baseShadingRate = {1, 2}; break;
|
||||
case D3D12_SHADING_RATE_2X1: dst.baseShadingRate = {2, 1}; break;
|
||||
case D3D12_SHADING_RATE_2X2: dst.baseShadingRate = {2, 2}; break;
|
||||
case D3D12_SHADING_RATE_2X4: dst.baseShadingRate = {2, 4}; break;
|
||||
case D3D12_SHADING_RATE_4X2: dst.baseShadingRate = {4, 2}; break;
|
||||
case D3D12_SHADING_RATE_4X4: dst.baseShadingRate = {4, 4}; break;
|
||||
}
|
||||
|
||||
ShadingRateCombiner combiners[2];
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
switch(rs.shadingRateCombiners[i])
|
||||
{
|
||||
default:
|
||||
case D3D12_SHADING_RATE_COMBINER_PASSTHROUGH:
|
||||
combiners[i] = ShadingRateCombiner::Passthrough;
|
||||
break;
|
||||
case D3D12_SHADING_RATE_COMBINER_OVERRIDE:
|
||||
combiners[i] = ShadingRateCombiner::Override;
|
||||
break;
|
||||
case D3D12_SHADING_RATE_COMBINER_MIN: combiners[i] = ShadingRateCombiner::Min; break;
|
||||
case D3D12_SHADING_RATE_COMBINER_MAX: combiners[i] = ShadingRateCombiner::Max; break;
|
||||
case D3D12_SHADING_RATE_COMBINER_SUM: combiners[i] = ShadingRateCombiner::Multiply; break;
|
||||
}
|
||||
}
|
||||
|
||||
dst.shadingRateCombiners = {combiners[0], combiners[1]};
|
||||
|
||||
dst.shadingRateImage = rm->GetOriginalID(rs.shadingRateImage);
|
||||
}
|
||||
|
||||
state.rasterizer.scissors.resize(rs.scissors.size());
|
||||
|
||||
@@ -1439,8 +1439,11 @@ void DoSerialise(SerialiserType &ser, D3D12Pipe::RasterizerState &el)
|
||||
SERIALISE_MEMBER(antialiasedLines);
|
||||
SERIALISE_MEMBER(forcedSampleCount);
|
||||
SERIALISE_MEMBER(conservativeRasterization);
|
||||
SERIALISE_MEMBER(baseShadingRate);
|
||||
SERIALISE_MEMBER(shadingRateCombiners);
|
||||
SERIALISE_MEMBER(shadingRateImage);
|
||||
|
||||
SIZE_CHECK(36);
|
||||
SIZE_CHECK(64);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
@@ -1451,7 +1454,7 @@ void DoSerialise(SerialiserType &ser, D3D12Pipe::Rasterizer &el)
|
||||
SERIALISE_MEMBER(scissors);
|
||||
SERIALISE_MEMBER(state);
|
||||
|
||||
SIZE_CHECK(96);
|
||||
SIZE_CHECK(120);
|
||||
}
|
||||
|
||||
template <typename SerialiserType>
|
||||
@@ -1539,7 +1542,7 @@ void DoSerialise(SerialiserType &ser, D3D12Pipe::State &el)
|
||||
|
||||
SERIALISE_MEMBER(resourceStates);
|
||||
|
||||
SIZE_CHECK(1408);
|
||||
SIZE_CHECK(1432);
|
||||
}
|
||||
|
||||
#pragma endregion D3D12 pipeline state
|
||||
|
||||
Reference in New Issue
Block a user