Commit graph

197 commits

Author SHA1 Message Date
Unknown W. Brackets
b02fa4ec00
Merge pull request #15718 from hrydgard/getpointer-const-cleanup
Split GetPointer into GetPointer and GetPointerWrite
2022-07-24 07:51:39 -07:00
Henrik Rydgård
f523341351 Remove unnecessary parameters from MakePixelsTexture 2022-07-24 13:54:09 +02:00
Henrik Rydgård
e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Henrik Rydgård
04a85b1da0 Allows "merging" render targets that overlap on the Y access. Fixes #7295 (Juiced 2)
To be safe, gating this behind the related AllowLargeFBTextureOffsets,
which is also required for the effect to work.

Additionally, fixes the offset check for X offsets, which I guess is a
very small risk.
2022-07-24 11:58:07 +02:00
Henrik Rydgård
63fdb99ca2 Shaun White Snowboarding: Use compat flag to eliminate a readback per frame
Should be a good performance improvement.

Just another case of a game copying a framebuffer to RAM, then texturing
directly from it.
2022-06-11 12:00:06 +02:00
Henrik Rydgård
5868cf0f1c Convert the blueToAlpha bool to a usageFlag. KEEP instead of CLEAR for depth during reinterpret. 2022-04-30 18:17:29 +02:00
Henrik Rydgård
0c66087cc7 BlueToAlpha hack to avoid clearing the envmap in split/second :( 2022-04-30 18:17:17 +02:00
Henrik Rydgård
462972f7ea Add option to redirect blue to alpha if 565 mode is rendered and mask is 0x0FFFFF.
This is used by several games to render to the alpha channel of RGBA4444
images, which cannot normally be done directly on the PSP.

Can be used as a far more efficient replacement for
ReinterpretFramebuffers/ShaderColorBitmask
2022-04-30 18:17:16 +02:00
Henrik Rydgård
7be86264d0 Move framebufFormat to gstate_c, so we can override it 2022-04-30 18:16:09 +02:00
Henrik Rydgård
5a1ab67cf8 Dirty more state after reinterpret 2022-04-30 18:15:14 +02:00
Henrik Rydgård
6bc7a699fe Minor cleanups in framebuffer manager 2022-04-30 18:14:53 +02:00
Unknown W. Brackets
2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets
8efb99801e GPU: Log and report when region1 is non-zero. 2022-01-23 19:38:51 -08:00
Henrik Rydgård
44dc3555ad FramebufferManagerCommon: Fix some issues where currentRenderVfb_ could get out of sync.
It would get out of sync with draw_->GetCurrentFramebuffer(), which led
to checks for self-texturing not working, hitting an assert.

This caused problems when turning off "slow effects", and who knows what
else.

Fixes #15208
2021-12-08 22:01:23 +01:00
Unknown W. Brackets
12ad2b05ef GPU: Blit framebuf depth on create too.
Before we only did it for an existing target framebuffer, and never for a
fresh one.  But there's not really a good reason to skip that, and this
may improve effects that are cemented after a single frame.
2021-10-17 21:53:23 -07:00
Unknown W. Brackets
9306bbd4e4 GPU: Refactor framebuffer depth blit for reuse.
Shouldn't change anything yet, just moving logic around.
2021-10-17 21:51:45 -07:00
Unknown W. Brackets
4cb6976029 GPU: Use an empty vertex buf for reinterpret.
See #14552.
2021-08-07 22:22:36 -07:00
Unknown W. Brackets
8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Unknown W. Brackets
8a9979b50e Debugger: Include framebuffer in framebuf pack tag. 2021-04-03 18:11:44 -07:00
Henrik Rydgård
4e1bc2b3e0 Further std::string removal 2021-03-13 17:55:07 +01:00
Henrik Rydgård
42186e8e9e Warning fix, memleak fix 2021-03-11 23:28:02 +01:00
Unknown W. Brackets
7c7b1dafa0 GPU: Dirty texparams when cropping a self-copy.
If we used UV to limit the blit, we may need to do the blit again next
time, so re-examine texture params.
2021-02-28 08:20:46 -08:00
Henrik Rydgård
2f3bc2d373
Merge pull request #14056 from unknownbrackets/debugger-mem
Track memory allocations and writes for debug info
2021-02-21 10:18:11 +01:00
Unknown W. Brackets
229d684214 GPU: Prevent memory fault when no framebuf yet. 2021-02-16 19:29:37 -08:00
Unknown W. Brackets
e08e0cba33 GPU: Remove clear framebuf on first use speedhack.
Wasn't helping much.
2021-02-15 23:12:24 -08:00
Unknown W. Brackets
10a77d29ab Debugger: Track texture usage too. 2021-02-15 15:01:23 -08:00
Unknown W. Brackets
76ae1b4d28 Debugger: Mark framebuffers as VRAM allocations. 2021-02-15 15:01:23 -08:00
Unknown W. Brackets
f7740edc6d Debugger: Add more metadata for memory usage. 2021-02-15 15:01:21 -08:00
Unknown W. Brackets
5aa3e3180f GPU: Force reinterpret off without copy image.
Also, assert we have it when using it, since there's ifs.
2021-02-12 20:40:21 -08:00
Unknown W. Brackets
5041a898a2 Ge: Improve some logging and memchecks.
Explicitly trigger memchecks on readback.
2021-01-31 00:22:49 -08:00
Henrik Rydgård
c91a3a3dd2 GE: Better naming of render passes for color reinterpret 2021-01-25 00:12:25 +01:00
Henrik Rydgård
bdf36a4141 Temporary workaround for Wipeout Pure lens flare flicker.
See #13344.

Will try to figure out something better after the next release...
2020-12-20 13:04:28 +01:00
Henrik Rydgård
e0aa187161 UWP: Fix dialog rendering (PPGe). 2020-12-20 12:11:02 +01:00
Henrik Rydgård
e05c3ef63f UWP: Make the home button say "Home" instead of "Browse...". 2020-12-20 11:40:02 +01:00
Henrik Rydgård
05bfac0ef0 Misc logging improvements 2020-12-19 20:31:58 +01:00
Henrik Rydgård
0c66f6c6d0 Assorted drive-by code cleanup 2020-12-13 00:20:47 +01:00
Henrik Rydgård
2f700aa495 Fix DiRT 2's car reflections. 2020-12-13 00:19:39 +01:00
Unknown W. Brackets
b60250fca8
Respect stage in BindFramebufferAsColorTexture().
Introduced in #13634, only matters in error cases.
2020-11-29 07:59:35 -08:00
Henrik Rydgård
f1ab6c62c8 Fix Ghosts & Goblins for older backends too.
Fixes #13717
2020-11-28 16:16:51 +01:00
Henrik Rydgård
9818c8aabd Better debug names for BlitFramebuffer operations. 2020-11-28 13:45:26 +01:00
Henrik Rydgård
d5fe6154b5 Enable color reinterpret for Ultimate Ghosts & Goblins
The game uses it by accident probably, but whatever - it's a clean fix.

Fixes, but only for "modern" APIs, #13717.
2020-11-27 23:52:33 +01:00
Henrik Rydgård
d9350d4899 Fix scale in FramebufferCommon::GetFramebuffer. Fixes #13644 2020-11-15 22:38:47 +01:00
Henrik Rydgård
0510101f6c Fix task switching issue with reinterpret. Fixes #13649 2020-11-10 13:24:52 +01:00
Henrik Rydgård
5eea7435d0 Minor cleanup in GL backend, fixes #13647
Was a stray old texture in boundTextures_ in thin3d. Now makes sure to
invalidate them, and also make it possible to look up bound framebuffer
textures when checking for valid tex parameters.
2020-11-10 00:13:44 +01:00
Henrik Rydgård
669c18a088 Fix crashes on exit (Vulkan). Should help #13223 2020-11-09 11:13:44 +01:00
Henrik Rydgård
9105249901 Add compat flag for reinterpret shader, also disable on platforms that can't support it yet 2020-11-08 11:32:55 +01:00
Henrik Rydgård
28f8578408 Cleanup reinterpret shader resources in FramebufferManagerCommon::DeviceLost(). 2020-11-08 11:32:55 +01:00
Henrik Rydgård
96c36d5c10 More work on reinterpret. Get Vulkan running 2020-11-08 11:32:55 +01:00
Henrik Rydgård
981d0a2abe Reinterpret the data when binding a framebuffer with a different 16-bit format.
Car reflections in Outrun are better (see #11358) but have some
blue/yellow color garbage that will need a different fix.
2020-11-08 11:32:55 +01:00
Henrik Rydgård
1ccc8c129c Reinterpret code runs, no idea if it works 2020-11-08 11:32:55 +01:00