mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-12 09:38:20 +00:00
Add a config option for the slow framebuf effects.
Like cluts, blitting, etc. At higher render resolutions these are expensive, and on some mobile devices they may be too much. Of course, they're only used when needed so this is a speedhack.
This commit is contained in:
parent
40ac84e442
commit
4a8d52ab1a
@ -397,7 +397,7 @@ static ConfigSetting graphicsSettings[] = {
|
||||
ConfigSetting("SmallDisplay", &g_Config.bSmallDisplay, false),
|
||||
ConfigSetting("ImmersiveMode", &g_Config.bImmersiveMode, false),
|
||||
|
||||
ConfigSetting("TrueColor", &g_Config.bTrueColor, true),
|
||||
ReportedConfigSetting("TrueColor", &g_Config.bTrueColor, true),
|
||||
|
||||
ReportedConfigSetting("MipMap", &g_Config.bMipMap, true),
|
||||
|
||||
@ -415,6 +415,7 @@ static ConfigSetting graphicsSettings[] = {
|
||||
ReportedConfigSetting("PostShader", &g_Config.sPostShaderName, "Off"),
|
||||
|
||||
ReportedConfigSetting("MemBlockTransferGPU", &g_Config.bBlockTransferGPU, true),
|
||||
ReportedConfigSetting("DisableSlowFramebufEffects", &g_Config.bDisableSlowFramebufEffects, true),
|
||||
|
||||
ConfigSetting(false),
|
||||
};
|
||||
|
@ -146,6 +146,7 @@ public:
|
||||
bool bTimerHack;
|
||||
bool bAlphaMaskHack;
|
||||
bool bBlockTransferGPU;
|
||||
bool bDisableSlowFramebufEffects;
|
||||
int iSplineBezierQuality; // 0 = low , 1 = Intermediate , 2 = High
|
||||
std::string sPostShaderName; // Off for off.
|
||||
|
||||
|
@ -313,12 +313,12 @@ bool ShouldUseShaderBlending() {
|
||||
|
||||
switch (eq) {
|
||||
case GE_BLENDMODE_ABSDIFF:
|
||||
return true;
|
||||
return !g_Config.bDisableSlowFramebufEffects;
|
||||
|
||||
case GE_BLENDMODE_MIN:
|
||||
case GE_BLENDMODE_MAX:
|
||||
// These don't use the factors.
|
||||
return !gl_extensions.EXT_blend_minmax && !gl_extensions.GLES3;
|
||||
return !gl_extensions.EXT_blend_minmax && !gl_extensions.GLES3 && !g_Config.bDisableSlowFramebufEffects;
|
||||
|
||||
default:
|
||||
break;
|
||||
@ -334,7 +334,7 @@ bool ShouldUseShaderBlending() {
|
||||
case GE_SRCBLEND_DOUBLEINVSRCALPHA:
|
||||
case GE_SRCBLEND_DOUBLEDSTALPHA:
|
||||
case GE_SRCBLEND_DOUBLEINVDSTALPHA:
|
||||
return true;
|
||||
return !g_Config.bDisableSlowFramebufEffects;
|
||||
|
||||
case GE_SRCBLEND_FIXA:
|
||||
if (funcB == GE_DSTBLEND_FIXB) {
|
||||
@ -355,7 +355,7 @@ bool ShouldUseShaderBlending() {
|
||||
case GE_DSTBLEND_DOUBLEINVSRCALPHA:
|
||||
case GE_DSTBLEND_DOUBLEDSTALPHA:
|
||||
case GE_DSTBLEND_DOUBLEINVDSTALPHA:
|
||||
return true;
|
||||
return !g_Config.bDisableSlowFramebufEffects;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -828,7 +828,9 @@ void FramebufferManager::ResizeFramebufFBO(VirtualFramebuffer *vfb, u16 w, u16 h
|
||||
INFO_LOG(SCEGE, "Resizing FBO for %08x : %i x %i x %i", vfb->fb_address, w, h, vfb->format);
|
||||
if (vfb->fbo) {
|
||||
ClearBuffer();
|
||||
BlitFramebuffer_(vfb, 0, 0, &old, 0, 0, std::min(vfb->bufferWidth, vfb->width), std::min(vfb->height, vfb->bufferHeight), 0);
|
||||
if (!g_Config.bDisableSlowFramebufEffects) {
|
||||
BlitFramebuffer_(vfb, 0, 0, &old, 0, 0, std::min(vfb->bufferWidth, vfb->width), std::min(vfb->height, vfb->bufferHeight), 0);
|
||||
}
|
||||
}
|
||||
fbo_destroy(old.fbo);
|
||||
if (vfb->fbo) {
|
||||
@ -1008,7 +1010,7 @@ void FramebufferManager::DoSetRenderFrameBuffer() {
|
||||
|
||||
// Some AMD drivers crash if we don't clear the buffer first?
|
||||
ClearBuffer();
|
||||
if (useBufferedRendering_ && !updateVRAM_) {
|
||||
if (useBufferedRendering_ && !updateVRAM_ && !g_Config.bDisableSlowFramebufEffects) {
|
||||
gpu->PerformMemoryUpload(fb_address_mem, byteSize);
|
||||
NotifyStencilUpload(fb_address_mem, byteSize, true);
|
||||
// TODO: Is it worth trying to upload the depth buffer?
|
||||
@ -1090,7 +1092,7 @@ void FramebufferManager::DoSetRenderFrameBuffer() {
|
||||
#endif
|
||||
|
||||
// Copy depth pixel value from the read framebuffer to the draw framebuffer
|
||||
if (currentRenderVfb_) {
|
||||
if (currentRenderVfb_ && !g_Config.bDisableSlowFramebufEffects) {
|
||||
BlitFramebufferDepth(currentRenderVfb_, vfb);
|
||||
}
|
||||
currentRenderVfb_ = vfb;
|
||||
@ -1202,7 +1204,7 @@ void FramebufferManager::BindFramebufferColor(VirtualFramebuffer *framebuffer, b
|
||||
|
||||
// currentRenderVfb_ will always be set when this is called, except from the GE debugger.
|
||||
// Let's just not bother with the copy in that case.
|
||||
if (GPUStepping::IsStepping()) {
|
||||
if (GPUStepping::IsStepping() || g_Config.bDisableSlowFramebufEffects) {
|
||||
skipCopy = true;
|
||||
}
|
||||
if (!skipCopy && currentRenderVfb_ && framebuffer->fb_address == gstate.getFrameBufRawAddress()) {
|
||||
|
@ -1009,7 +1009,7 @@ void TextureCache::SetTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffe
|
||||
bool useBufferedRendering = g_Config.iRenderingMode != FB_NON_BUFFERED_MODE;
|
||||
if (useBufferedRendering) {
|
||||
GLuint program = 0;
|
||||
if (entry->status & TexCacheEntry::STATUS_DEPALETTIZE) {
|
||||
if ((entry->status & TexCacheEntry::STATUS_DEPALETTIZE) && !g_Config.bDisableSlowFramebufEffects) {
|
||||
program = depalShaderCache_->GetDepalettizeShader(framebuffer->format);
|
||||
}
|
||||
if (program) {
|
||||
|
@ -332,8 +332,10 @@ void TransformDrawEngine::SubmitPrim(void *verts, void *inds, GEPrimitiveType pr
|
||||
}
|
||||
|
||||
if (prim == GE_PRIM_RECTANGLES && (gstate.getTextureAddress(0) & 0x3FFFFFFF) == (gstate.getFrameBufAddress() & 0x3FFFFFFF)) {
|
||||
gstate_c.textureChanged |= TEXCHANGE_PARAMSONLY;
|
||||
Flush();
|
||||
if (!g_Config.bDisableSlowFramebufEffects) {
|
||||
gstate_c.textureChanged |= TEXCHANGE_PARAMSONLY;
|
||||
Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user