From a9a072bf003e5751fa751dfefe5d020ba798be95 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Wed, 1 Jun 2022 13:00:23 +0300 Subject: [PATCH] [GPU] Explain why a 32x32x4bpp linear texture takes 2 pages, not 1 [ci skip] --- src/xenia/gpu/texture_util.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/texture_util.cc b/src/xenia/gpu/texture_util.cc index d4052eb13..b08db7200 100644 --- a/src/xenia/gpu/texture_util.cc +++ b/src/xenia/gpu/texture_util.cc @@ -443,7 +443,8 @@ TextureGuestLayout GetGuestTextureLayout( // 494707D4, there's a 2x2 k_8_8_8_8 linear texture with packed mips), // for instance, would have its 2x2 base at (16, 0) and its 1x1 mip at // (8, 0) - and we need 2 or 1 rows in these cases, not 32 - the 32 rows - // would span two 4 KB pages rather than one. + // would span two 4 KB pages rather than one, taking the 256-byte pitch + // alignment in linear textures into account. level_layout.x_extent_blocks = 0; level_layout.y_extent_blocks = 0; level_layout.z_extent = 0;