Unknown W. Brackets
a88b8a14f6
softgpu: Fix over-optimization of alpha test.
...
When alpha blend is off, was previously skipping the alpha test if only it
was enabled. See #17213 .
2023-03-31 23:53:37 -07:00
Unknown W. Brackets
2c5b0999e8
softgpu: Make debug-only optim more consistent.
...
Of course it doesn't matter when optimizations are enabled in any compiler
that can build PPSSPP...
2023-03-31 23:52:23 -07:00
Henrik Rydgård
c6352a262d
Fix crash in SoftGPU when frameskipping, noticed by sum2012 in Daxter
...
Fixes #17021
2023-02-28 23:21:36 +01:00
Henrik Rydgård
b3ce31c61e
Address feedback
2023-02-26 19:54:30 +01:00
Henrik Rydgård
72bed6f2b5
Some DeviceLost/DeviceRestore cleanup
2023-02-26 11:05:52 +01:00
Henrik Rydgård
231f4efbbb
Move some more stuff to GPUCommonHW
2023-02-26 10:33:11 +01:00
Henrik Rydgård
4c45f8a4b0
Pass in draw directly in GPUCommon::DeviceRestore, instead of awkwardly fetching it
2023-02-25 23:04:27 +01:00
Henrik Rydgård
c2c479b217
Remove function InitClear. Was only implemented for DX9, and only barely meaningful in non-buffered.
2023-02-25 16:32:50 +01:00
Henrik Rydgård
8b54a14bf2
Move the big command table to where it belongs, GPUCommonHW
2023-02-25 16:20:34 +01:00
Henrik Rydgård
e136ad795a
Some slight unification
2023-02-25 15:15:34 +01:00
Henrik Rydgård
18999c3687
Create the GPUCommonHW class.
2023-02-25 14:42:10 +01:00
Henrik Rydgård
ed03348c65
Unify PreExecuteOp, keep the soft GPU as a special case
2023-02-25 12:21:03 +01:00
Unknown W. Brackets
cd3fc26190
samplerjit: Prevent thread local stale cache read.
...
If the generation count happens to match, would still get a stale pointer
and crash. Let's just make the generation count static so it always
increases.
2023-02-22 21:15:03 -08:00
Unknown W. Brackets
89c18d8077
riscv: Cleanup missing Poison, Crash.
2023-02-12 12:10:29 -08:00
Unknown W. Brackets
88ba003f46
ThreadManager: Add a simple priority field.
...
Currently, not actually respected.
2023-02-02 17:08:24 -08:00
Unknown W. Brackets
3a6fa9b4ba
ThreadManager: Don't allow reordering of queue.
...
Allowing a priority item is faster, but can cause confusion when you
expect things to run in the same sequence they're enqueued.
2023-01-14 16:35:01 -08:00
Henrik Rydgård
ffb8a9be47
Fix another subtle NEON type mismatch.
...
Fixes #16777
2023-01-10 14:56:30 +01:00
Henrik Rydgård
ee3618290b
Typo fix in NEON code.
...
Fixes #16772
2023-01-10 12:32:33 +01:00
Unknown W. Brackets
1215714240
softgpu: Use NEON for lighting.
2023-01-07 19:06:35 -08:00
Unknown W. Brackets
62fe03dcb4
softgpu: Use NEON for texture blending.
2023-01-07 19:06:35 -08:00
Unknown W. Brackets
587a322207
softgpu: Use NEON SIMD for alpha blending, etc.
2023-01-07 19:06:34 -08:00
Unknown W. Brackets
e0ed080d8b
softgpu: Use NEON more in triangle rasterization.
...
Some of these places weren't getting converted well.
2023-01-07 19:06:34 -08:00
Unknown W. Brackets
f1b5cbf993
softgpu: Fix lighting with 0 exp.
...
Broken in #15317 . Fixes Kratos scene demo.
2023-01-02 11:42:52 -08:00
Unknown W. Brackets
be84bc9934
softgpu: Detect binner alloc fail and bail.
2023-01-01 06:59:14 -08:00
Unknown W. Brackets
49f6c461ad
Reporting: Fix some header includes.
...
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08: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
d9522a7ac5
softgpu: Avoid clear hazard for last cached funcs.
2022-12-06 21:23:56 -08:00
Unknown W. Brackets
eda3ce556e
softgpu: Avoid atomic structs.
...
Apparently we don't link libatomic and rather than fighting that, I'll
just use thread local values.
2022-12-06 20:35:07 -08:00
Unknown W. Brackets
400f6abf9a
softgpu: Optimize lookup of last jit func.
...
This is common (for example, maybe a pixel state is updated but sampler is
not), and reduces time spent in ComputeRasterizerState() quite a bit in
Darkstalkers, where jits are available (i.e. Intel currently.)
2022-12-06 19:16:19 -08:00
Unknown W. Brackets
87fb9eef37
softgpu: Remove std::function usage.
...
Wanted to avoid coupling these, but don't like the std::function
construct/destructs showing in profiles...
2022-12-06 19:15:57 -08:00
Unknown W. Brackets
77c98441f4
softgpu: Expand fast path to all fb formats.
...
This should speed up 2D games not using 5551, and make it mroe likely any
regression is caught for Darkstalkers.
2022-12-06 18:43:21 -08:00
Henrik Rydgård
49f8f96a98
Couple more microoptimizations
2022-12-07 02:08:48 +01:00
Henrik Rydgård
50fdf67fd0
Software rect raster: Speed up memory tracking in debug mode (ztag unused, remove allocations)
2022-12-07 01:51:20 +01:00
Henrik Rydgård
b51422c18b
Ordering fix, should fix elimination of the DarkStalkers software blit
2022-12-07 01:50:48 +01:00
Henrik Rydgård
70b6733d0a
Minor alpha bit optimization in Darkstalkers rectangle code
2022-12-07 01:50:29 +01:00
Unknown W. Brackets
51fa931e46
softgpu: Allow no alpha blend in 5551 fast path.
2022-12-06 06:37:51 -08:00
Unknown W. Brackets
60c129c52f
softgpu: Use no-modulate fast path for REPLACE.
2022-12-06 06:31:30 -08:00
Unknown W. Brackets
c291bd78ef
softgpu: Use a template for 5551 fast path.
...
Just refactoring here, should be the same.
2022-12-06 06:29:19 -08:00
Unknown W. Brackets
264a81913d
softgpu: Avoid checking UVs for sprites w/o tex.
2022-12-06 06:11:38 -08:00
Unknown W. Brackets
5d6b213fa7
softgpu: Avoid tri combine to rect if clipping.
2022-12-05 23:24:26 -08:00
Unknown W. Brackets
d9501cb0ad
softgpu: Fix w culling of triangle rects.
2022-12-05 23:09:55 -08:00
Henrik Rydgård
e969f9cf8b
Merge pull request #16502 from unknownbrackets/softgpu-opt
...
A few more softgpu optimizations for alpha blend/test
2022-12-05 09:35:36 +01:00
Unknown W. Brackets
07c276c32d
softgpu: Fix double rectangle drawing at halfpixel.
...
There seems to be some odd behavior with the X start pos, but at least the
end pos should not be drawn twice when using 0.5 - 0.5.
2022-12-04 17:47:57 -08:00
Unknown W. Brackets
d6750993d7
softgpu: Force alpha test when it could skip blend.
...
Blending is slow, and often games do effects like smoke, sun, etc. that
has a lot of zero alpha in them. Many games do this with alpha testing
off, which is cheap compared to blending.
2022-12-04 16:36:45 -08:00
Unknown W. Brackets
2c90dafe64
softgpu: Force alpha test off in more scenarios.
...
Since we're already checking the CLUT, we can tell if it doesn't contain
zero alpha, in which case a != 0 test will never fail. This is actually
pretty common, even when texture alpha is not always FF.
2022-12-04 16:30:12 -08:00
Henrik Rydgård
5de3a7c252
Merge pull request #16500 from unknownbrackets/warnings
...
Fixes to recently introduced warnings and a couple older ones
2022-12-04 17:40:30 +01:00
Unknown W. Brackets
3342d5ecb3
softgpu: Remove an unused case.
2022-12-04 08:17:05 -08:00
Unknown W. Brackets
00e76b11b6
softgpu: Optimize > non-zero alpha tests as well.
...
These are fairly common, especially in 3D games.
2022-12-03 12:55:38 -08:00
Unknown W. Brackets
eb19e24399
softgpu: Skip non-zero alpha test if impossible.
2022-12-03 12:54:53 -08:00
Unknown W. Brackets
adc94b1950
softgpu: Use CLUT to optimize out blending more.
...
This actually happens relatively often.
2022-12-03 12:44:02 -08:00