diff options
| author | ExCorvus <73470689+ExCorvus@users.noreply.github.com> | 2026-11-24 01:29:22 +0100 |
|---|---|---|
| committer | ExCorvus <73470689+ExCorvus@users.noreply.github.com> | 2026-11-24 01:29:22 +0100 |
| commit | db761be31041e1f9985d920a687e9e6952779fe9 (patch) | |
| tree | 41362a3894dd3d9f6cd624415e4a9fb027ade134 /runtime/shims/acphal.cpp | |
| parent | 8eee35cfdccc613a1f7a10a5539d5bd3b25038ba (diff) | |
runtime: give acphal's SHAPE contexts their GDK trailing words
ccd36246f added the GDK size checks, but the published field lists leave
SHAPE_XMA_CONTEXT at 60 bytes and SHAPE_PCM_CONTEXT at 28, so acphal.cpp fails
its static_asserts (C2338) and the runtime does not build. Each context has one
trailing reserved word in the GDK layout that the list omits: reserved[11] takes
the XMA context to 64 bytes and reserved[2] the PCM context to 32.
Tests: gta6rt links.
AI-assisted: DeepSeek V4.1 Flash 1017 (Alibaba Token Plan); coordinated by Qwen4 Max Preview.
Diffstat (limited to 'runtime/shims/acphal.cpp')
| -rw-r--r-- | runtime/shims/acphal.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/shims/acphal.cpp b/runtime/shims/acphal.cpp index 553f57f20..5ead016d6 100644 --- a/runtime/shims/acphal.cpp +++ b/runtime/shims/acphal.cpp | |||
| @@ -141,7 +141,7 @@ struct SHAPE_XMA_CONTEXT { | |||
| 141 | uint32_t reserved1 : 6; | 141 | uint32_t reserved1 : 6; |
| 142 | uint32_t loopStartOffset : 26; | 142 | uint32_t loopStartOffset : 26; |
| 143 | uint32_t loopEndOffset : 6; | 143 | uint32_t loopEndOffset : 6; |
| 144 | uint32_t reserved[10]; | 144 | uint32_t reserved[11]; // the GDK's 64-byte context: the published field list leaves one trailing word |
| 145 | }; | 145 | }; |
| 146 | static_assert(sizeof(SHAPE_XMA_CONTEXT) == 64, "SHAPE_XMA_CONTEXT is 64 bytes per GDK"); | 146 | static_assert(sizeof(SHAPE_XMA_CONTEXT) == 64, "SHAPE_XMA_CONTEXT is 64 bytes per GDK"); |
| 147 | 147 | ||
| @@ -162,7 +162,7 @@ struct SHAPE_PCM_CONTEXT { | |||
| 162 | uint32_t reserved6 : 15; | 162 | uint32_t reserved6 : 15; |
| 163 | uint32_t format : 2; | 163 | uint32_t format : 2; |
| 164 | uint32_t reserved7 : 14; | 164 | uint32_t reserved7 : 14; |
| 165 | uint32_t reserved[1]; | 165 | uint32_t reserved[2]; // the GDK's 32-byte context: the published field list leaves one trailing word |
| 166 | }; | 166 | }; |
| 167 | static_assert(sizeof(SHAPE_PCM_CONTEXT) == 32, "SHAPE_PCM_CONTEXT is 32 bytes per GDK"); | 167 | static_assert(sizeof(SHAPE_PCM_CONTEXT) == 32, "SHAPE_PCM_CONTEXT is 32 bytes per GDK"); |
| 168 | 168 | ||