- Both Miami and Liberty fixed.
- FUNDAMENTAL issues with data types not being configured correctly for
64-bit Windows
- More issues with <windows.h> and other files not being included
properly for _WIN64
- Successfully baked and tested both liberty and miami CDIs in Flycast
- Had forgotten to define mat_load2(), mat_store2(), mat_identity2() for
simulator builds in rwdc_common.h.
- Just defining them to use the regular versions.
1) synced dca3-kos repo which has some gainzy commits
2) rwdc_common.h
- all low-level and matrix/vector routines for SH4 are now shared in
this common file, included in both RW and Liberty/Miami engines
3) CMatrix
a. assignment operator: now uses asm-optimized mat_copy()
b. multiplication operator: now use mat_mult() SH4 routine
c. Scale(): applies a scale matrix via mat_scale
d. MultiplyInverse: fipr-optimizations
4) CQuaternion
a. multiplication: SH4 ASM FIPR optimized
b. Get(V3d& axis, float &angle): fast inversion/division
c. Set(RWMatrix&): fast division
5) CVector
a. Multiply3x3() now accelerated with mat_transpose
5) RwQuat
a. mult(): FIPR accelerated
b. length(): FIPR/FSRRA accelerated
This PR is the second batch of SH4-specific optimizations for key
linear algebra routines within both the RW layer and liberty + miami
engines.
It also includes a bunch of routines that were accelerated within
liberty but were never added to miami, which has helped contribute to
the lower perf in Miami.
1) CQuaternion
- magnitude, squared magnitude, and dot product use SH4 instructions
now
2) CVector (Miami port from Liberty)
- Multiply3x3, magnitude, squared magnitude, dot product, distance
use SH4 instructions
3) rwbase.h
- vector3 length, vector3 dot product, and quaternion dot product
use SH4 instructions
Recent distros feature GCC 15 which defaults to C23.
ATOMIC_VAR_INIT has been removed from the C23 standard.
This causes the following build failure:
mem.c:72:39: fout: implicit declaration of function ‘ATOMIC_VAR_INIT’; did you mean ‘ATOMIC_FLAG_INIT’? [-Wimplicit-function-declaration]
72 | static atomic_size_t max_alloc_size = ATOMIC_VAR_INIT(INT_MAX);
| ^~~~~~~~~~~~~~~
| ATOMIC_FLAG_INIT
Workaround this by telling the compiler to build using GNU 17 instead.