mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 11:52:12 +01:00
[dxvk] Re-introduce state check for updateFramebuffer
Turns out we broke batching render target clears earlier.
This commit is contained in:
parent
6b5d01c934
commit
d128d776ad
@ -3970,24 +3970,26 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxvkContext::updateFramebuffer() {
|
||||
m_flags.clr(DxvkContextFlag::GpDirtyFramebuffer);
|
||||
|
||||
this->spillRenderPass();
|
||||
|
||||
auto fb = m_device->createFramebuffer(m_state.om.renderTargets);
|
||||
|
||||
m_state.gp.state.msSampleCount = fb->getSampleCount();
|
||||
m_state.om.framebuffer = fb;
|
||||
if (m_flags.test(DxvkContextFlag::GpDirtyFramebuffer)) {
|
||||
m_flags.clr(DxvkContextFlag::GpDirtyFramebuffer);
|
||||
|
||||
for (uint32_t i = 0; i < MaxNumRenderTargets; i++) {
|
||||
Rc<DxvkImageView> attachment = fb->getColorTarget(i).view;
|
||||
this->spillRenderPass();
|
||||
|
||||
m_state.gp.state.omComponentMapping[i] = attachment != nullptr
|
||||
? util::invertComponentMapping(attachment->info().swizzle)
|
||||
: VkComponentMapping();
|
||||
auto fb = m_device->createFramebuffer(m_state.om.renderTargets);
|
||||
|
||||
m_state.gp.state.msSampleCount = fb->getSampleCount();
|
||||
m_state.om.framebuffer = fb;
|
||||
|
||||
for (uint32_t i = 0; i < MaxNumRenderTargets; i++) {
|
||||
Rc<DxvkImageView> attachment = fb->getColorTarget(i).view;
|
||||
|
||||
m_state.gp.state.omComponentMapping[i] = attachment != nullptr
|
||||
? util::invertComponentMapping(attachment->info().swizzle)
|
||||
: VkComponentMapping();
|
||||
}
|
||||
|
||||
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
||||
}
|
||||
|
||||
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user