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
4d92533907
softgpu: Apply optimizations to states generically.
...
This is for optimizations we can only do when we know the vertex values.
2022-12-02 21:30:53 -08:00
Unknown W. Brackets
7e7eabf86a
softgpu: Use threads on self-render if safe.
...
Some games, such as Prince of Persia, self-render 1:1 to colorize, rather
than to scale or blur. We can still use threads in these cases.
2022-11-13 12:34:31 -08:00
Unknown W. Brackets
24560eef5c
softgpu: Avoid waiting for a thread to drain.
...
If we can, we want to keep the thread queues healthy, but not full.
Reduce the amount we push on a typical drain to avoid the Wait().
2022-09-24 20:01:00 -07:00
Unknown W. Brackets
1aa6841759
softgpu: Increase queued prims.
...
We made them smaller, so we can queue more of them in the same space.
Helps a little bit.
2022-09-24 20:01:00 -07:00
Henrik Rydgård
d743bfac93
Merge pull request #16085 from unknownbrackets/softgpu-vert
...
softgpu: Cache reused indexed verts
2022-09-24 00:00:26 +02:00
Unknown W. Brackets
66b6dfd0a5
softgpu: Fix self-render detect in Ridge Racer.
...
When we flush we mark all pending writes zero, but we rely on this being
set to detect self-render.
TRANSFORM_ALL was wrong as well, sometimes clearing BINNER_RANGE.
2022-09-22 20:36:15 -07:00
Unknown W. Brackets
84a3f6de71
softgpu: Remove unnecessary state param.
...
Oops, meant to remove this when refactoring imm prims.
2022-09-22 18:18:49 -07:00
Unknown W. Brackets
5f2e20d8ca
softgpu: Reduce some minor bin item field sizes.
2022-09-11 18:39:14 -07:00
Unknown W. Brackets
7a83f8bab5
softgpu: Use vertType prim override for flags.
...
These parameters are a real shame, was so clean before...
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
88e8f95293
softgpu: Flush on transfer to pending tex read.
...
Potentially could use these for self-render, but so far we should be
detecting that so leaving it alone.
2022-08-20 23:22:21 -07:00
Unknown W. Brackets
a3f682fc5a
softgpu: Reduce memory usage on 32-bit.
2022-03-13 13:34:14 -07:00
Unknown W. Brackets
e68b16af69
softgpu: Enure aligned bin queues.
...
On 32-bit, we still want these aligned to 16 bytes.
2022-03-13 13:33:19 -07:00
Unknown W. Brackets
cc6491342e
softgpu: Prepare dedicated rectangle path.
...
We're still sometimes using the slow rect-as-triangles path, let's do
something faster. As a first step, just handle binning.
2022-02-20 09:38:51 -08:00
Unknown W. Brackets
a66377fdf1
softgpu: Remove offset from screenpos.
...
This simplifies tighter calculations, and reduces the common magnitudes
we'll be dealing with.
2022-02-19 20:38:44 -08: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
9ea5367a8c
softgpu: Add dirty flags for rasterization state.
2022-01-23 08:08:41 -08:00
Unknown W. Brackets
76f9103e97
softgpu: Add a table and initial dirty flags.
...
Not actually using the dirty flags to skip state, but have moved to
Execute_* functions and everything else like other graphics backends.
2022-01-23 08:08:40 -08:00
Unknown W. Brackets
c0c3f7284a
softgpu: Avoid flush texturing from stride.
...
This generally detects overlap more accurately using a dirty rectangles
approach. Also detects render to self much more accurately, including
with depth.
2022-01-20 18:39:01 -08:00
Unknown W. Brackets
c4c54730bf
softgpu: Remove bin asserts.
...
These are active in release and used in tight loops.
2022-01-20 16:59:38 -08:00
Unknown W. Brackets
55c11425e4
softgpu: Use persistent bin task state.
...
It's constant, so it's better to avoid the copying and allocation. A
small win, but removes new from the profile.
2022-01-20 16:58:43 -08:00
Unknown W. Brackets
83adc44c2b
softgpu: Heuristic to avoid over-draining.
...
Some games (i.e. VC3) benefit from an early drain, since they get more
done while processing more verts. Others finish the draw quickly, and
then cause significant overhead in queueing new threads.
This attempts to balance the two, and improves Call of Duty and Blade
Dancer.
2022-01-16 21:09:28 -08:00
Unknown W. Brackets
1764111a4b
softgpu: Reduce wasted memory.
2022-01-16 11:49:41 -08:00
Unknown W. Brackets
cb5ac04d16
softgpu: Tune some queue sizes for perf.
...
Using a chunk of RAM for this, but mostly with many threads.
2022-01-16 11:27:43 -08:00
Unknown W. Brackets
d95475e021
softgpu: Expose flush reasons/times in debug stats.
2022-01-16 11:27:42 -08:00
Unknown W. Brackets
cc155ec460
softgpu: Avoid texture/CLUT flush unless overlap.
...
Only need to flush here if there's some overlap in the target.
2022-01-16 08:22:13 -08:00
Unknown W. Brackets
9466dc6397
softgpu: Flush on offset changes.
2022-01-16 08:14:10 -08:00
Unknown W. Brackets
d6fa301ab1
softgpu: Track CLUTs as states for binning.
...
This way we can have multiple CLUTs in process at once, which helps.
2022-01-16 08:14:09 -08:00
Unknown W. Brackets
b42ebe15d8
softgpu: Fix off-by-one size limit on bin queues.
2022-01-15 21:59:23 -08:00
Unknown W. Brackets
2539fb7c3c
softgpu: Tune queue push/pop to reduce overhead.
...
These aren't safetly atomic with concurrent pushers or poppers, but as
long as there's only one of each, they're still safe.
Shaves a decent % off Drain time for heavy scenes.
2022-01-15 20:18:49 -08:00
Unknown W. Brackets
3134bd1ff9
softgpu: Cleanup push/pop atomic handling.
...
Two concurrent push/pops would hazard, though we don't do that.
This improves perf a bit by avoiding an atomic read again.
2022-01-15 00:02:31 -08:00
Unknown W. Brackets
5a35525fd4
softgpu: Enqueue batches of prims when binning.
...
This cuts some thread overhead.
2022-01-14 20:19:32 -08:00
Unknown W. Brackets
970e9c2f51
softgpu: Move threading into BinManager.
...
This threads much more effectively, across entire prim call.
2022-01-13 22:45:23 -08:00
Unknown W. Brackets
48ef4a18b1
softgpu: Handle scissor/range in BinManager.
2022-01-13 19:07:41 -08:00
Unknown W. Brackets
a0a9b1e89b
softgpu: Add class to manage and enqueue for bins.
...
For now, just forwarding.
2022-01-13 09:26:59 -08:00