Henrik Rydgård
31dc48c815
Add a unit test to mat4 x mat4
2026-01-31 13:11:02 +01:00
fp64
5c67109862
Update NEON PMA to match scalar/SSE2
...
See https://github.com/hrydgard/ppsspp/pull/20902#issuecomment-3429764588 for details.
WARNING: not at all tested in actual PPSSPP, only godbolt for relevant snippet. Verification that it works would be good.
Again, this should be slightly slower than the current version, which shouldn't matter. The goal is accuracy/consistency here.
2025-10-22 14:13:07 +03:00
fp64
9932ad3f85
Improve accuracy of SSE2 PMA conversion
...
This makes SSE2 version match the (correctly-rounded)
scalar reference (which the current version doesn't:
see https://godbolt.org/z/hK5938jda ).
The new implementation uses the same idea as mentioned in
https://github.com/hrydgard/ppsspp/pull/20870#issuecomment-3413134437
It may be a bit slower than current implementation (which
simply truncates?), but correctness/consistency is
probably worth it.
The difference is slight (by 1 in RGB color channels),
but observable in synthetic examples (in particular the
current implementation darkens completely opaque parts,
including `0xFFFFFFFF` -> `0xFFFEFEFE`, and, more
strikingly,`0xFF010101` -> `0xFF000000`).
This doesn't touch NEON part at all (so "vibe-coded" comment
stays for now), but it shouldn't be too hard to port.
2025-10-21 08:04:37 +03:00
Henrik Rydgård
230fa1a985
Improve the premul alpha conversion
2025-10-16 11:07:05 +02:00
Henrik Rydgård
cec4cd28dd
Make compatible with SSE2 (_mm_mullo_epi32 is SSE4.1)
2025-10-16 11:07:05 +02:00
Henrik Rydgård
f0b5209908
Convert all UI atlas images to premultiplied alpha format
2025-10-16 11:07:05 +02:00
Henrik Rydgård
c92b3b6521
Move prototype cross simd wrapper structs to CrossSIMD.h
2024-12-21 14:27:59 +01:00
Henrik Rydgård
6481fc9989
Implement fp64's color conversion function in ConvertRGBA8888ToRGBA5551
2024-12-20 10:45:17 +01:00
Henrik Rydgård
d2a96dc7b5
Replace some SSE4-specific operations with SSE2 sequences.
2024-12-19 16:08:59 +01:00
Henrik Rydgård
5326d87f9c
Rename CrossSIMD to SIMDHeader, but also keep CrossSIMD.h (will have a future use)
2024-12-19 15:15:43 +01:00
Henrik Rydgård
df6ed8cfc9
Do some cleanup of #includes in GPU
2024-12-18 13:57:26 +01:00
Henrik Rydgård
2174a896cd
Clarify operator precedence
2024-06-04 12:01:18 +02:00
Henrik Rydgård
5b14cf9a3d
Switch to the new functions.
2024-06-04 10:28:13 +02:00
Henrik Rydgård
f2b4ad04c6
Write new 16-bit to 32-bit color conversion utility functions
2024-06-04 10:26:42 +02:00
Henrik Rydgård
77825484a0
If available, use 16-bit texture formats for MakePixelTexture when appropriate.
...
Optimization for God of War on low-end platforms. Avoids calling a color
conversion function that's currently only SIMD-optimized on x86, so will
also benefit ARM a little bit.
2023-11-12 15:58:03 +01:00
Henrik Rydgård
1c8e456c97
Also apply this to OpenGL and D3D9
2023-01-11 19:29:02 +01:00
Unknown W. Brackets
252966bb17
GL: Cleanup a check to use ARB instead.
2022-12-18 12:03:21 -08:00
Unknown W. Brackets
e3fdb183f6
Common: Remove some unused color conv funcs.
...
We already have versions of these doing other conversions.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets
77c98441f4
softgpu: Expand fast path to all fb formats.
...
This should speed up 2D games not using 5551, and make it mroe likely any
regression is caught for Darkstalkers.
2022-12-06 18:43:21 -08:00
Henrik Rydgård
70b6733d0a
Minor alpha bit optimization in Darkstalkers rectangle code
2022-12-07 01:50:29 +01:00
Henrik Rydgård
02b8bf33fb
Merge pull request #16458 from hrydgard/desktop-friendly-msaa
...
Implement MSAA support for desktop GPUs in Vulkan
2022-12-03 11:22:41 +01:00
João Henrique
9fcc6857f6
Fix wrong vreinterpret neon intrinsic usage.
...
This fixes a compilation failure introduced on d0e8cfa365 .
2022-12-02 03:10:57 -03:00
Henrik Rydgård
8a3e92aa38
Not pretty, but with this, you can switch MSAA level at runtime.
2022-12-01 23:41:31 +01:00
Henrik Rydgård
d0e8cfa365
Add NEON impl too, mostly for exercise purposes
2022-12-01 17:52:02 +01:00
Henrik Rydgård
e6f0f84a45
SSE optimize Float4ToUint8x4, some uses
2022-12-01 16:32:23 +01:00
Henrik Rydgård
9bb0c91a75
Sneak in a minor software transform optimization
2022-11-28 11:10:50 +01:00
Henrik Rydgård
131c1ca79e
Typo fix, thanks iota97
2022-10-06 20:46:57 +02:00
Henrik Rydgård
bf25f4b283
Shader uniforms (VK/D3D11): Fix issue where we could overwrite the fourth component padding.
2022-10-06 10:52:58 +02:00
Henrik Rydgård
6bc7a699fe
Minor cleanups in framebuffer manager
2022-04-30 18:14:53 +02:00
Henrik Rydgård
9f7e0978a9
AND together colors while decoding, and then check against fullAlphaMask.
2022-04-15 00:56:25 +02:00
Henrik Rydgård
1bbaba4103
Fix some NEON code that had bad compile-time checks (and some didn't compile)
2022-04-15 00:54:44 +02:00
Henrik Rydgård
a68ddd0a8d
Merge separate NEON functions into the normal functions.
...
We no longer support non-NEON ARM.
It's nice also to have the NEON and SSE implementations "close" to each
other, easier to port optimizations back and forth etc.
2022-04-12 23:43:21 +02: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
b4eab72015
Common: Fix conversion of 4444 to BGRA.
...
This was affecting tests emitting screenshots in 4444 as well as Direct3D
backends.
2022-01-23 19:22:32 -08:00
Unknown W. Brackets
8a00c2d233
GPU: Allow gcc/clang/icc runtime SSE4 usage.
...
All our builds before were only using SSE4 in jit...
2022-01-08 17:09:09 -08:00
Unknown W. Brackets
e869a3979b
Draw: Centralize funcs in ColorConv.
2021-05-01 11:20:05 -07:00
Unknown W. Brackets
915265e531
Draw: Optimize GL A1R5G5B5 conversion.
...
This seems to be enough to trigger SIMD in x86_64 at least.
2021-05-01 11:20:05 -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
5d60fa0d0d
Common: Maintain C++11 support in sign extend.
2021-01-31 08:44:02 -08:00
Unknown W. Brackets
1b00da2f3a
Common: Sign extend w/func not chained casts.
...
Should be clearer to read and easier to get right.
2021-01-31 01:25:52 -08:00
Henrik Rydgård
9e41fafd0d
Move math and some file and data conversion files out from native to Common.
...
Buildfixing
Move some file util files
Buildfix
Move KeyMap.cpp/h to Core where they belong better.
libretro buildfix attempt
Move ini_file
More buildfixes
2020-10-04 09:12:46 +02:00