Commit Graph

75 Commits

Author SHA1 Message Date
Henrik Rydgård
b4eecf3d5c Mali: Turn off any depth writes if depth test is set to NEVER. 2024-02-02 11:11:31 +01:00
Henrik Rydgård
533fa14e27 Add a stat for number of verts decoded. It's quite high but not crazy for UFC 2010...
See #18806
2024-02-01 19:19:53 +01:00
Henrik Rydgård
0615ba3e54 Some paranoia and a comment 2024-01-29 00:54:18 +01:00
Henrik Rydgård
8b4f80c562 GPUCommonHW: Check range of indexes for indexed draws. 2024-01-28 22:58:20 +01:00
Henrik Rydgård
822ebf9dfb Use the correct culling function in the fast draw-continuation loop 2023-12-28 10:40:56 +01:00
Henrik Rydgård
e488189723 Inline UpdateUVScaleOffset 2023-12-21 12:10:10 +01:00
Henrik Rydgård
50bcb2a77a Add "Disable culling" as a speedhack for experimentation
Range culling (which we'll just call culling in the setting
name) still is problematic enough that it can be useful to have this
way to turn it off as an escape route. Since disabling it can break some
games like famously TOCA, it needs to be under speedhacks, though likely
the performance change is minimal.

See for example #17061
2023-12-18 13:13:44 +01:00
Henrik Rydgård
33e48e9675 OpenGL: Fix some confusion between gpu->BeginHostFrame and gpu->BeginFrame, fixing black screen 2023-12-11 23:05:37 +01:00
Henrik Rydgård
8d8ff5886b Fix issue where nothing had started a render pass when we wanted to clear the screen. 2023-12-11 13:06:15 +01:00
Henrik Rydgård
7e85d3d10a Disable the new culling on RISC-V for now. 2023-12-09 16:49:02 +01:00
Henrik Rydgård
a043962447 World space planes 2023-12-09 15:55:51 +01:00
Henrik Rydgård
89d8ef87ec Use a less accurate but faster frustum cull for the general draws. 2023-12-09 15:55:51 +01:00
Henrik Rydgård
0905b6a5ad Frustum-cull small draws
Some games do a poor job of culling stuff, and some transparent
sprites can be very expensive if they cause a copy.
Skipping them if outside the viewport makes sense in that case.

One example are the flame sprites in #17797 .

Additionally, we should be able to cull through-mode draws easily, this
one doesn't even try.
2023-12-09 15:55:51 +01:00
Henrik Rydgård
8588b11a6a Rename MayIntersectFramebuffer to MayInteresectFramebufferColor 2023-12-06 09:42:44 +01:00
Henrik Rydgård
fd73522efc Changing UV scale/offset requires us to stop "extending" prims
This is because we currently can't change these scales mid-decode, so we
need to break up the collection there. Note that this still won't cause
a full flush, just that the new extra-efficient tristrip merging can't go
through these commands.
2023-12-03 19:21:55 +01:00
Henrik Rydgård
6d977b4a12 Remove unnecessary struct FramebufferInfo 2023-12-02 13:56:18 +01:00
Henrik Rydgård
632fa1c9d6 Cache and hash data for DrawPixels.
We already had a cache to reuse texture objects so just
opportunistically reuse them when easy to do so.
2023-11-11 19:58:12 +01:00
Henrik Rydgård
e4ea4831e9 Delete the vertex cache option from the code. 2023-10-10 15:43:43 +02:00
Henrik Rydgård
078018a943 Move the clockwise calculation out of DrawEngineCommon 2023-10-10 13:16:34 +02:00
Henrik Rydgård
35fcec1e4b Another small fix, helps Toca series games. 2023-10-10 02:13:25 +02:00
Henrik Rydgård
f6ba4ee4de Only support extending triangle-based draw calls. Fixes Crazy Taxi. 2023-10-09 21:14:00 +02:00
Henrik Rydgård
10bc6b4cd8 Safety check that doesn't fix crazy taxi 2023-10-09 21:10:53 +02:00
Henrik Rydgård
a8b8580756 Don't forget to check the stall address, even in the optimized primitive loop 2023-10-09 14:08:11 +02:00
Henrik Rydgård
ae58fe3828 In GL and Vulkan soft-skin, we might not be fully done decoding when we reach flush. Take that into account. 2023-10-08 16:51:58 +02:00
Henrik Rydgård
cd35252400 DrawEngine; Convert strip sequences in a tight loop 2023-10-06 16:25:13 +02:00
Henrik Rydgård
226d25721a Add a block transfer GPU stat, remove a redundant one 2023-10-03 13:15:55 +02:00
Henrik Rydgård
af7efe4b5d Fix. Need to flush soft-skinned vertices when changing vertex format. 2023-10-03 11:01:37 +02:00
Henrik Rydgård
200575b2bc Allow the new optimization through redundant VADDR instructions, very common 2023-10-03 11:01:37 +02:00
Henrik Rydgård
3aa0f5b543 A bit more 2023-10-03 11:01:37 +02:00
Henrik Rydgård
4d95250052 Optimize further 2023-10-03 11:01:37 +02:00
Henrik Rydgård
0260aebc26 Implement fast-path for merging non-indexed draws quickly. 2023-10-03 11:01:37 +02:00
Henrik Rydgård
e63bb0459c Add a new stat, so we can see per game if the optimization has an effect 2023-10-03 11:01:37 +02:00
Henrik Rydgård
76ad3dec4d Revert unclear optimization 2023-10-01 16:43:33 +02:00
Henrik Rydgård
bd931f9cbe Additional minor cleanups 2023-10-01 14:31:46 +02:00
Henrik Rydgård
3cef04f885 Fix incorrect flushing behavior in the prim sequencer, small optimization 2023-10-01 14:23:34 +02:00
Henrik Rydgård
a2fe906534 Micro-optimization: Don't need to check drawcalls for 0. Extract shared expression. Yes I checked assembly. 2023-10-01 14:10:19 +02:00
Henrik Rydgård
52ad0d0335 Minor cleanup in Prim() 2023-10-01 13:57:41 +02:00
Henrik Rydgård
4b89fab91c NativeInitGraphics: Update core parameter pixel width/height (since we lose resized flag) 2023-08-30 23:42:13 +02:00
Henrik Rydgård
8a6e288fcc Add checkboxes in developer tools to allow disabling ubershaders.
Might be helpful to diagnose performance problems on user devices.

Additionally, moves the texture replacement controls to the top. They
should probably be moved somewhere else entirely...

See #17918
2023-08-17 20:16:04 +02:00
Henrik Rydgård
061131ec8a Cache planes used for BBOX culling
This isn't a huge performance boost for the games that use BBOX (like
Tekken), but it'll be more valuable if we start using soft culling more
widely automatically, see #17808
2023-07-30 14:42:22 +02:00
Henrik Rydgård
6da6de8201 Re-enable framebuffer fetch for blend where available.
Accidentally disabled this in #17575

Helps #17797 but only on OpenGL on mobile. There's more to improve
there.

caps_.framebufferFetchSupported is now always set to false in Vulkan.
2023-07-30 11:13:42 +02:00
Henrik Rydgård
def09bf575 Update the uvscale uniform a bit more conservatively on framebuffer changes
Plus fixes a few minor oversights

Fixes #17581 and possibly #17522
2023-06-15 11:57:30 +02:00
Henrik Rydgård
6d8069dfd1 Vulkan: Remove the remains of the input attachment experiment
Haven't been using these for a while.

I've come to the conclusion here that I think it's better to try to
deal with the issues using safe workarounds like copies, instead of
relying on features with somewhat iffy driver support that are not
universal across APIs anyway.
2023-06-13 20:46:27 +02:00
Henrik Rydgård
ea552bc573 Add a new GPU stat (DrawPixels), kinda heavy since creates textures. GoW does 20-ish per frame. 2023-05-30 10:15:34 +02:00
Henrik Rydgård
ad8827ae70 Cleanup, address feedback 2023-05-26 10:28:10 +02:00
Henrik Rydgård
80e47b7bd3 Only dirty the uniform UVSCALEOFFSET when really needed
Broken out from #17479

With OpenGL, greatly reduces the amount of glUniform4fv calls in many games (and
similar in the other backends).
2023-05-25 15:00:57 +02:00
Henrik Rydgård
7178c0cd42 Restore fragmentshader ID flags double and texalpha. Add a ubershader mode that uses dynamic state. 2023-05-25 10:19:01 +02:00
Henrik Rydgård
0babac5c5f Manually revert "Remove LM flag from vshader too" (#16718)
Reverts #16718

Though maybe we can keep this one? Let's see.
2023-05-09 18:44:18 +02:00
Henrik Rydgård
f42c682d34 Revert "Merge pull request #16628 from hrydgard/remove-fog-fshader-flag"
This reverts commit 10dee90c83, reversing
changes made to 34c11c8acf.
2023-05-08 22:01:38 +02:00
Henrik Rydgård
ff72203a06 Remove now-redundant check, add a TODO 2023-05-05 23:46:19 +02:00