Fixes to D3D viewport management. For some reason, still having strange driver-bug-ish problems in unbuffered...

This commit is contained in:
Henrik Rydgard committed 2015-11-12 14:47:43 +01:00
1 parent 5a8e86e8ba
commit 7e3cd987cd
8 files changed
+33 -34

No files matched your search

+1 -9
View File
@@ -1042,15 +1042,7 @@ void TextureCacheDX9::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFrame
pD3Ddevice->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE);
pD3Ddevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
D3DVIEWPORT9 vp;
vp.MinZ = 0;
vp.MaxZ = 1;
vp.X = 0;
vp.Y = 0;
vp.Width = framebuffer->renderWidth;
vp.Height = framebuffer->renderHeight;
pD3Ddevice->SetViewport(&vp);
DXSetViewport(0, 0, framebuffer->renderWidth, framebuffer->renderHeight);
HRESULT hr = pD3Ddevice->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, verts, (3 + 2) * sizeof(float));
if (FAILED(hr)) {
ERROR_LOG_REPORT(G3D, "Depal render failed: %08x", hr);