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
Henrik Rydgård
1d3075566f
Move to common (todo: merge with above)
2022-08-03 14:12:55 +02:00
Henrik Rydgård
d55c4a3456
Convert the D3D11 DrawActiveTexture to thin3d
2022-08-03 14:12:55 +02:00
Henrik Rydgård
59b3df0643
Draw2D
2022-08-03 14:12:55 +02:00
Henrik Rydgård
41e327a66b
Cleanup and testfixes
2022-08-03 13:34:59 +02:00
Henrik Rydgård
9bead443c3
Unify stencil buffer upload using Draw. Only OpenGL tested yet (shaders need adaptation).
2022-08-03 13:31:13 +02:00
Henrik Rydgård
90a44579bf
Implement color-to-depth for Vulkan, start implementing for D3D11
2022-08-01 11:30:36 +02:00
Henrik Rydgård
b5f5aa1653
Track depth buffers separately from framebuffers to track previous use for copies
...
Fixes the depth testing problem reported in #11013
(WIP: Does not yet include the extra checking unknown suggested for
depth/color address clashes)
2022-07-31 10:44:06 +02:00
Henrik Rydgård
f523341351
Remove unnecessary parameters from MakePixelsTexture
2022-07-24 13:54:09 +02:00
Henrik Rydgård
881cc23965
Delete some unused code.
2022-07-24 13:54:04 +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
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
Unknown W. Brackets
4cb6976029
GPU: Use an empty vertex buf for reinterpret.
...
See #14552 .
2021-08-07 22:22:36 -07:00
Henrik Rydgård
0c66f6c6d0
Assorted drive-by code cleanup
2020-12-13 00:20:47 +01:00
Henrik Rydgård
9818c8aabd
Better debug names for BlitFramebuffer operations.
2020-11-28 13:45:26 +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
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