Commit graph

330 commits

Author SHA1 Message Date
Unknown W. Brackets
c5fbb400de Replacement: Detect OOM even with replacements.
Also allow saving video textures if so configured.
2022-09-01 19:05:20 -07:00
Henrik Rydgård
2bf0c86ac7 Fix image format when dumping textures.
Fixes #15831
2022-09-01 15:04:59 +02:00
Henrik Rydgård
a854fbbe76 fbtex matching: Shrink the matching struct, use TinySet instead of vector to avoid an allocation. 2022-09-01 10:24:52 +02:00
Henrik Rydgård
608710f9f5
Merge pull request #15936 from hrydgard/framebuffer-cleanups
Framebuffer settings and block transfer speedup
2022-09-01 10:04:31 +02:00
Henrik Rydgård
1c9ec36fd8 Stricter checks for negative framebuffer offsets. Fixes #15937 2022-09-01 08:26:23 +02:00
Henrik Rydgård
470efac7d8 Merge GetFramebufferCandidates and GetBestCandidateIndex into one function. 2022-09-01 00:35:43 +02:00
Henrik Rydgård
67d6549afd Rename Slow Framebuf effects to Shader Blending (might remove). Reassign readbacks to BlockTransferGPU. 2022-08-31 14:23:33 +02:00
Henrik Rydgård
70f7f74a05 Check X coordinate of through-mode drawcalls to figure out which of the splits to render to 2022-08-31 01:09:23 +02:00
Henrik Rydgård
1b3b1acefa Tweak ForceMax60Fps to work for Killzone 2022-08-30 20:10:44 +02:00
Henrik Rydgård
987bfc79ef Split the framebuffer in Killzone, with a compatibility flag.
Greatly improves performance.

See issue #6207
2022-08-30 20:05:56 +02:00
Henrik Rydgård
daa62beb39 Small tweak in texture matching. Fixes #15927 2022-08-30 16:14:47 +02:00
Henrik Rydgård
08eaf7665c Fix race condition in replacement texture loading
The texture could become valid during the load, causing an inconsistent
state within the texture loading. So can only check for valid-ness once.
2022-08-30 12:52:31 +02:00
Henrik Rydgård
6f2966f502 Clean up mip size calculations
Calculating the same thing in multiple places is a recipe for bugs, so
let's not.
2022-08-30 12:05:57 +02:00
Henrik Rydgård
f228de76ef Fix OpenGL bug when framebuffer fetch is available. Add two new stats. 2022-08-29 15:39:29 +02:00
Henrik Rydgård
b447092742 Some Vulkan renderpass load/store optimizations. 2022-08-28 23:16:48 +02:00
Henrik Rydgård
9b4e94c4ae Depal: Set scissor tightly around processed area. 2022-08-28 23:14:30 +02:00
Henrik Rydgård
322f29ce80 Comments and fixes 2022-08-27 23:37:02 +02:00
Henrik Rydgård
8d1157e107 GL bugfix, log cleanup 2022-08-27 14:40:42 +02:00
Henrik Rydgård
cb8497731d Framebuffer texture matching: Remove heuristics other than seqCount 2022-08-27 11:01:54 +02:00
Henrik Rydgård
769f3d1466 Accept color textures as reinterpretable between 32 and 16-bit formats 2022-08-27 10:59:37 +02:00
Henrik Rydgård
6781dd5fe8 Fix Katamari 2022-08-26 23:47:22 +02:00
Henrik Rydgård
39690a95be Quick hack to widen the depal texture if 0x200000 swizzle is needed 2022-08-26 17:09:22 +02:00
Henrik Rydgård
7cba231e58 Finish the depal refactoring.
Needed for an upcoming change (since this lets us use the Draw2D
uniform mechanism in depal shaders).
2022-08-26 15:47:29 +02:00
Henrik Rydgård
c6f20bda18 Reimplement texture format reinterpretation 2022-08-24 14:40:37 +02:00
Henrik Rydgård
b529d26f3a Fix smoothed depal on GLES. Don't enable filtering if not using. 2022-08-24 13:43:41 +02:00
Henrik Rydgård
d459eac891 Fix checks for depth texture support, GLES syntax errors 2022-08-24 11:26:07 +02:00
Henrik Rydgård
bd674c47b6 OpenGL: Fix regular depal (shader depal still worked) that broke recently 2022-08-24 11:01:57 +02:00
Henrik Rydgård
5084743bbb Use Draw2D for depal shaders (except the actual blit, for now) 2022-08-23 11:21:40 +02:00
Henrik Rydgård
5415da10bf Rename VirtualFramebuffer->format to fb_format to line up with fb_address and fb_stride (fundamental parameters) 2022-08-23 08:37:44 +02:00
Henrik Rydgård
8fdd00db8c
Merge pull request #15888 from hrydgard/copy-color-on-bind
Copy color from overlapping framebuffers on bind, under certain conditions
2022-08-23 08:37:33 +02:00
Henrik Rydgård
51686f4936 Copy color from overlapping framebuffers on bind, under certain conditions.
Leads to much faster performance in Juiced 2.

This will later be expanded to handle more things in a more elegant way,
like the framebuffer overlap in God of War for the shadows and
color reinterpretation in a generic way.

Fixes #15728
2022-08-22 16:06:55 +02:00
Henrik Rydgård
e3943f6d0d Implement smoothed depal for the "old" depal path as well. 2022-08-22 15:34:26 +02:00
Henrik Rydgård
2a6015c1e3 Better checks for smoothed depal 2022-08-22 15:25:28 +02:00
Henrik Rydgård
6558bde0f6 Remove SmoothedDepal compat setting, instead detect the ramp directly. 2022-08-22 15:24:41 +02:00
Henrik Rydgård
b39b74e602 More renaming. Fix shader view for Vulkan 2022-08-22 12:30:51 +02:00
Henrik Rydgård
82a6c42e17 DepalettizeCommon -> TextureShaderCommon. Simplifications. 2022-08-22 12:21:20 +02:00
Henrik Rydgård
58a6fd3395 Convert TextureShaderApplier to a member function in DepalCache. 2022-08-22 11:45:52 +02:00
Henrik Rydgård
383adcb870 Simplify depal shader apply code a bit. 2022-08-22 11:31:27 +02:00
Henrik Rydgård
3c307c9857
Merge pull request #15884 from unknownbrackets/texreplace-io-async
Replacement: Read files only within time budget
2022-08-22 11:10:16 +02:00
Unknown W. Brackets
e473eb9f5e Replacement: Read files only within time budget.
When delayed texture load is enabled.  Intended to reduce IO delays on
Android.
2022-08-21 22:07:05 -07:00
Unknown W. Brackets
afc9a14b37 GPU: Share CLUTs if no extended CLUT.
Oops, this was backwards.  See #15878.
2022-08-21 16:46:51 -07:00
Henrik Rydgård
a11e7e167b More D3D9 work on depth textures. Something still missing. 2022-08-21 09:58:58 +02:00
Henrik Rydgård
e2707d3ab3 Remove debug code, cleanup 2022-08-21 09:58:58 +02:00
Henrik Rydgård
f3496d34c8 Texture bind channel fix. Still need to figure out a way to decide to swizzle or not. 2022-08-21 09:58:58 +02:00
Henrik Rydgård
5a7bddbfa6 Allow binding depth as 565 by going through depal.
This is a partial fix for #6105 (Ratchet & Clank particles visible
through things), but there's still weird glitchiness. There's a pass
during rendering that scrambles the mini depth buffer by using a
triangle mesh. I wonder if it's trying to simulate the swizzle? But it
doesn't really look like it...
2022-08-21 09:58:58 +02:00
Unknown W. Brackets
e374ea6b21 GPU: Restrict mip CLUT enhancement a bit.
Can't replicate this behavior on a real PSP.

In case a game sets the separate CLUT flag by accident, ignore except
in a safe case that occurs in Misshitsu no Sacrifice.  See #15727.
2022-08-20 17:32:45 -07:00
Henrik Rydgård
97dbba0ec3 Minor fixes. Everything seems fine now. 2022-08-20 08:29:33 +02:00
Henrik Rydgård
886679c7ec Remove the color-to-depth mode 2022-08-20 08:29:33 +02:00
Henrik Rydgård
68480c548d Texture bind channel fix 2022-08-20 08:07:11 +02:00
Henrik Rydgård
295f5f391e More consistent handling of lack of depth texture support. Small log improvement. 2022-08-20 08:05:53 +02:00