mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxvk] Move blend constants and stencil ref state to DxvkDynamicState
For consistency with how depth bias is being stored.
This commit is contained in:
parent
95815a075b
commit
7e975bbdfc
@ -1593,8 +1593,8 @@ namespace dxvk {
|
||||
|
||||
void DxvkContext::setBlendConstants(
|
||||
DxvkBlendConstants blendConstants) {
|
||||
if (m_state.om.blendConstants != blendConstants) {
|
||||
m_state.om.blendConstants = blendConstants;
|
||||
if (m_state.dyn.blendConstants != blendConstants) {
|
||||
m_state.dyn.blendConstants = blendConstants;
|
||||
m_flags.set(DxvkContextFlag::GpDirtyBlendConstants);
|
||||
}
|
||||
}
|
||||
@ -1611,8 +1611,8 @@ namespace dxvk {
|
||||
|
||||
void DxvkContext::setStencilReference(
|
||||
uint32_t reference) {
|
||||
if (m_state.om.stencilReference != reference) {
|
||||
m_state.om.stencilReference = reference;
|
||||
if (m_state.dyn.stencilReference != reference) {
|
||||
m_state.dyn.stencilReference = reference;
|
||||
m_flags.set(DxvkContextFlag::GpDirtyStencilRef);
|
||||
}
|
||||
}
|
||||
@ -3039,7 +3039,7 @@ namespace dxvk {
|
||||
if (m_flags.all(DxvkContextFlag::GpDirtyBlendConstants,
|
||||
DxvkContextFlag::GpDynamicBlendConstants)) {
|
||||
m_flags.clr(DxvkContextFlag::GpDirtyBlendConstants);
|
||||
m_cmd->cmdSetBlendConstants(&m_state.om.blendConstants.r);
|
||||
m_cmd->cmdSetBlendConstants(&m_state.dyn.blendConstants.r);
|
||||
}
|
||||
|
||||
if (m_flags.all(DxvkContextFlag::GpDirtyStencilRef,
|
||||
@ -3048,7 +3048,7 @@ namespace dxvk {
|
||||
|
||||
m_cmd->cmdSetStencilReference(
|
||||
VK_STENCIL_FRONT_AND_BACK,
|
||||
m_state.om.stencilReference);
|
||||
m_state.dyn.stencilReference);
|
||||
}
|
||||
|
||||
if (m_flags.all(DxvkContextFlag::GpDirtyDepthBias,
|
||||
|
@ -81,9 +81,6 @@ namespace dxvk {
|
||||
DxvkRenderTargets renderTargets;
|
||||
DxvkRenderPassOps renderPassOps;
|
||||
Rc<DxvkFramebuffer> framebuffer = nullptr;
|
||||
|
||||
DxvkBlendConstants blendConstants = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
uint32_t stencilReference = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -120,7 +117,9 @@ namespace dxvk {
|
||||
|
||||
|
||||
struct DxvkDynamicState {
|
||||
DxvkDepthBias depthBias = { 0.0f, 0.0f, 0.0f };
|
||||
DxvkBlendConstants blendConstants = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
DxvkDepthBias depthBias = { 0.0f, 0.0f, 0.0f };
|
||||
uint32_t stencilReference = 0;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user