mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Add fast path for rasterizer state comparison
This commit is contained in:
parent
e2340d7224
commit
2fabc90f46
@ -2428,19 +2428,16 @@ namespace dxvk {
|
|||||||
m_flags.set(DxvkContextFlag::GpDirtyRasterizerState);
|
m_flags.set(DxvkContextFlag::GpDirtyRasterizerState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_state.gp.state.rs.depthClipEnable() != rs.depthClipEnable
|
DxvkRsInfo rsInfo(
|
||||||
|| m_state.gp.state.rs.depthBiasEnable() != rs.depthBiasEnable
|
|
||||||
|| m_state.gp.state.rs.polygonMode() != rs.polygonMode
|
|
||||||
|| m_state.gp.state.rs.sampleCount() != rs.sampleCount
|
|
||||||
|| m_state.gp.state.rs.conservativeMode() != rs.conservativeMode) {
|
|
||||||
m_state.gp.state.rs = DxvkRsInfo(
|
|
||||||
rs.depthClipEnable,
|
rs.depthClipEnable,
|
||||||
rs.depthBiasEnable,
|
rs.depthBiasEnable,
|
||||||
rs.polygonMode,
|
rs.polygonMode,
|
||||||
rs.sampleCount,
|
rs.sampleCount,
|
||||||
rs.conservativeMode);
|
rs.conservativeMode);
|
||||||
|
|
||||||
|
if (!m_state.gp.state.rs.eq(rsInfo)) {
|
||||||
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
||||||
|
m_state.gp.state.rs = rsInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +250,10 @@ namespace dxvk {
|
|||||||
return VkConservativeRasterizationModeEXT(m_conservativeMode);
|
return VkConservativeRasterizationModeEXT(m_conservativeMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool eq(const DxvkRsInfo& other) const {
|
||||||
|
return !std::memcmp(this, &other, sizeof(*this));
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
uint16_t m_depthClipEnable : 1;
|
uint16_t m_depthClipEnable : 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user