Commit Graph
87 Commits
Author SHA1 Message Date
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
Henrik Rydgård 9cc8cfaa08 Use a DX9-compatible method to pass texwidth and height. the effect doesn't work on DX9 yet though. 2022-08-21 09:58:58 +02:00
Henrik Rydgård e6b60026d1 Fix graphics in Ratchet & Clank. WIP 2022-08-21 09:58:58 +02:00
Henrik Rydgård 29ea3ffe0c Restore the clearing optimization, avoiding unnecessary depth copies 2022-08-20 09:46:15 +02:00
Henrik Rydgård 12db0e52d4 Fix deferred-depth for bezier/spline. Move updating of last_frame_depth_render to GPUCommon. 2022-08-20 08:29:33 +02:00
Henrik Rydgård 97dbba0ec3 Minor fixes. Everything seems fine now. 2022-08-20 08:29:33 +02:00
Henrik Rydgård 5d8fe4c2a8 Implement copying color to depth on load. However, weird stuff is happening.. 2022-08-20 08:29:33 +02:00
Henrik Rydgård 94ade8c751 Extract depth copies to CopyToDepthFromOverlappingFramebuffers 2022-08-20 08:29:33 +02:00
Henrik Rydgård a0ac2dffc7 Defer depth copies until depth buffer is actually used.
Fixes
2022-08-20 08:29:33 +02:00
Henrik Rydgård bd6f79e473 Fix the raster depth blit again, which I recently broke. 2022-08-17 16:52:49 +02:00
Henrik Rydgård 74f1c94ddb Use sequence numbers instead of a tracking array for depth buffers 2022-08-17 10:34:07 +02:00
Henrik Rydgård 078fc881a7 Revise comments according to feedback 2022-08-17 10:15:02 +02:00
Henrik Rydgård 19367dd890 Comment updates 2022-08-17 10:09:12 +02:00
Henrik Rydgård 5785cf40ad Clean up and comment framebuffer struct better, add bind sequence numbers 2022-08-17 10:09:11 +02:00
Henrik Rydgård 35a1ca064a Refactor 2D pipeline creation 2022-08-16 19:27:46 +02:00
Henrik Rydgård 570e0326e7 Rely on refcounting for stencil upload shader modules 2022-08-16 15:10:48 +02:00
Henrik Rydgård 1e57a358b8 thin3d: Properly AddRef and Release shader modules from the pipeline in backends that need it 2022-08-16 15:10:48 +02:00
Henrik Rydgård ccdb1f7330 Move out the reinterpret stuff to ReinterpretFramebuffer.cpp. Draw2D refactor. 2022-08-16 11:11:59 +02:00
Henrik Rydgård 9f2447c0b4 Assorted minor cleanup 2022-08-16 10:55:44 +02:00
Unknown W. Brackets 6060706fc8 GPU: Avoid using depth buffers for blending.
For now, until it's implemented.
2022-08-14 22:13:39 -07:00
Henrik Rydgård 252550fbd2 Enable framebuffer depth blits through raster. Fixes games like Jeanne D'Arc on D3D9. 2022-08-09 20:00:32 +02:00
Unknown W. Brackets 20c2ec1392 GPU: Skip alpha stencil upload when safe.
Otherwise, let's not do things that give different behavior at 1x or are
inconsistent.
2022-08-06 21:12:59 -07:00
Henrik Rydgård 9a5893ce6e More cleanup 2022-08-06 18:27:04 +02:00
Henrik Rydgård e28b45481b Delete more unused code 2022-08-03 22:47:31 +02:00
Henrik Rydgård f8e0c09463 Delete unused stuff in all backends 2022-08-03 22:22:52 +02:00
Henrik Rydgård 1ab9293cb3 Convert FramebufferBlit from the GL backend to use thin3d 2022-08-03 22:22:51 +02:00
Henrik Rydgård 64a8a3f7d3 D3D11: Remove more custom drawing 2022-08-03 22:22:51 +02:00
Henrik Rydgård 0f9bf47429 Reimplement filtering in DrawActiveTexture 2022-08-03 14:12:55 +02:00