D3D11 simpleblit: Avoid a binding hazard by swapping the texture and framebuffer bind.

This commit is contained in:
Henrik Rydgård 2017-03-06 16:39:23 +01:00
parent 150619c5a3
commit 07bfde357d

View File

@ -701,8 +701,10 @@ void FramebufferManagerD3D11::SimpleBlit(
memcpy(map.pData, vtx, 4 * sizeof(Vtx));
context_->Unmap(quadBuffer_, 0);
draw_->BindFramebufferAsRenderTarget(dest);
// Bind the texture first to avoid the D3D11 hazard check (can't set render target to things bound as textures).
draw_->BindFramebufferAsTexture(src, 0, Draw::FB_COLOR_BIT, 0);
draw_->BindFramebufferAsRenderTarget(dest);
Bind2DShader();
D3D11_VIEWPORT vp{ 0.0f, 0.0f, (float)destW, (float)destH, 0.0f, 1.0f };
context_->RSSetViewports(1, &vp);