mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Don't spill render pass when rebinding render targets
The backend handles this now, so it's no longer necessary.
This commit is contained in:
parent
4360021539
commit
102a18060e
@ -2723,7 +2723,6 @@ namespace dxvk {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
bool needsUpdate = false;
|
bool needsUpdate = false;
|
||||||
bool needsSpill = false;
|
|
||||||
|
|
||||||
if (likely(NumRTVs != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL)) {
|
if (likely(NumRTVs != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL)) {
|
||||||
// Native D3D11 does not change the render targets if
|
// Native D3D11 does not change the render targets if
|
||||||
@ -2785,15 +2784,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (NumRTVs == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL)
|
if (NumRTVs == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL)
|
||||||
needsUpdate |= ResolveOmRtvHazards(uav);
|
needsUpdate |= ResolveOmRtvHazards(uav);
|
||||||
|
|
||||||
needsSpill = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsUpdate || needsSpill)
|
if (needsUpdate)
|
||||||
BindFramebuffer(needsSpill);
|
BindFramebuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3407,7 +3404,7 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void D3D11DeviceContext::BindFramebuffer(BOOL Spill) {
|
void D3D11DeviceContext::BindFramebuffer() {
|
||||||
DxvkRenderTargets attachments;
|
DxvkRenderTargets attachments;
|
||||||
|
|
||||||
// D3D11 doesn't have the concept of a framebuffer object,
|
// D3D11 doesn't have the concept of a framebuffer object,
|
||||||
@ -3429,10 +3426,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Create and bind the framebuffer object to the context
|
// Create and bind the framebuffer object to the context
|
||||||
EmitCs([
|
EmitCs([
|
||||||
cAttachments = std::move(attachments),
|
cAttachments = std::move(attachments)
|
||||||
cSpill = Spill
|
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
ctx->bindRenderTargets(cAttachments, cSpill);
|
ctx->bindRenderTargets(cAttachments, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3780,7 +3776,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void D3D11DeviceContext::RestoreState() {
|
void D3D11DeviceContext::RestoreState() {
|
||||||
BindFramebuffer(m_state.om.maxUav > 0);
|
BindFramebuffer();
|
||||||
|
|
||||||
BindShader<DxbcProgramType::VertexShader> (GetCommonShader(m_state.vs.shader.ptr()));
|
BindShader<DxbcProgramType::VertexShader> (GetCommonShader(m_state.vs.shader.ptr()));
|
||||||
BindShader<DxbcProgramType::HullShader> (GetCommonShader(m_state.hs.shader.ptr()));
|
BindShader<DxbcProgramType::HullShader> (GetCommonShader(m_state.hs.shader.ptr()));
|
||||||
|
@ -744,8 +744,7 @@ namespace dxvk {
|
|||||||
void BindShader(
|
void BindShader(
|
||||||
const D3D11CommonShader* pShaderModule);
|
const D3D11CommonShader* pShaderModule);
|
||||||
|
|
||||||
void BindFramebuffer(
|
void BindFramebuffer();
|
||||||
BOOL Spill);
|
|
||||||
|
|
||||||
void BindDrawBuffers(
|
void BindDrawBuffers(
|
||||||
D3D11Buffer* pBufferForArgs,
|
D3D11Buffer* pBufferForArgs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user