1291 Commits
Author SHA1 Message Date
Unknown W. Brackets dad85b97f1 softgpu: Use KEEP for any invalid stencil ops.
This just keeps the ID more consistent.
2021-11-25 21:02:20 -08:00
Unknown W. Brackets d4bf7ea392 sofgpu: Disable alpha blend for invalid equations. 2021-11-25 19:23:41 -08:00
Unknown W. Brackets 35444b3051 softgpu: Accurately alpha blend. 2021-11-25 19:23:41 -08:00
Unknown W. Brackets 2acf7f4edf softgpu: Use 0 alpha for 565 alpha blending.
We were previously blending as 0xFF.
2021-11-25 19:23:40 -08:00
Unknown W. Brackets 2ef7dd6b03 softgpu: Correct tagging of vertexjit. 2021-11-25 19:21:56 -08:00
Unknown W. Brackets 73de8db996 softgpu: Fix stencil DECR on 5551. 2021-11-25 19:21:56 -08:00
Unknown W. Brackets 53c6a3933d softgpu: Use ALWAYS for alpha/depth test in clear. 2021-11-25 19:21:55 -08:00
Unknown W. Brackets 876c8cd368 softgpu: Fix PixelFuncID size.
Oops, can't use unions in bitfields.  Also improve typesafety.
2021-11-21 09:40:13 -08:00
Unknown W. Brackets 28bc91bd79 softgpu: Add func to tersely name pixel funcs. 2021-11-21 08:23:32 -08:00
Unknown W. Brackets f8bc6e5b9e softgpu: Template draw pixel on fb format.
This introduces a small 5-10% perf improvement.
2021-11-21 08:23:32 -08:00
Unknown W. Brackets 09dc38080a softgpu: Move draw pixel code to separate file.
This separates things better anyway.  No major perf impact.
2021-11-21 08:23:32 -08:00
Henrik Rydgård 824805ec1e Merge pull request #15154 from unknownbrackets/softjit
Use a pixel func ID in software rendering
2021-11-21 10:50:06 +01:00
Unknown W. Brackets e2f0713cc2 softgpu: Clamp and round fog by mantissa bits.
This matches hardware calculated fog values much better.
2021-11-20 20:54:52 -08:00
Unknown W. Brackets 9abf2a4725 softgpu: Confirm mask doesn't hit stencil REPLACE. 2021-11-20 18:53:51 -08:00
Unknown W. Brackets aa3786ed21 softgpu: Force off alpha blend if uselessly on.
This is a simple optimization to prevent some work games sometimes waste.
2021-11-20 15:27:04 -08:00
Unknown W. Brackets 26378f9c89 softgpu: Specialize sprite based on pixel func ID. 2021-11-20 15:27:04 -08:00
Unknown W. Brackets f7a31c992d softgpu: Use pixel func ID to draw pixels.
This just reduces reliance on gstate directly, and should help keep things
consistent.
2021-11-20 15:27:04 -08:00
Unknown W. Brackets 953200c995 softgpu: Add func to calculate pixel func ID.
This normalizes some things, and eventually can be used for a jit key.
2021-11-20 15:27:04 -08:00
Unknown W. Brackets b6bdd69572 softgpu: Clear by dividing out subpixel first. 2021-11-15 06:26:11 -08:00
Unknown W. Brackets f802c3bc6d softgpu: Add some comments and cleanup. 2021-11-15 06:09:12 -08:00
Unknown W. Brackets babd63c644 softgpu: Tune thread minimums better.
Darkstalkers seems more sensitive to these than many other games, this
improves performance more.
2021-11-14 18:44:30 -08:00
Unknown W. Brackets 66f635cba0 sfotgpu: Use threads to apply clears. 2021-11-14 18:31:46 -08:00
Unknown W. Brackets 2ab7499d8d softgpu: Combine sliced rectangles.
This mostly affects clears, and reduces overhead.  Only about 2%
improvement, but it's a small change.
2021-11-14 18:31:46 -08:00
Unknown W. Brackets 0281e2f017 softgpu: Split out rectangle path for combining. 2021-11-14 18:31:46 -08:00
Unknown W. Brackets 9545e3b0e2 softgpu: Fixup range cull for fans and fast path. 2021-11-14 18:31:45 -08:00
Unknown W. Brackets fb6fadbbb7 softgpu: Fast path rectangles as fans.
Some games, such as Legend of Heroes III, use fans instead of strips.
2021-11-14 18:31:45 -08:00
Unknown W. Brackets 09a9927b82 softgpu: Use range loops for sprite fast path. 2021-11-14 18:31:45 -08:00
Unknown W. Brackets 55cde6bd6a softgpu: Check flat z in fast path. 2021-11-14 12:27:39 -08:00
Unknown W. Brackets 361c8f966c softgpu: Fast path triangles without textures.
The fast path may still be useful in this case.
2021-11-14 12:27:39 -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 f66e243727 softgpu: Correct scissor for pixel centers. 2021-11-07 11:19:41 -08:00
Unknown W. Brackets 8db2d37e64 softgpu: Fix depth cull in softgpu.
Was improperly skipping cull for positive Z.
2021-11-05 21:38:13 -07:00
Unknown W. Brackets fe440d40e5 softgpu: Clip full weighted Z without truncating.
In case wsum_recip is nan or similar, we want to make sure we still
properly clip to minz/maxz.
2021-11-05 21:36:38 -07:00
Unknown W. Brackets f03fa2b0b8 softgpu: Improve accuracy of line drawing.
Needs higher precision to change pixel at the right time.

This makes the lines in Persona 1 look right, see #3871.
2021-11-04 00:11:09 -07:00
Unknown W. Brackets b1009f70f9 softgpu: Allow end coordinate at bounds.
Oops, was excluding some valid usage that wouldn't wrap.
2021-09-30 06:33:25 -07:00
Unknown W. Brackets 953916a842 softgpu: Avoid fast path for clamp/wrap cases.
It doesn't clamp or wrap, and those are uncommon for the fast path.
Fixes #14951.
2021-09-29 19:19:21 -07:00
Unknown W. Brackets 08816a544d softgpu: Implement DXT5 in samplerx86. 2021-09-12 17:17:09 -07:00
Unknown W. Brackets c4de5bfb9f softgpu: Implement DXT3 in samplerx86. 2021-09-12 14:53:55 -07:00
Unknown W. Brackets ee9d19430f softgpu: Implement DXT1 decoding in samplerx86. 2021-09-12 13:57:28 -07:00
Unknown W. Brackets a0eeb52444 softgpu: Decode DXT texels directly.
This improves performance a lot compared to decoding the whole block.
Eventually we may implement a cache, but threading makes that complex to
make properly fast.
2021-09-12 09:37:34 -07:00
Unknown W. Brackets 121c56e6db softgpu: Clip only on -Z, cull if entirely outside.
This is important for several issues, like #12058 or #12060, where
something is drawn entirely outside valid Z, and should be culled.
2021-09-09 20:13:42 -07:00
Unknown W. Brackets 0b73c1ce83 softgpu: Correct guardband cull behavior.
Culling is based on whether clipping happens, not whether clamping
happens.  This is important for issues like #12348.
2021-09-09 20:05:41 -07:00
Unknown W. Brackets b5ba469826 softgpu: Prevent pixel gaps when drawing sprites.
If you end a sprite at 255.9, it draws the pixel at 255.  This uses the
same logic to handle that as in the triangle path.
2021-09-06 22:05:39 -07:00
Unknown W. Brackets 7addc18a6b softgpu: Avoid overflow infinite loop.
For certain large values, it would overflow and continue looping
endlessly.
2021-09-05 23:24:08 -07:00
Henrik Rydgård 3be5c7bd9a Make the minimum items per thread explicit. Found some bugs, optional arguments are evil. 2021-06-12 21:21:28 +02:00
Henrik Rydgård 73871b9b7e Implement new thread manager, port stuff to it. 2021-06-12 13:03:53 +02:00
Unknown W. Brackets 3304814fd6 GPU: Minor cleanup duplicate header/conditions. 2021-05-08 09:12:22 -07:00
Unknown W. Brackets de46b0998a GPU: Correctly initialize HW tessellation support.
Oops, shouldn't call a virtual in a constructor.
2021-05-08 09:10:23 -07:00
Unknown W. Brackets 8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Unknown W. Brackets ee749804fc Debugger: Note GPU block transfer src as well. 2021-04-03 18:11:44 -07:00