mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Really not sure how we can detect whether a depth deswizzle is needed :( Hopefully temporary flag...
This commit is contained in:
parent
f3496d34c8
commit
89c96142a1
5 changed files with 23 additions and 3 deletions
|
@ -97,6 +97,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
|||
CheckSetting(iniFile, gameID, "ZZT3SelectHack", &flags_.ZZT3SelectHack);
|
||||
CheckSetting(iniFile, gameID, "AllowLargeFBTextureOffsets", &flags_.AllowLargeFBTextureOffsets);
|
||||
CheckSetting(iniFile, gameID, "AtracLoopHack", &flags_.AtracLoopHack);
|
||||
CheckSetting(iniFile, gameID, "DeswizzleDepth", &flags_.DeswizzleDepth);
|
||||
}
|
||||
|
||||
void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, bool *flag) {
|
||||
|
|
|
@ -87,6 +87,7 @@ struct CompatFlags {
|
|||
bool ZZT3SelectHack;
|
||||
bool AllowLargeFBTextureOffsets;
|
||||
bool AtracLoopHack;
|
||||
bool DeswizzleDepth;
|
||||
};
|
||||
|
||||
class IniFile;
|
||||
|
|
|
@ -66,7 +66,7 @@ struct CoreParameter {
|
|||
bool headLess; // Try to avoid messageboxes etc
|
||||
|
||||
// Internal PSP rendering resolution and scale factor.
|
||||
int renderScaleFactor;
|
||||
int renderScaleFactor = 1;
|
||||
int renderWidth;
|
||||
int renderHeight;
|
||||
|
||||
|
|
|
@ -551,7 +551,7 @@ void FramebufferManagerCommon::CopyToDepthFromOverlappingFramebuffers(VirtualFra
|
|||
// For now, let's just do the last thing, if there are multiple.
|
||||
|
||||
// for (auto &source : sources) {
|
||||
if (sources.size()) {
|
||||
if (!sources.empty()) {
|
||||
auto &source = sources.back();
|
||||
if (source.channel == RASTER_DEPTH) {
|
||||
// Good old depth->depth copy.
|
||||
|
@ -563,11 +563,19 @@ void FramebufferManagerCommon::CopyToDepthFromOverlappingFramebuffers(VirtualFra
|
|||
if (src->drawnFormat != GE_FORMAT_565) {
|
||||
WARN_LOG_ONCE(not565, G3D, "Drawn format of buffer at %08x not 565 as expected", src->fb_address);
|
||||
}
|
||||
|
||||
// Really hate to do this, but tracking the depth swizzle state across multiple
|
||||
// copies is not easy.
|
||||
Draw2DShader shader = DRAW2D_565_TO_DEPTH;
|
||||
if (PSP_CoreParameter().compat.flags().DeswizzleDepth) {
|
||||
shader = DRAW2D_565_TO_DEPTH_DESWIZZLE;
|
||||
}
|
||||
|
||||
// Copying color to depth.
|
||||
BlitUsingRaster(
|
||||
src->fbo, 0.0f, 0.0f, src->renderWidth, src->renderHeight,
|
||||
dest->fbo, 0.0f, 0.0f, src->renderWidth, src->renderHeight,
|
||||
false, DRAW2D_565_TO_DEPTH_DESWIZZLE, "565_to_depth");
|
||||
false, shader, "565_to_depth");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1266,3 +1266,13 @@ ULES00618 = true
|
|||
# Silver Fall
|
||||
ULES00808 = true
|
||||
ULUS10270 = true
|
||||
|
||||
[DeswizzleDepth]
|
||||
UCUS98633 = true
|
||||
UCAS40145 = true
|
||||
UCES00420 = true
|
||||
UCJS10052 = true
|
||||
UCKS45048 = true
|
||||
UCJS18030 = true
|
||||
UCJS18047 = true
|
||||
NPJG00015 = true
|
||||
|
|
Loading…
Add table
Reference in a new issue