mirror of
https://github.com/libretro/virtualjaguar-libretro.git
synced 2026-11-10 17:28:58 -10:00
fix(blitter): let each SIMD .c select its own arch when built standalone
CI's 'Run SIMD blitter tests' step compiles test_blitter_simd.c plus one blitter_simd_<arch>.c by hand, without the Makefile's -DBLITTER_SIMD_<ARCH>. blitter_simd.h then fell through to the scalar header while the .c also included its own, defining both inline sets and colliding -- which is why every platform failed the same step while the core build stayed green. Each .c now defines its own macro before including blitter_simd.h, so it is self-contained however it is compiled. The Makefile's -D still applies, and a genuine -D/.c mismatch is still a hard error. Verified with CI's exact command: standalone neon and scalar both compile and report 56103/56103. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 parent
5d14bc1371
commit
27c59f2df4
3 files changed
+30
No files matched your search
@@ -7,6 +7,16 @@
|
||||
* uses to exercise the very same code the core runs.
|
||||
*/
|
||||
|
||||
/* Select our own arch before blitter_simd.h picks one. This file IS
|
||||
* the neon implementation, so it must get the neon inline set even when
|
||||
* compiled standalone without the Makefile's -DBLITTER_SIMD_NEON --
|
||||
* as .github/workflows/c-cpp.yml does when it builds
|
||||
* test_blitter_simd by hand. Without this the header chain pulled in
|
||||
* the scalar set as well and the two collided. */
|
||||
#ifndef BLITTER_SIMD_NEON
|
||||
#define BLITTER_SIMD_NEON 1
|
||||
#endif
|
||||
|
||||
#include "blitter_simd.h"
|
||||
#include "blitter_simd_neon.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
* uses to exercise the very same code the core runs.
|
||||
*/
|
||||
|
||||
/* Select our own arch before blitter_simd.h picks one. This file IS
|
||||
* the scalar implementation, so it must get the scalar inline set even when
|
||||
* compiled standalone without the Makefile's -DBLITTER_SIMD_SCALAR --
|
||||
* as .github/workflows/c-cpp.yml does when it builds
|
||||
* test_blitter_simd by hand. Without this the header chain pulled in
|
||||
* the scalar set as well and the two collided. */
|
||||
#ifndef BLITTER_SIMD_SCALAR
|
||||
#define BLITTER_SIMD_SCALAR 1
|
||||
#endif
|
||||
|
||||
#include "blitter_simd.h"
|
||||
#include "blitter_simd_scalar.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
* uses to exercise the very same code the core runs.
|
||||
*/
|
||||
|
||||
/* Select our own arch before blitter_simd.h picks one. This file IS
|
||||
* the sse2 implementation, so it must get the sse2 inline set even when
|
||||
* compiled standalone without the Makefile's -DBLITTER_SIMD_SSE2 --
|
||||
* as .github/workflows/c-cpp.yml does when it builds
|
||||
* test_blitter_simd by hand. Without this the header chain pulled in
|
||||
* the scalar set as well and the two collided. */
|
||||
#ifndef BLITTER_SIMD_SSE2
|
||||
#define BLITTER_SIMD_SSE2 1
|
||||
#endif
|
||||
|
||||
#include "blitter_simd.h"
|
||||
#include "blitter_simd_sse2.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user