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
Unknown W. Brackets
4d06400548
softgpu: Fix compile hazard while running.
...
This prevents any clearing of cache while other threads may be using
previously cached funcs, and avoids wx exclusive hazards.
2022-11-20 12:04:02 -08:00
Unknown W. Brackets
ce51942508
softgpu: Correct WX-exclusive platform hazards.
...
Should mainly affect BSD at this point.
2022-11-20 10:55:35 -08:00
Unknown W. Brackets and GitHub
79b1d1d35f
softgpu: Better approximate slope mip level mode ( #16276 )
...
* samplerjit: Remove unused x/y parameters.
Still need to tune the accuracy of filtering, but those were not the
right way.
* softgpu: Better approximate slope mip level mode.
This isn't exactly right, but it's closer.
* softgpu: Calculate auto from largest difference.
Direction shouldn't matter.
2022-10-23 10:15:43 +02:00
Unknown W. Brackets
1931fa2f5f
softgpu: Make triangle fan rect detection generic.
2022-10-16 16:01:09 -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
c47d7eab38
softgpu: Simply 5551 blending fast path.
...
Since it only supports multiply and add, let's just stick with that.
2022-09-24 18:55:45 -07:00
Unknown W. Brackets
1eeb4f0bcf
softpu: Refactor out 5551 fast path checks.
...
They were duplicated, and better to organize them according to state.
2022-09-24 18:55:45 -07:00
Unknown W. Brackets
f30b1d048d
softgpu: Avoid fast path in another wrong case.
...
Seen in Kurohyo. Missed that the alpha blend check essentially means only
standard blending can work.
2022-09-24 17:53:09 -07:00
Unknown W. Brackets
cefef3b4f9
softgpu: Narrow blend check for fast path further.
...
See #15756 , frame was largely black because of a full screen blend
rectangle intended to brighten the screen slighty (I assume.)
2022-09-20 14:29:33 -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
9b01fce5b5
softgpu: Run early Z tests in fast rect path.
...
Needed for some 2D games, like Criminal Girls.
2022-09-17 13:37:54 -07:00
Unknown W. Brackets
1be5f1670c
softgpu: Remove mostly unused screen offset state.
...
This is now already cleaned up from coords, so no need to cache it.
2022-09-12 22:02:10 -07:00
Unknown W. Brackets
167213c746
softgpu: Cache texture bufws at 16 bit.
...
Reducing the size of state a bit.
2022-09-12 21:57:00 -07:00
Henrik Rydgård and GitHub
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
288d18447d
softgpu: Detect full triangles as rectangles.
...
Seen in a dump from Infected, improves FPS ~25% there.
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
2e3b73abaa
softgpu: Restrict sprite fast path to throughmode.
...
Its UV checks already should have generally, but let's be safe. It
doesn't validate state like fog, etc.
2022-09-11 08:22:37 -07:00
Henrik Rydgård and GitHub
d86127ac5e
Merge pull request #15999 from unknownbrackets/softgpu-texsize
...
softgpu: Clamp/wrap textures at 512 pixels
2022-09-11 10:12:38 +02:00
Unknown W. Brackets
90e009edb9
softgpu: Clamp/wrap textures at 512 pixels.
...
A texture larger than 512 is "valid", but simply wraps/clamps at 512.
Importantly, the texture coords are still calculated at the specified
size, which can be up to 32768.
2022-09-10 20:23:09 -07:00
Unknown W. Brackets
f5f5c9ea87
softgpu: Avoid calling unordered coords tl/br.
...
These are just corners, we don't know if they're top or not at this point.
2022-09-10 14:58:27 -07:00
Unknown W. Brackets
13ca08b235
softgpu: Avoid over-aggressive rect conversion.
...
The TL and BR have to match between UVs and pos, not enough for UV to be
in order. This was causing an artifact on Chains of Olympus' title.
2022-09-10 14:56:13 -07:00
Unknown W. Brackets
e7d49cd7d0
softgpu: Allow almost flat rectangles to go fast.
...
Improves transform rectangles used in Chains of Olympus, for example on
the title screen.
2022-09-10 13:29:40 -07:00
Unknown W. Brackets
6004d4a459
softgpu: Refactor duplicate rectangle compat check.
...
This just moves the logic to a single place for changes.
2022-09-10 13:28:35 -07:00
Henrik Rydgård
a91219bebc
The Darkstalkers subpixel check should be == 0. Fixes #14953 again
2022-09-05 19:12:45 +02:00
Unknown W. Brackets
15b73b56bb
softgpu: Correct texture check in fastpath.
...
This is the no textures option, so we shouldn't check sampler state at
all. Presumably this was failing and reading uninitialized data...
2022-09-03 11:21:14 -07:00
Unknown W. Brackets
af004dd53d
softgpu: Validate alpha test properly for fastpath.
...
We don't want a weird LESS test being mishandled.
2022-09-03 11:19:24 -07:00
Unknown W. Brackets
ba1ced4992
softgpu: Avoid rect fast path with subpixel offset.
...
It doesn't handle it right, see #15876 . We still handle these with
DrawRectangle(), which gets it right.
2022-09-03 11:08:11 -07:00
Unknown W. Brackets
6737d69f0a
softgpu: Cleanup some now unused state.
2022-02-20 09:19:48 -08: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
3d4c1548b6
softgpu: Allow tri -> rect in transform.
2022-02-12 12:03:55 -08:00
Unknown W. Brackets
259b10d42a
softgpu: Turn more tri strips into rects.
...
This catches a common case in Valkyrie Profile.
Rotation is resolved by just always using tl/br.
2022-02-12 11:33:42 -08:00
Unknown W. Brackets
2381f355c2
softgpu: Combine tris to rects with ignored z too.
2022-02-12 11:33:36 -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
3010cd56d1
softgpu: Correct simple rectangles with mipmaps.
...
Might be used for fonts, we could potentially check for bias/slope, but
mipmaps are uncommon in direct through draws anyway.
2022-01-23 12:26:58 -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
a228b2ab6c
softgpu: Use cached sampler state outside jit.
2022-01-15 15:26:26 -08:00
Unknown W. Brackets
0b3f096c01
softgpu: Cache strides in draw pixel state.
2022-01-15 13:03:10 -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
Unknown W. Brackets
6839aac109
Debugger: Cache list PC for softgpu tagging.
...
Still slow, but improved.
2022-01-12 21:23:49 -08:00
Unknown W. Brackets
d962fb35d3
softgpu: Centralize more prim drawing state.
2022-01-12 21:23:49 -08:00