Repository navigation
v0.0.153
rePIU v0.0.153
이전 릴리스 v0.0.152 이후의 변경입니다. 이번 릴리스는 pumpipx3에서 발견된
Glide texture-table 호출 규약을 정정하고, P_8/AP_88 indexed texture가 나중에 내려온
palette를 사용하도록 해 손상된 색상을 복구합니다.
Glide texture-table ABI 정정
_GRTEXDOWNLOADTABLE@12의 guest stack frame을 반환 주소, TMU, table type, data pointer의
네 dword로 해석합니다. 기존 구현은 반환 주소를 포함해 세 dword만 읽어 type과 data를 한
칸씩 잘못 해석하고, 복귀 시에도 16바이트가 아닌 12바이트만 정리했습니다.- 성공, 지원하지 않는 table type, 읽기 실패를 포함한 handled path 모두 stdcall 계약대로
ESP += 16을 적용합니다. - 실제 로그 frame과 짧은/null frame을
glide_texture_table_stack_probe로 고정했습니다.
indexed texture 색상 복구
- 표준 Glide palette entry의 상위 8비트는 alpha가 아니므로 무시하고 alpha 255로 변환합니다.
P_8은 불투명 palette RGB를 사용하며 AP_88은 texel 상위 8비트의 alpha를 유지합니다. - texture upload와 palette upload의 수명이 분리된 Glide 의미를 보존합니다. Backend가
P_8/AP_88 원본 index를 보존하고 palette download 시 기존 indexed texture를 새 palette로
다시 디코드·업로드합니다. - 사용자 실기 확인에서 기존에 손상됐던 palette 색상이 정상으로 복구됐습니다.
검증
- Win32 x86 Debug/Release에서
repiu_aot_probe와repiu빌드가 성공했습니다. - 두 구성의 전체 probe가 exit 0이며
glide_texture_table_stack_probe=pass와
glide_texture_census_all=true를 확인했습니다. - 기존 C4819와 LNK4217 경고만 남았습니다.
알려진 성능 제한
- 색상 복구 후 사용자 실기에서 성능이 크게 저하됐습니다.
- 현재 구현은 palette download마다 모든 보존 P_8/AP_88 texture를 CPU에서 RGBA로 변환하고
glTexImage2D로 재업로드합니다. 변경 없는 palette 생략, 실제 사용 texture의 지연 갱신,
GPU indexed sampling은 아직 구현하지 않았습니다. - 이번 릴리스는 정확성을 우선하며 이 경로를 유지합니다. 계측과 최적화는
docs/TODO.md의 Task 483 후속 항목으로 문서화했습니다.
rePIU v0.0.153
Changes since v0.0.152. This release corrects the Glide texture-table calling
convention observed in pumpipx3 and restores corrupted colours by making existing
P_8/AP_88 indexed textures consume palettes downloaded later.
Glide texture-table ABI correction
_GRTEXDOWNLOADTABLE@12now decodes four guest-stack dwords: return address,
TMU, table type, and data pointer. The old path read only three dwords including
the return address, shifted type and data by one slot, and cleaned 12 rather than
16 bytes on return.- Every handled path, including success, unsupported table types, and read failures,
now applies the stdcallESP += 16contract. - The exact logged frame plus short and null frames are covered by
glide_texture_table_stack_probe.
Indexed-texture colour restoration
- The ignored high byte of a standard Glide palette entry is no longer treated as
alpha. P_8 uses opaque palette RGB, while AP_88 retains alpha from the texel's
high byte. - The backend now preserves P_8/AP_88 indices and re-decodes existing indexed
textures after a palette download, matching Glide's separate texture and palette
lifetimes. - The user confirmed that the previously corrupted palette colours are restored in
the real scene.
Verification
- Win32 x86 Debug and Release builds of
repiu_aot_probeandrepiusucceeded. - Both full probes exited zero with
glide_texture_table_stack_probe=passand
glide_texture_census_all=true. - Only the existing C4819 and LNK4217 warnings remain.
Known performance limitation
- The user's runtime check found a severe performance loss after colour restoration.
- Every palette download currently CPU-decodes all retained P_8/AP_88 textures to
RGBA and re-uploads them throughglTexImage2D. Unchanged-palette suppression,
lazy refresh of used textures, and GPU indexed sampling are not implemented. - This release keeps the accuracy fix. Measurement and optimization are deferred in
the Task 483 follow-up recorded indocs/TODO.md.