mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Emit dynamic state only if a pipeline is bound
Fixes validation errors in Dirt 4.
This commit is contained in:
parent
667616bc39
commit
97e3b89bc7
@ -1383,14 +1383,18 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_gpActivePipeline != VK_NULL_HANDLE) {
|
||||||
m_cmd->cmdSetViewport(0, viewportCount, m_state.vp.viewports.data());
|
m_cmd->cmdSetViewport(0, viewportCount, m_state.vp.viewports.data());
|
||||||
m_cmd->cmdSetScissor (0, viewportCount, m_state.vp.scissorRects.data());
|
m_cmd->cmdSetScissor (0, viewportCount, m_state.vp.scissorRects.data());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DxvkContext::setBlendConstants(
|
void DxvkContext::setBlendConstants(
|
||||||
const DxvkBlendConstants& blendConstants) {
|
const DxvkBlendConstants& blendConstants) {
|
||||||
m_state.om.blendConstants = blendConstants;
|
m_state.om.blendConstants = blendConstants;
|
||||||
|
|
||||||
|
if (m_gpActivePipeline != VK_NULL_HANDLE)
|
||||||
m_cmd->cmdSetBlendConstants(&blendConstants.r);
|
m_cmd->cmdSetBlendConstants(&blendConstants.r);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1399,10 +1403,12 @@ namespace dxvk {
|
|||||||
const uint32_t reference) {
|
const uint32_t reference) {
|
||||||
m_state.om.stencilReference = reference;
|
m_state.om.stencilReference = reference;
|
||||||
|
|
||||||
|
if (m_gpActivePipeline != VK_NULL_HANDLE) {
|
||||||
m_cmd->cmdSetStencilReference(
|
m_cmd->cmdSetStencilReference(
|
||||||
VK_STENCIL_FRONT_AND_BACK,
|
VK_STENCIL_FRONT_AND_BACK,
|
||||||
reference);
|
reference);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DxvkContext::setInputAssemblyState(const DxvkInputAssemblyState& ia) {
|
void DxvkContext::setInputAssemblyState(const DxvkInputAssemblyState& ia) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user