Commit Graph

78 Commits

Author SHA1 Message Date
Henrik Rydgård e6185ba6bb Clean out NaNs and INFs from vertex coordinates
This enables a behavior seen on the real PSP where 0 * NaN == 0 in the
GPU (NOTE: This means the vertex transform pipeline).

However, this
doesn't touch INFs unfortunately, and we need to modify those too...

This, together with #21715, finally fixes #20204 .
2026-06-02 10:52:39 +02:00
Henrik Rydgård 5e16bf907b VertexDecoder: Improve logging for missing formats. Add missing convert function.
The missing function is mainly used in D3D11, which can be used on
Windows for ARM64. It's not necesssary for the other backends, which is
why it used to be missing in the ARM64 vertex decoder.

Also fix a minor memory leak in AtracCtx2.
2025-09-24 10:52:09 -06:00
Henrik Rydgård d5bfc1b5eb Finish up this cleanup (move _M_SSE compat define out of Common.h) 2024-12-19 16:23:20 +01:00
Henrik Rydgård 81f1b3fd95 Make handwritten vertex decoders work with non-compiled vertex decoding 2024-05-11 10:00:35 +02:00
Henrik Rydgård afca3717ba Specialized vertex decoder for GTA 2024-05-11 10:00:35 +02:00
Henrik Rydgård 64a810f9bf VertexDecoder: Minor optimization for CPUs not supporting SSE4. 2023-12-05 01:23:09 +01:00
Henrik Rydgård c4e44d66b0 x86/x64: Nop-align the main loop of vertex decoder loops 2023-06-12 20:39:39 +02:00
Henrik Rydgård 01cea7f088 Pass uvScale in as an argument to the vertex decoder
Cleaner than overwriting/restoring gstate_c.uvScale in the decoder
loop. A small cleanup I've been wanting to do for ages.

Expecting a negligble perf boost if any.
2023-06-12 20:25:18 +02:00
Henrik Rydgård d957f6b0be Of course got the check backwards 2023-06-12 19:45:34 +02:00
Henrik Rydgård 1a1462ecb0 x86 buildfix, warning fix 2023-06-12 17:46:57 +02:00
Henrik Rydgård c9aa3479a4 Make vertexFullAlpha-in-register work the same as on ARM. 2023-06-12 16:08:14 +02:00
Henrik Rydgård a164f77f47 VertexDecoderX86 (64-bit only): Avoid a memory access per loop iteration for alpha 2023-06-12 15:58:55 +02:00
Unknown W. Brackets 49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Unknown W. Brackets b2798c7ada jit: Add more reasonable estimates for RX protect. 2022-11-20 10:55:35 -08:00
Henrik Rydgård 1469a32a9d Vertex decoder: Add fallback for non-SSE4.1
See #16157
2022-10-03 19:06:17 +02:00
Unknown W. Brackets ca248e1201 softgpu: Fix s8 primitives in throughmode.
Also always cull no-position verts, hardware too.  Matches tests.
2022-09-18 07:46:18 -07:00
Unknown W. Brackets 4889d5285d vertexjit: Use consistent skinInDecode.
Just a little cleanup.
2022-09-10 21:54:04 -07:00
Unknown W. Brackets 9f48ddb18c vertexjit: Clamp through float pos during decode.
Rather than decoding it on read, better to decode it right away.
2022-09-01 23:33:52 -07: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 f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets c1fa4958d9 vertexjit: Only save extra regs on x64. 2021-02-01 07:06:18 -08:00
Unknown W. Brackets ddff063097 vertexjit: Correct saved registers on x64. 2021-01-31 15:05:15 -08:00
Henrik Rydgård 7f27f569d7 x64: Fix stack alignment in vertex decoder, just because. 2020-09-12 16:10:17 +02:00
Henrik Rydgård c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Unknown W. Brackets 7910b4029a arm64jit: Track writable and non-writable pointers.
Switch uses different memory regions.  We can handle this, might as well
cleanup some const abuse.
2020-05-17 00:15:12 -07:00
Henrik Rydgård dbe52c8135 Remove some obsolete checks - software skinning is now supported even if morphcount isn't 1. 2018-04-10 13:09:01 +02:00
Henrik Rydgård ccd594dae7 Revert "VertexLoader: Remove now-unused weights translation code"
This reverts commit 44100c6c1d.
2018-04-10 12:30:49 +02:00
Henrik Rydgård 36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård b6cbbceac9 MOVUPS to be safe. 2018-03-05 16:23:07 +01:00
Henrik Rydgård 91b565ae20 Minor simplification in X86/X64 vertex decoder jit 2018-03-05 13:19:36 +01:00
Henrik Rydgård 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Henrik Rydgård 44100c6c1d VertexLoader: Remove now-unused weights translation code 2018-03-05 00:03:47 +01:00
Henrik Rydgård 22e65ba80d Get rid of ugly alignment macros and some other cruft, we now have alignas(16) from C++11 2017-08-31 01:14:51 +02:00
Henrik Rydgård 8d0498303a Fix a PIC compliance bug in the VFPU. Comment other cases properly (for easy searching). 2017-08-29 11:45:12 +02:00
Henrik Rydgård f7fea57bb6 More RIP addressing in software skinning.. 2017-07-07 15:12:57 +02:00
Henrik Rydgård 837118d230 More RIP elimination 2017-07-07 15:07:56 +02:00
Henrik Rydgård 86396ba39b Turning off the "close memory finder" lets us find more RIP addressing... 2017-07-07 15:07:53 +02:00
Henrik Rydgård f5e110018b Fix software skinning 2017-07-07 12:57:39 +02:00
Henrik Rydgård 270001e651 vminmax_sreg only needs a single element 2017-07-07 11:33:07 +02:00
Henrik Rydgård cf7939d3e4 Get rid of remaining RIP addressing in vertex decoder 2017-07-07 11:33:06 +02:00
Henrik Rydgård 442a7012a6 Remove some rip addressing in vertex decoder 2017-07-07 11:33:06 +02:00
Henrik Rydgård 99d23fb021 X64/X86: Even more use of the context register 2017-07-05 13:21:35 +02:00
Henrik Rydgård 385204bec6 X64 vertex decoder: Use relative memory accesses when loading matrices. 2017-07-05 12:51:41 +02:00
Unknown W. Brackets 744736b926 SoftGPU: Jit 16 bit texel decode. 2017-05-30 22:57:42 -07:00
LunaMoo 5637ae1190 Fix typo in VertexDecoder 2017-05-13 16:27:26 +02:00
Unknown W. Brackets dacb776300 x86: Minor optimization for s16 through positions.
This takes it from 150% to 390% non-jit for pos only verts.
2017-05-07 12:20:56 -07:00
Unknown W. Brackets 0fe927aaa7 x86: Minor memory copy perf improvement.
This was actually 270% -> 340% non-jit for pos-only verts.
2017-05-07 12:18:47 -07:00
Unknown W. Brackets b06e271ef3 x86: More optimal 4444 in vertexjit.
This was commented out, but works fine and goes from 320% -> 450% the speed
of non-jit for simple pos/col verts.
2017-05-07 12:14:06 -07:00
Unknown W. Brackets 257f8dbbc6 GPU: Remove now-unused vertex decoder funcs.
We always convert to float now, so these functions are no longer used.
2017-05-06 18:55:16 -07:00
Unknown W. Brackets e9625707fa x86: Implement Jit_TcU16Through.
This just ports the updateSide logic from other types.
2017-03-18 13:44:47 -07:00