Commit Graph
39166 Commits
Author SHA1 Message Date
Unknown W. Brackets e1ed49a3e4 softjit: Ensure all regs are released. 2021-11-28 08:03:14 -08:00
Unknown W. Brackets d53e13b862 softjit: Manage args in the register cache. 2021-11-28 08:03:13 -08:00
Henrik Rydgård aa12c9b391 Merge pull request #15163 from unknownbrackets/softjit
Implement a jit for drawing pixels in the software renderer
2021-11-28 08:26:05 +01:00
Henrik Rydgård cf6e11e1d1 Merge pull request #15176 from unknownbrackets/sdl-inflight
SDL: Respect inflight frames setting in GL
2021-11-27 23:06:05 +01:00
Unknown W. Brackets 6fbcf67093 softjit: Fix disabled cache. 2021-11-27 11:32:47 -08:00
Unknown W. Brackets 12b790bb81 ThreadManager: Protect against teardown hang/leak.
Make sure we lock during canceled checks/updates, and also try to free
tasks queued on threads that didn't end up running.
2021-11-27 08:57:19 -08:00
Unknown W. Brackets de9a4dcede ThreadManager: Lock notify on global queue add.
Otherwise, it's possible the chosen thread might not wake up, and then it
may wait for another task to be enqueued - potentially causing a hang.
2021-11-27 08:57:19 -08:00
Unknown W. Brackets d15af6e9d9 ThreadManager: Use atomic task optimistically.
This makes EnqueueTaskOnThread take priority as well.
Gives about 1% improvement in softgpu, reducing overhead a bit.
2021-11-27 08:07:12 -08:00
Unknown W. Brackets f8e50b1dc7 SDL: Respect inflight frames setting in GL. 2021-11-27 06:57:26 -08:00
Unknown W. Brackets 0c6c2fb47a jit: More atomically update pointer. 2021-11-27 06:00:18 -08:00
iota97 6d38ea31df Make CRT animation speed configurable 2021-11-27 10:53:28 +01:00
Unknown W. Brackets 1cb48a7bd2 softjit: Reduce jit pool size a bit. 2021-11-26 10:30:00 -08:00
Unknown W. Brackets 1f9dc3a568 softjit: Precalculate write mask and dither.
This is slightly abusing PixelFuncID, but the intent is to provide some
memory that's easily accessible from the jit func, but still associated
with that calculation (i.e. not global.)
2021-11-26 10:12:54 -08:00
Unknown W. Brackets 4e6a5ce760 softjit: Log any failed compiles. 2021-11-26 09:30:49 -08:00
Unknown W. Brackets 446eec0dff softjit: Keep color 16-bit when useful.
Reuse it expanded where we can, in case of dither+fog+blend, etc.
2021-11-26 09:30:48 -08:00
Unknown W. Brackets c62457bb33 softjit: Optimize common blend inverse alpha case. 2021-11-26 09:30:48 -08:00
Unknown W. Brackets 1fa4e6ba2c softjit: Add alpha blending factors. 2021-11-26 09:30:48 -08:00
Unknown W. Brackets bc8d5ad372 softjit: Cache zero vector to avoid recreating. 2021-11-26 09:30:48 -08:00
Unknown W. Brackets a07017dbb0 softjit: Prefer easier to refill regs. 2021-11-26 09:30:47 -08:00
Unknown W. Brackets 932481d3cd softjit: Minor tweak to reg order for XCHG.
It's easier to use it in these places, but seems it stalls longer on the
dest reg.
2021-11-26 09:30:47 -08:00
Unknown W. Brackets 7f167c3660 softjit: Implement min/max/absdiff blending.
Alpha not yet implemented.
2021-11-26 09:30:47 -08:00
Unknown W. Brackets 771d459025 softjit: Use SSE4.1 for fog and dither a bit. 2021-11-26 08:42:17 -08:00
Unknown W. Brackets cf888257ab softjit: Fix dithering bug. 2021-11-26 08:21:15 -08:00
Unknown W. Brackets 3f3e0ea8cf softjit: Optimize typical alpha/depth test.
Messed with SSE4 then realized there's no point, just use SHR.
2021-11-26 08:21:14 -08:00
Unknown W. Brackets 6644c4225c softjit: Apply logic ops. 2021-11-26 08:21:14 -08:00
Unknown W. Brackets 961273fcf5 softjit: Apply color write mask. 2021-11-26 08:21:14 -08:00
Unknown W. Brackets a49a189962 softjit: Refactor color conv to dedicated funcs.
Will use this for masking too.
2021-11-26 08:21:14 -08:00
Unknown W. Brackets 2b4b4ae064 softjit: Add config setting to enable/disable.
Also use it for samplerjit.
2021-11-26 08:21:14 -08:00
Unknown W. Brackets edb21b57bb softjit: Initial color write.
At this point, it's used in some areas in some games.
Alpha blending is the main unimplemented path, then logic/masking.
2021-11-26 08:21:13 -08:00
Unknown W. Brackets 0e63b357b3 softjit: Add dithering. 2021-11-26 08:21:13 -08:00
Unknown W. Brackets bd99448863 softjit: Keep x and y args for dither.
But let's still special case the 512 path, since it's so common.
2021-11-26 08:21:13 -08:00
Unknown W. Brackets 5ee4bdbe05 softjit: Depth and stencil testing. 2021-11-26 08:21:13 -08:00
Unknown W. Brackets f3f32cebeb softjit: Optimize some imm sizes. 2021-11-26 08:21:13 -08:00
Unknown W. Brackets 2423285831 softjit: Add helpers to get framebuf offsets. 2021-11-26 08:21:12 -08:00
Unknown W. Brackets f8819308ff softjit: Add levels of register locking.
Locking also in helpers, so need to nest locks.
2021-11-26 08:21:12 -08:00
Unknown W. Brackets 1e00a3b842 softjit: Add color test. 2021-11-26 08:21:12 -08:00
Unknown W. Brackets 14d322956a softjit: Add alpha test. 2021-11-26 08:21:12 -08:00
Unknown W. Brackets d9f7b9cca2 softjit: Initial depthrange, fog.
Not really tested, just filling out parts.
2021-11-26 08:21:12 -08:00
Unknown W. Brackets 9fed7ea732 softjit: Add register cache for softjit. 2021-11-26 08:21:11 -08:00
Unknown W. Brackets 91787e63d9 softjit: Switch to the __vectorcall convention. 2021-11-26 08:21:11 -08:00
Unknown W. Brackets ae3299ea04 softjit: Add stubbed DrawPixel for x64. 2021-11-26 08:21:11 -08:00
Henrik Rydgård daae09b4ab Merge pull request #15171 from unknownbrackets/softgpu-cleanup
Correct some alpha/stencil/blend issues in softgpu
2021-11-26 09:04:09 +01:00
Henrik Rydgård 65d3f96f08 Merge pull request #15172 from unknownbrackets/vertexjit-minor
vertexjit: Optimize 5551 read a bit on x86/x64
2021-11-26 08:55:56 +01:00
Unknown W. Brackets ce5ae95854 softgpu: Correct alpha blend subtract on negative.
Oops, we need to subtract signed, but then clamp to unsigned.
2021-11-25 22:06:48 -08:00
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 367cca96b4 vertexjit: Optimize 5551 read a bit on x86/x64. 2021-11-25 19:23:59 -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