Henrik Rydgård
880379c15d
Extract some minor changes from #17497
2023-06-12 20:20:06 +02:00
Henrik Rydgård
72bed6f2b5
Some DeviceLost/DeviceRestore cleanup
2023-02-26 11:05:52 +01:00
Unknown W. Brackets
be84bc9934
softgpu: Detect binner alloc fail and bail.
2023-01-01 06:59:14 -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
dc962094f8
softgpu: Correctly fix inversions, matching tests.
...
Inversions are allowed just fine, but if clipping results in coordinates
outside range, the triangle should be culled. Fixes more wanted
inversions.
2022-11-30 23:20:39 -08:00
Unknown W. Brackets
7880eb15c1
softgpu: Always use software skinning.
...
There's only software skinning, after all.
2022-11-06 08:44:22 -08:00
Unknown W. Brackets
80cccd7abb
Build: Fix debug build on Windows 32-bit.
2022-10-01 17:07:27 -07:00
Unknown W. Brackets
6282f8b05f
softgpu: Expand texture coords to include q.
...
We'll need this to correctly project.
2022-09-26 17:13:14 -07:00
Unknown W. Brackets
8376176b2f
softgpu: Split clippos out of rasterization vert.
...
We don't use it, except w, at all in rasterization, so no need to keep it
in the bin queue.
2022-09-26 16:50:40 -07:00
Unknown W. Brackets
88b3b26ed3
softgpu: Cache reused indexed verts.
...
This happens a lot for spline/bezier, so can significantly speed up curve
heavy scenes. Isn't necessarily that common otherwise, though.
2022-09-22 18:27:59 -07:00
Unknown W. Brackets
6877ff1af2
softgpu: Fix state/continuation for imm prims.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
596b07bd2e
softgpu: Support fog and color1 on imm verts.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
35ba01e01f
softgpu: Refactor imm draws to bypass vert read.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
de080e2594
softgpu: Simplify vertex range culling.
...
The previous logic was harder to understand and easier to get wrong.
Just drop them when clipping the primitive.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
028a341cc8
softgpu: Explicitly flush on sync and output.
...
We could in theory skip flush on FinishDeferred, and allow some CPU/GPU
overlap. If we did, we'd still want to flush at these times.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
8371091734
softgpu: Force correct alignment on 32-bit.
2022-09-12 22:15:02 -07:00
Henrik Rydgård
2791ab3226
Merge pull request #16011 from unknownbrackets/softgpu-rect
...
Detect more triangles as rectangles in softgpu
2022-09-12 08:35:13 +02:00
Unknown W. Brackets
ce4fee7373
softgpu: Refactor triangle cull processing.
2022-09-11 22:39:32 -07:00
Unknown W. Brackets
8a6e8066bf
softgpu: Store vertex colors as packed RGBA8.
...
No need to keep it expanded at 4x the space for both colors.
2022-09-11 18:41:06 -07:00
Unknown W. Brackets
8c55e18ea8
softgpu: Switch vert continue buffer to members.
...
Better this than static. May be easier to handle imm prims correctly.
2022-09-11 08:54:34 -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
Henrik Rydgård
e6403d7157
Split GetPointer into two versions, to help with const correctness
2022-07-24 13:26:19 +02:00
Unknown W. Brackets
1bc3acf2ed
softgpu: Use a const for subpixel screenpos factor.
2022-02-19 21:03:49 -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
61e30e8f8b
softgpu: Fix cull in throughmode.
...
Was only an issue for triangles used to draw rectangles, but caused our
test to fail.
Also move a test that was failing due to an outdated prx to passing.
2022-01-25 19:07:33 -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
3e4d768e7a
softgpu: Pack vertexdata a bit better.
...
This reduces the BinItem size by 15%.
2022-01-19 23:17:09 -08:00
Unknown W. Brackets
12a4c63fc7
softgpu: Precompute state for vertex transform.
...
Doesn't help a ton, but with lots of verts can improve a percent or two.
2022-01-16 21:31:52 -08:00
Henrik Rydgård
bdc69f5171
Merge pull request #15317 from unknownbrackets/softgpu-lighting
...
softgpu: Precompute lighting parameters
2022-01-17 01:06:35 +01: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
d95475e021
softgpu: Expose flush reasons/times in debug stats.
2022-01-16 11:27:42 -08:00
Unknown W. Brackets
2de7993dc5
softgpu: Decorate some stats for flushes.
2022-01-16 08:23:15 -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
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
18f2a45a6a
softgpu: Allow binning across prim calls.
2022-01-16 00:49:49 -08:00
Unknown W. Brackets
6896a7a64e
softgpu: Use cached state for screen offset.
2022-01-15 18:20:25 -08:00
Unknown W. Brackets
02c5559393
softgpu: Remove z from DrawingCoords.
...
It's not really used much of anywhere, anyway.
2022-01-15 15:38:56 -08:00
Unknown W. Brackets
f091225572
softgpu: Stop storing model pos.
...
We don't even use this anywhere else. Also skip needless Lerp on clip.
2022-01-14 20:36:09 -08:00
Unknown W. Brackets
d6a8cb2a0e
softgpu: Stop storing normal/worldnormal/worldpos.
...
This is only needed for lighting, which is applied right away.
This improves perf just simply from less data being copied.
2022-01-14 20:32:18 -08:00
Unknown W. Brackets
5bb6245b1f
softgpu: Fix leaked range flag on cull.
...
Fixes some backgrounds in Final Fantasy 4, probably others.
2021-11-14 08:43:52 -08:00
Unknown W. Brackets
ac60e2ecd4
GPU: Track HW tess at start of frame too.
...
This also makes it so we don't force the setting off when you change
backends, and just ignore it if unsupported.
2020-04-04 11:52:32 -07:00
Unknown W. Brackets
8a7ec4fc19
GPU: Fix curve breakage due to cull flipping.
2018-12-16 13:00:36 -08:00
Henrik Rydgård
8f9e0b7fcc
SoftGPU: Make sure transformunit.buf is properly aligned. Helps part of #9718
2017-05-24 10:20:10 +02:00
Unknown W. Brackets
8187927b9d
SoftGPU: Use vertexjit for submitted primitives.
...
This uses the standard cache other rendering uses.
In Legend of Heroes 3, for example, this provides a 10% speed improvement.
2017-05-20 20:22:35 -07:00
Unknown W. Brackets
01076dd959
SoftGPU: Don't wrap negative positions.
...
Haven't fully verified this, but without this, Gods Eater Burst's bloom
doesn't work, since -1,-1 maps to 1023,1023 so everything is clipped.
2017-05-13 17:28:38 -07:00
Unknown W. Brackets
1666586869
SoftGPU: Implement CONTINUE prim type.
...
Matches tests (except 3D lines, which aren't implemented yet.)
2017-04-29 20:36:36 -07:00
Unknown W. Brackets
1e78642a7b
SoftGPU: Remove old spline handling code.
2017-04-15 21:10:19 -07:00
Unknown W. Brackets
dfed20701a
SoftGPU: Correct negative coord handling.
...
Fixes #5159 - we need this signed to handle negative values properly.
2017-04-15 19:52:17 -07:00
Henrik Rydgard
842817c91d
Add fog support to software rasterizer (as if it wasn't slow enough already)
2015-06-11 16:01:17 +02:00