Commit Graph

156 Commits

Author SHA1 Message Date
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
Henrik Rydgård 1ccc8c129c Reinterpret code runs, no idea if it works 2020-11-08 11:32:55 +01:00
Henrik Rydgård f2e315b9a6 More shadergen work
Buildfix
2020-11-08 11:32:53 +01:00
Henrik Rydgård c23ed09a32 Unify FramebufferManager::BindFramebufferAsColorTexture 2020-11-07 11:10:54 +01:00
Henrik Rydgård d9ee06a60d Reorganize the DeviceLost code a little. FramebufferManagerCommon now sees it. 2020-11-07 10:51:54 +01:00
Henrik Rydgård e37468700d Remove some accidentally added lines 2020-11-07 00:57:26 +01:00
Henrik Rydgård 44ec286ba4 Framebuffer: Keep the render scale factor around, no need to recompute it. 2020-11-06 09:11:57 +01:00
Henrik Rydgård 225734c0b3 Partially revert "Remove remnants of an old, no longer applicable readback optimization"
This reverts commit 7b2236778b.

Fixes #13628
2020-11-06 09:09:18 +01:00
Henrik Rydgård 84037f448e Remove colorDepth property of framebuffers. They're all 8888. 2020-11-05 14:51:46 +01:00
Henrik Rydgård 7b2236778b Remove remnants of an old, no longer applicable readback optimization 2020-11-05 14:38:20 +01:00
Henrik Rydgård d39badc8c1 Inline "OptimizeDownloadRange" to make the code more readable 2020-11-05 08:50:16 +01:00
Henrik Rydgård 39b5eb5b3d ShaderWriter, a replacement for the sprintf WRITE macro. 2020-11-02 10:02:52 +01:00
Henrik Rydgård 32eb882bc6 Clarify some logic, improve framebuffer names 2020-11-02 10:02:49 +01:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård 989e353482 Common.h shouldn't include Log.h.
Buildfixes

More buildfixes. Move JSON code to common.
2020-10-04 11:42:14 +02:00
Henrik Rydgård d6d72db0a9 Unify BlitFramebufferDepth. 2020-09-17 20:53:02 +02:00