mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
Simplify NV blit logic.
This commit is contained in:
1 parent
2d0635c3e6
commit
fb7c71e41d
2 files changed
+4
-20
No files matched your search
@@ -1250,16 +1250,8 @@ void FramebufferManager::BlitFramebuffer(VirtualFramebuffer *dst, int dstX, int
|
||||
fbo_bind_as_render_target(dst->fbo);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
bool useBlit = false;
|
||||
bool useNV = false;
|
||||
|
||||
if (gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT)) {
|
||||
useNV = false;
|
||||
useBlit = true;
|
||||
} else if (gstate_c.Supports(GPU_SUPPORTS_NV_FRAMEBUFFER_BLIT)) {
|
||||
useNV = true;
|
||||
useBlit = true;
|
||||
}
|
||||
bool useBlit = gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT | GPU_SUPPORTS_NV_FRAMEBUFFER_BLIT);
|
||||
bool useNV = useBlit && !gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT);
|
||||
|
||||
float srcXFactor = useBlit ? (float)src->renderWidth / (float)src->bufferWidth : 1.0f;
|
||||
float srcYFactor = useBlit ? (float)src->renderHeight / (float)src->bufferHeight : 1.0f;
|
||||
|
||||
@@ -170,16 +170,8 @@ bool FramebufferManager::NotifyStencilUpload(u32 addr, int size, bool skipZero)
|
||||
glstate.stencilTest.enable();
|
||||
glstate.stencilOp.set(GL_REPLACE, GL_REPLACE, GL_REPLACE);
|
||||
|
||||
bool useBlit = false;
|
||||
bool useNV = false;
|
||||
|
||||
if (gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT)) {
|
||||
useNV = false;
|
||||
useBlit = true;
|
||||
} else if (gstate_c.Supports(GPU_SUPPORTS_NV_FRAMEBUFFER_BLIT)) {
|
||||
useNV = true;
|
||||
useBlit = true;
|
||||
}
|
||||
bool useBlit = gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT | GPU_SUPPORTS_NV_FRAMEBUFFER_BLIT);
|
||||
bool useNV = useBlit && !gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT);
|
||||
|
||||
// Our fragment shader (and discard) is slow. Since the source is 1x, we can stencil to 1x.
|
||||
// Then after we're done, we'll just blit it across and stretch it there.
|
||||
|
||||
Reference in new issue
Block a user