Commit Graph

76 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 e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård bca83c0baf Buildfix 2023-12-19 14:44:21 +01:00
Unknown W. Brackets e79e0e21ad arm64jit: Skip unnecessary const load w/4 weights. 2023-09-30 15:41:56 -07:00
Unknown W. Brackets 5c4e08fe19 arm64jit: Use FMLA for TC precale. 2023-09-10 23:04:15 -07:00
Unknown W. Brackets 646e3b269d arm64jit: Skip vertexjit prolog/epilog if possible. 2023-09-10 23:04:15 -07:00
Unknown W. Brackets a8493c0e19 arm64jit: Optimize weight loading a bit. 2023-09-10 23:04:15 -07:00
Unknown W. Brackets f1f3e6fba2 arm64jit: Optimize vertex full alpha tracking. 2023-09-10 13:08:33 -07:00
Unknown W. Brackets e4cf2c3a13 arm64jit: Correct vertexjit bug on invalid case. 2023-09-04 23:42:59 -07:00
Henrik Rydgård 963ca50ba7 Merge pull request #17567 from hrydgard/uvscale-as-argument
Pass uvScale in as a fourth argument to the vertex decoder
2023-06-13 09:49:31 +02:00
Henrik Rydgård cdcf3b272e ARM64: Optimize saved registers in vertex decoder.
Simplify away some arrays with unused elements
2023-06-13 00:26:38 +02:00
Henrik Rydgård 4af6fac726 Nop-align the ARM and ARM64 loops too. Many CPUs benefit somewhat from hot loops being 16-byte aligned. 2023-06-13 00:05:48 +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
Unknown W. Brackets ee10fae04e riscv: Add basic steps to vertex decode. 2023-02-12 23:05:34 -08: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
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 f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets 6b8f7294b3 Global: Remove ARM64 define.
Was barely used anymore, and some users are specifying it when it's not
the case, so better to detect consistently.
2020-08-29 08:45:50 -07:00
Henrik Rydgård b43698a13d Remove most instances of base/logging.h from Common, Core, GPU, more 2020-08-15 19:08:44 +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 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
Unknown W. Brackets 5788e33b2f arm64: Use LDRUH instead of two LDRBs.
Small boost - 5.66x instead of 5x steps.
2017-12-03 06:35:44 -08:00
Henrik Rydgård 4129459495 Avoid an assert in ARM64 emitter, seen in Google Play crash logs 2017-11-29 21:31:42 +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
Unknown W. Brackets 7699fa55de arm: Jit throughmode 16-bit texcoords.
It's popular, and this makes decoding such verts much faster.
2017-05-06 22:52:58 -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
Henrik Rydgård 440e72d250 Clean up among the logs. Remove MASTER_LOG. 2017-03-06 13:10:23 +01:00
Henrik Rydgard a272a4ee3f Improve error message on vertex decoder compile fail. Also disable a broken vertex JIT function until it can be fixed. 2017-03-03 14:19:36 +01:00
Henrik Rydgård a61cb44b1c Oops, changed the wrong function. 2017-01-29 15:07:25 +01:00
Henrik Rydgard 59f5c53040 Fix recent texture scaling bug. Should help #9250
Not all cases tested yet.
2017-01-29 14:42:59 +01:00
Henrik Rydgård e1bae9aa67 Follow the ARM64 ABI better (update the frame pointer). 2017-01-27 14:19:03 +01:00
Henrik Rydgard 98e0ccf1e1 Vertex JIT: Add some missing functions to ARM/ARM64 decoders. 2017-01-25 20:13:29 +01:00
Henrik Rydgård 3d8c94cf90 Fix bug where if the Vertex Decoder JIT failed, we failed to restore mprotect permissions causing a crash 2017-01-25 19:07:13 +01:00
Henrik Rydgard 1dbeca0618 Only support decoding UV to float in vertex formats. Supporting u8 and 16 was more complexity than it's worth. 2016-12-20 13:42:54 +01:00
Florent Castelli 8c3552de74 cmake: Detect features at compile time
Instead of relying on manually passed down flags from CMake,
we now have ppsspp_config.h file to create the platform defines for us.
This improves support for multiplatform builds (such as iOS).
2016-10-19 12:31:19 +02:00
Henrik Rydgard 03279e1212 Port over the Exynos cacheline size fix from Dolphin. Thanks to lewurm of the mono project for the discovery and original fix.
See https://github.com/dolphin-emu/dolphin/pull/4204 and https://github.com/mono/mono/pull/3549
2016-09-10 09:25:06 +02:00
Henrik Rydgard b264657d56 Implement W^X-compatible path. Works on Windows and Android, hopefully iOS (untested).
Disabled block linking in this mode, can re-enable with some more work later.

To enable W^X on other platforms than iOS, simply change PlatformIsWXExclusive.
2016-08-28 14:52:08 +02:00
Unknown W. Brackets 7127de302e Avoid some unused variable warnings. 2016-08-05 10:48:18 -07:00
Unknown W. Brackets 4113fd940c Add ugly invalidation workaround for SGS7s.
Otherwise they just crash, and crash often.  Special thanks to Jaaan for
numerous trials to try to find the best way to solve the crashes.
2016-05-23 21:35:28 -07:00
Henrik Rydgard 6a373fe09a Make it possible to view vertex decoders through the shader viewing mechanism (even though they aren't strictly shaders, they fit the model). 2015-10-24 10:41:31 +02:00
Unknown W. Brackets 3233116749 Use fixed regs for uv bounds check in arm64. 2015-09-13 15:06:29 -07:00
Unknown W. Brackets dff4aeb30f Correct uv bound pointers in arm vertexjit. 2015-09-13 14:55:10 -07:00