Commit Graph

293 Commits

Author SHA1 Message Date
Henrik Rydgård
ee19db091f Add accessor for UseFlags 2022-12-13 18:27:45 +01:00
Unknown W. Brackets
a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets
77e510bd90 GPU: Use accurate depth for depth range hack.
This should be easier to ensure stays well tested.
2022-12-04 19:27:23 -08:00
Henrik Rydgård
f6fcc9e9a7 Add a way to view the "GPU_USE_" flags at runtime. Useful for sanity checking on-device. 2022-11-23 16:17:41 +01:00
Unknown W. Brackets
01d7d73438 GPU: Remove unused GPU_USE flag. 2022-11-13 08:09:57 -08:00
Unknown W. Brackets
585569c2c2 TexCache: Cleanup BGRA flag dirtying. 2022-11-08 20:01:14 -08:00
Henrik Rydgård
8413473fa4 Fix more cases, GTA works now. 2022-10-27 11:05:59 +02:00
Henrik Rydgård
fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård
aa51bfd1ef Use GPU "use" flags to replace IsVRBuild in the renderer. It remains elsewhere. 2022-10-17 19:57:11 +02:00
Henrik Rydgård
7c5fc3ccb5 Reorder the GPU USE flags a bit 2022-10-17 19:55:11 +02:00
Henrik Rydgård
30aa07b156 Two more renames to make things read better 2022-10-17 08:47:05 +02:00
Henrik Rydgård
9b8a5d1db3 Rename GPU_SUPPORTS_ to GPU_USE_ 2022-10-17 08:47:03 +02:00
Henrik Rydgård
daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Henrik Rydgård
d30d8bf35c Removes the option, autodetect instead - only enable if the GPU doesn't support bitwise ops. 2022-10-11 16:09:57 +02: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
Unknown W. Brackets
b9b59f7806 GPU: Mask away unused bits in framebuf/zbuf ptr.
Lower 4 bits are ignored during rendering, and mirrors (even even the 8
bit at the top) are ignored.
2022-10-02 20:44:35 -07:00
Unknown W. Brackets
d16caa71af Vulkan: Add geometry shader ID tracking.
We're still not generating them, yet.  But this tracks the objects and
IDs through the pipeline.
2022-10-02 07:42:16 -07:00
Henrik Rydgård
7adba20fac Experiment: Generate "Ubershaders" that can handle all lighting configurations
This drastically reduces the shader compile stutter that happens when a lot of new
light setups are created, like on the first punch in Tekken 6.

There's more stuff that might benefit from being made dynamic like this.
These branches are very cheap on modern GPUs since they're branching on
a uniform variable, so no divergence.

Only tested on Vulkan. I think we'll need to keep the old path too for
gpus like Mali-450...
2022-09-25 23:35:01 +02:00
Henrik Rydgård
287e025978 Minor cleanups around dirtying of render state 2022-09-22 09:12:58 +02:00
Henrik Rydgård
ce82fce8de Use subpass dependencies to implement shader framebuffer read in Vulkan. 2022-09-16 19:19:42 +02:00
Henrik Rydgård
694dbe1271 Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit. 2022-09-11 14:40:01 +02:00
Unknown W. Brackets
542e7aa555 GE Debugger: Add a table of register metadata.
So far, not used, but indicates info about each GE register.
2022-09-05 12:15:53 -07:00
Henrik Rydgård
8c56abd3dc Remove setting "Disable slower framebuffer effects" 2022-09-03 11:06:43 +02:00
Henrik Rydgård
a71a10bb6e Allow signed texture offsets on framebuffers 2022-08-31 01:46:58 +02:00
Henrik Rydgård
7186fc2c17 Offset the draws properly. Now just some texel clamping left to fix 2022-08-31 01:40:53 +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
6558bde0f6 Remove SmoothedDepal compat setting, instead detect the ramp directly. 2022-08-22 15:24:41 +02:00
Unknown W. Brackets
e374ea6b21 GPU: Restrict mip CLUT enhancement a bit.
Can't replicate this behavior on a real PSP.

In case a game sets the separate CLUT flag by accident, ignore except
in a safe case that occurs in Misshitsu no Sacrifice.  See #15727.
2022-08-20 17:32:45 -07:00
Henrik Rydgård
886679c7ec Remove the color-to-depth mode 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
131098c4d4 Some enum renaming, move RasterChannel to GPU.h. 2022-08-09 19:58:48 +02:00
Henrik Rydgård
81c36578ca Feature detection fixes 2022-08-06 18:27:03 +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
f73995b5db Disable texture filtering when drawing color into depth 2022-08-01 14:08:16 +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
c158414858 Give the mip bias its own uniform flag. 2022-07-31 10:43:48 +02:00
Henrik Rydgård
2cb9e09ad3 Implement new discovery of a larger CLUT than we thought, plus non-shared CLUTs for 8-bit indices.
Not sure yet what limitations apply, regarding using it for even more
16-bit colors, etc...
2022-07-31 10:43:48 +02:00
Henrik Rydgård
f061eadc04 Initial implementation of 3D texturing through equal-size mips (see #6357)
Vulkan-only currently, though all the other backends except ES 2.0
without GL_OES_texture_3d can support it with some work.
2022-07-31 10:43:47 +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
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
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
Unknown W. Brackets
2797e035df softgpu: Precompute lighting parameters.
In many cases, games use lighting just for diffuse or something, this
helps skip what's not needed too.  Good improvement in a scene from a
Naruto game.
2022-01-16 11:27:53 -08:00
Unknown W. Brackets
c0e85e6170 softgpu: Move texenv color into sampler state. 2022-01-15 17:52:40 -08:00
Unknown W. Brackets
60bd25582c Vulkan: Remove wide line handling.
No longer used, since we convert lines to triangles now.
2021-10-31 14:47:21 -07:00
Unknown W. Brackets
33598f2e75 GPU: Support clip and cull distances separately.
Older GL devices, and it seems Apple devices, may not support cull.
2021-10-12 20:34:44 -07:00
Unknown W. Brackets
7b00c4a572 GPU: Move Z/W equal hack to bugs from supports.
It's really a bug (might even ideally cap the version?), and we already
have other bugs handled the same way.
2021-10-12 20:34:44 -07:00
Unknown W. Brackets
2271b41d07 Vulkan: Use clip distance only if supported. 2021-10-12 20:34:42 -07:00
Henrik Rydgård
559ccd9f33 Minor cleanups 2020-12-14 20:06:06 +01:00