mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-25 18:05:12 -04:00
fe42da2744
Keeps both lines: master's PGXP session, draw-distance clamps, masked rejects and saturated-winding NCLIP; the release's render-pass kit additions, verified media/disc extents, timeline/present rings, cull-scale sites. Overlay ABI v30. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
26 lines
900 B
C
26 lines
900 B
C
/* psx_align.h — portable alignment attribute for SIMD scratch buffers.
|
|
*
|
|
* The SSE2/NEON kernels store to local scratch arrays with aligned stores
|
|
* (_mm_store_si128 and friends), so the alignment is load-bearing, not a
|
|
* hint: an under-aligned destination faults.
|
|
*
|
|
* GCC/Clang spell this __attribute__((aligned(n))); MSVC spells it
|
|
* __declspec(align(n)). Both are valid in prefix position on a declaration,
|
|
* which is the one placement the two spellings share -- hence the macro is
|
|
* written to be used as a prefix:
|
|
*
|
|
* PSX_ALIGN(16) int32_t tmp[4];
|
|
*/
|
|
#ifndef PSXRECOMP_PSX_ALIGN_H
|
|
#define PSXRECOMP_PSX_ALIGN_H
|
|
|
|
#if defined(_MSC_VER) && !defined(__clang__)
|
|
#define PSX_ALIGN(n) __declspec(align(n))
|
|
#elif defined(__GNUC__) || defined(__clang__)
|
|
#define PSX_ALIGN(n) __attribute__((aligned(n)))
|
|
#else
|
|
#define PSX_ALIGN(n) _Alignas(n)
|
|
#endif
|
|
|
|
#endif /* PSXRECOMP_PSX_ALIGN_H */
|