Commit Graph

427 Commits

Author SHA1 Message Date
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
Unknown W. Brackets 0b22c98404 GPU: Skip fb create upload when clearing.
This doesn't verify it's a full screen clear, but on a new framebuffer
that's very very common.
2022-08-14 13:19:52 -07:00
Henrik Rydgård 79ee532609 Fix feature checks 2022-08-09 20:05:44 +02: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
Henrik Rydgård 131098c4d4 Some enum renaming, move RasterChannel to GPU.h. 2022-08-09 19:58:48 +02:00
Henrik Rydgård d61909ca91 More framebuffer blit fixes. 2022-08-07 12:02:06 +02:00
Henrik Rydgård b91ad1d2d7 Remove optimization in BlitUsingRaster that shouldn't have been there (redundant, lacked feature check) 2022-08-07 10:55:44 +02:00
Unknown W. Brackets c212bd0fec GPU: Clarify new framebuf stencil upload.
Actually, this doesn't need alpha either.
2022-08-06 21:18:48 -07:00
Henrik Rydgård 4658962b09 Feature detection fix on old GL, more compiler warning fixing 2022-08-06 18:47:12 +02:00
Henrik Rydgård 5f230ee998 Fix some compiler warnings 2022-08-06 18:19:27 +02:00
Henrik Rydgård e28b45481b Delete more unused code 2022-08-03 22:47:31 +02:00
Henrik Rydgård f84d2e9ba7 Fixes, state invalidation 2022-08-03 22:23:07 +02:00
Henrik Rydgård f8e0c09463 Delete unused stuff in all backends 2022-08-03 22:22:52 +02:00
Henrik Rydgård 126ace770e Remove the D3D9 and Vulkan BlitFramebuffer functions 2022-08-03 22:22:52 +02:00
Henrik Rydgård 9d23939e28 Replace D3D11's BlitFramebuffer with the common one 2022-08-03 22:22:51 +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 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 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 19931c003f Clean up blit/copy feature detection. Don't need fast GPU flags for these. 2022-08-02 09:53:46 +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 93321f2d5e Add logging for some non-traditional uses of framebuffers. 2022-08-01 11:30:21 +02:00
Henrik Rydgård 71ae6e3ad2 Address feedback 2022-07-31 10:44:06 +02:00
Henrik Rydgård 7f0f119cfe Check for color/Z clashes 2022-07-31 10:44:06 +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 3c88183d0d Merge pull request #15717 from hrydgard/render-target-y-offset
Allows "merging" render targets that overlap on the Y axis. Fixes Juiced 2
2022-07-24 18:48:21 +02:00
Henrik Rydgård 80f0f90af7 Revert the x-offset bpp fix temporarily. 2022-07-24 17:41:27 +02:00
Henrik Rydgård 89845eae7a Add GPU stat for number of depth copies per frame
Will be useful for evaluating #15700
2022-07-24 17:12:43 +02:00
Unknown W. Brackets b02fa4ec00 Merge pull request #15718 from hrydgard/getpointer-const-cleanup
Split GetPointer into GetPointer and GetPointerWrite
2022-07-24 07:51:39 -07:00
Henrik Rydgård f523341351 Remove unnecessary parameters from MakePixelsTexture 2022-07-24 13:54:09 +02:00
Henrik Rydgård e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Henrik Rydgård 04a85b1da0 Allows "merging" render targets that overlap on the Y access. Fixes #7295 (Juiced 2)
To be safe, gating this behind the related AllowLargeFBTextureOffsets,
which is also required for the effect to work.

Additionally, fixes the offset check for X offsets, which I guess is a
very small risk.
2022-07-24 11:58:07 +02:00
Henrik Rydgård 63fdb99ca2 Shaun White Snowboarding: Use compat flag to eliminate a readback per frame
Should be a good performance improvement.

Just another case of a game copying a framebuffer to RAM, then texturing
directly from it.
2022-06-11 12:00:06 +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 0c66087cc7 BlueToAlpha hack to avoid clearing the envmap in split/second :( 2022-04-30 18:17:17 +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
Henrik Rydgård 7be86264d0 Move framebufFormat to gstate_c, so we can override it 2022-04-30 18:16:09 +02:00
Henrik Rydgård 5a1ab67cf8 Dirty more state after reinterpret 2022-04-30 18:15:14 +02:00
Henrik Rydgård 6bc7a699fe Minor cleanups in framebuffer manager 2022-04-30 18:14:53 +02:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets 8efb99801e GPU: Log and report when region1 is non-zero. 2022-01-23 19:38:51 -08:00
Henrik Rydgård 44dc3555ad FramebufferManagerCommon: Fix some issues where currentRenderVfb_ could get out of sync.
It would get out of sync with draw_->GetCurrentFramebuffer(), which led
to checks for self-texturing not working, hitting an assert.

This caused problems when turning off "slow effects", and who knows what
else.

Fixes #15208
2021-12-08 22:01:23 +01:00
Unknown W. Brackets 12ad2b05ef GPU: Blit framebuf depth on create too.
Before we only did it for an existing target framebuffer, and never for a
fresh one.  But there's not really a good reason to skip that, and this
may improve effects that are cemented after a single frame.
2021-10-17 21:53:23 -07:00
Unknown W. Brackets 9306bbd4e4 GPU: Refactor framebuffer depth blit for reuse.
Shouldn't change anything yet, just moving logic around.
2021-10-17 21:51:45 -07:00
Unknown W. Brackets 4cb6976029 GPU: Use an empty vertex buf for reinterpret.
See #14552.
2021-08-07 22:22:36 -07:00
Unknown W. Brackets 8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Unknown W. Brackets 8a9979b50e Debugger: Include framebuffer in framebuf pack tag. 2021-04-03 18:11:44 -07:00
Henrik Rydgård 4e1bc2b3e0 Further std::string removal 2021-03-13 17:55:07 +01:00