mirror of
https://github.com/libretro/parallel-ps2.git
synced 2026-11-09 17:28:25 -10:00
GetSizeFixedTEX0 sizes a texture from the largest UV its draw can reach, an inclusive texel coordinate (CLAMP limits it to (1 << TW) - 1, MAXU/MAXV are inclusive). reduce() shrank a texture whose max UV was exactly 1 << (n - 1) to that width, and extend() left a region-clamped texture at 1 << n when MAXU was 1 << n, so the edge texel fell outside in both: the column a horizontally flipped sprite samples at its first pixel, or the last column a region clamp allows. A texture now always covers 0..uv; one whose max UV is exactly a power of two stays at the next size up. tests/gs gs_texsize: the sizes GetSizeFixedTEX0 picks at and around the boundary, for CLAMP and REGION_CLAMP, through the real GSDrawingContext.cpp.