rsx: fbo fixes 2.5

- Implement flush-always behaviour to partially fix readback from a currently bound fbo
  - Without this, only the first read is correct, as more draws are added the results become 'wrong'
  - Fixes WCB and cpublit behviour
- Synchronize blit_dst surfaces to avoid data loss when gpu texture scaling is used
  - Its still faster in such cases to disable gpu texture scaling but some types cannot be disabled without force cpu blit (e.g framebuffer transfers)
- Memory management tuning
  - rsx: on-demand texture cache rescanning for unprotected sections
  - rsx: Only framebuffer resources are upscaled
  - Do not resize regular blit engine resources
  - Lazy initialize readback buffer when using opengl
  -- These measures should help minimize vram usage
This commit is contained in:
kd-11 2018-02-03 11:37:42 +03:00
parent 02e571adbc
commit 89c548b5d3
11 changed files with 282 additions and 63 deletions

View file

@ -806,9 +806,17 @@ std::string FragmentProgramDecompiler::Decompile()
if (m_loop_count) AddFlowOp("break");
else LOG_ERROR(RSX, "BRK opcode found outside of a loop");
break;
case RSX_FP_OPCODE_CAL: LOG_ERROR(RSX, "Unimplemented SIP instruction: CAL"); break;
case RSX_FP_OPCODE_FENCT: forced_unit = FORCE_SCT; break;
case RSX_FP_OPCODE_FENCB: forced_unit = FORCE_SCB; break;
case RSX_FP_OPCODE_CAL:
LOG_ERROR(RSX, "Unimplemented SIP instruction: CAL");
break;
case RSX_FP_OPCODE_FENCT:
AddCode("//FENCT");
forced_unit = FORCE_SCT;
break;
case RSX_FP_OPCODE_FENCB:
AddCode("//FENCB");
forced_unit = FORCE_SCB;
break;
case RSX_FP_OPCODE_IFE:
AddCode("if($cond)");
if (src2.end_offset != src1.else_offset)
@ -849,7 +857,9 @@ std::string FragmentProgramDecompiler::Decompile()
m_code_level++;
}
break;
case RSX_FP_OPCODE_RET: AddFlowOp("return"); break;
case RSX_FP_OPCODE_RET:
AddFlowOp("return");
break;
default:
return false;