Commit graph

114 commits

Author SHA1 Message Date
Unknown W. Brackets
e5d67119a8 GPU: Avoid bloom hack on buffers used for depth.
If a buffer even has depth transferred to it, let's avoid lowering its
resolution.
2023-01-05 18:00:43 -08:00
Henrik Rydgård
11366a2ded Don't refer directly to g_Config.iMultiSampleLevel, it can contain unsupported modes. 2022-12-14 16:43:37 +01:00
Henrik Rydgård
8a3e92aa38 Not pretty, but with this, you can switch MSAA level at runtime. 2022-12-01 23:41:31 +01:00
Henrik Rydgård
e3679df6cf Fix switching between MSAA levels 2022-12-01 22:49:00 +01:00
Henrik Rydgård
6d9bb1b29e Move post-processing settings to DisplayLayoutScreen 2022-11-22 23:29:50 +01:00
Henrik Rydgård
eff4118769 One more refactoring step 2022-11-21 14:54:48 +01:00
Henrik Rydgård
7596713059 Refactor: Split up updating the display and render size. 2022-11-21 14:35:12 +01:00
Henrik Rydgård
0de12f5ca9 Some refactoring of framebuffer views, layer issues, more work. 2022-10-27 11:05:58 +02:00
Henrik Rydgård
fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård
cafce7365b Vulkan: Fix frame ordering issue with postprocessing shaders
Requested an init command buffer outside the frame, which is dangerous
and caused validation problems with command pool resets.

Would like to assert on insideFrame in GetInitCmd, but we use it from
some init code where it does work correctly. Might clean that up at some
point.
2022-10-21 12:52:21 +02:00
Unknown W. Brackets
fc68cd9457 GLES: Add debug readback of stencil data.
This allows the existing gpu.buffer.renderStencil to snapshot the state.
2022-10-10 17:09:14 -07:00
Unknown W. Brackets
59cc7a8000 GPU: Rename stencil write pipeline. 2022-10-10 16:54:29 -07:00
Unknown W. Brackets
1dc35b3ac4 GLES: Simplify, enable debug depth readback. 2022-10-10 01:04:57 -07:00
Unknown W. Brackets
f8908c691b GLES: Use Draw for depth readback shader.
Was not working before, since the program was not being used by Draw2D.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets
55d5dc3834 GPU: Rename readback and buffer write operations.
Avoid download/upload and pack, which don't have clear directions.
2022-10-09 13:49:41 -07:00
Unknown W. Brackets
ad3220f857 GLES: Hook up depth download.
Currently, only used by one hook.
2022-10-09 01:08:04 -07:00
Unknown W. Brackets
a1efed31b9 GPU: Use flags to fix triggered upload/download.
No longer using mirror hacks.
2022-10-03 20:17:25 -07:00
Unknown W. Brackets
58a4376998 GPU: Normalize framebuf addresses.
In VRAM, always store without mirror.  In RAM, always store without
cache/kernel bits.
2022-10-02 21:28:53 -07:00
Henrik Rydgård
94ae0fabfa CLUTs can be loaded from small rectangular textures. Need to linearize.
Fixes #8406, although technically, we should wrap by bufw, not the
texture width.
2022-09-21 18:33:15 +02:00
Unknown W. Brackets
bf86f00df8 GPU: Correct display framebuffer reading.
The displayFramebuf_ might not be set yet, but that doesn't mean we want
an INVALID format and zero stride.  We might also be rendering to a
different target, but still want the display.
2022-09-20 14:01:36 -07:00
Henrik Rydgård
662126a0a1 Small simplification 2022-09-15 16:57:03 +02:00
Henrik Rydgård
9907957242 Start implementing ApplyTextureDepal 2022-09-14 22:18:35 +02:00
Henrik Rydgård
a52e62a187 Enable depth uploads on render-to-clut-buffer. Esoteric but needed for #11100. Compat flag for now. 2022-09-14 22:18:34 +02:00
Henrik Rydgård
4803825f83 Buffer copy matching workaround 2022-09-14 22:18:34 +02:00
Henrik Rydgård
39890f7d6f Extract function GetReinterpretPipeline 2022-09-13 11:46:47 +02:00
Henrik Rydgård
4491c480a6 Texture/framebuffer matching: Do margin check in bytes. 2022-09-11 16:18:04 +02:00
Henrik Rydgård
3787b43b7a Fix "Lower resolution for effects" in Ratchet & Clank. Bad option for this game though. 2022-09-04 23:28:55 +02:00
Henrik Rydgård
a8a9fb4206 Much faster framebuffer matching (no more ToString every time there's more than 1 candidate, etc). 2022-08-31 14:23:56 +02:00
Henrik Rydgård
437d6d30a0 KillZone: Fix margin detection on the title screen, fixing some glitches. Need more fixes though to fix the shimmer effect.
See #6207 comments
2022-08-31 11:40:42 +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
44d822be3b Address feedback 2022-08-30 06:41:37 +02:00
Henrik Rydgård
670c31e746 Add support for reading depth buffers to the PackFramebufferSync function.
Also adds D16 conversion code (though, could probably get away with just
creating a 16-bit depth buffer on the GPU and blit to it, where depth
blit is available).

Not yet used, just getting it in separately.
2022-08-30 00:00:59 +02:00
Henrik Rydgård
cd37bffdaa Better framebuffer checks, remove all ways that framebuffer formats can change. 2022-08-29 11:06:45 +02:00
Henrik Rydgård
3c5ec25f61 Initial implementation of 32/16-bit color reinterpret blits. 2022-08-26 15:51:25 +02:00
Henrik Rydgård
cd0a31a3cd Work in bytes in the framebuffer matching algorithm for block copies, avoid margins 2022-08-26 15:51:25 +02:00
Henrik Rydgård
e6bb512a39 Remove support for framebuffers changing stride (already unreachable).
Also fixes a compiler warning
2022-08-25 19:07:07 +02:00
Henrik Rydgård
f79acd651d Comment updates 2022-08-25 00:29:44 +02:00
Henrik Rydgård
bbd92e6345 Merge the two find FindTransferFramebuffer* methods 2022-08-25 00:22:33 +02:00
Henrik Rydgård
62a834d15e Split up FindTransferFramebuffers 2022-08-25 00:12:31 +02:00
Henrik Rydgård
1feae894d3 Reorder some parameters. Detect buffers in stride gaps. 2022-08-24 18:31:10 +02:00
Henrik Rydgård
d0a3b9886f Remove unused function decl 2022-08-24 18:25:45 +02:00
Henrik Rydgård
c6f20bda18 Reimplement texture format reinterpretation 2022-08-24 14:40:37 +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
60e129d88e Break out Draw2D in a class 2022-08-23 11:12:23 +02:00
Henrik Rydgård
83b7386f7d Switch reinterpret shaders over to the Draw2D framework. 2022-08-23 11:12:23 +02:00
Henrik Rydgård
65e4e249ec More Draw2D refactoring 2022-08-23 11:12:23 +02:00
Henrik Rydgård
d1336fe15f Small Draw2D refactor 2022-08-23 08:37:44 +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
a0722af107 Rename fmt->fb_format 2022-08-23 08:37:44 +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