gpu: describe packed 11-11-10 uint textures

This commit is contained in:
nmzik
2026-08-20 23:47:31 +02:00
parent ebd47081ca
commit fedd1a4335
2 changed files with 33 additions and 0 deletions
+1
View File
@@ -38,6 +38,7 @@ constexpr FormatInfo kFormatInfo[] = {
{BufferFormat::k16_16UInt, 4, 0, 4, true, true},
{BufferFormat::k16_16SInt, 4, 0, 4, false, false},
{BufferFormat::k16_16Float, 4, 0, 4, true, false},
{BufferFormat::k11_11_10UInt, 4, 0, 4, true, true},
{BufferFormat::k11_11_10Float, 4, 0, 4, true, false},
{BufferFormat::k10_10_10_2UNorm, 4, 0, 4, true, false},
{BufferFormat::k10_10_10_2UInt, 4, 0, 4, true, true},
+32
View File
@@ -9940,6 +9940,38 @@ public:
Require(name, "format coverage", format_cases != 0,
"no CPU-supported standard formats were tested");
{
constexpr auto format = Prospero::BufferFormat::k11_11_10UInt;
constexpr auto tile = Prospero::TileMode::kStandard64KB;
constexpr u32 width = 128, height = 128, levels = 8;
TileSurfaceLayout surface{};
const TileSurfaceDescription description{
format, tile, TileSurfaceDimension::Dim2D, width, height, 1, levels, 1};
TileSizeAlign total{};
TileGetTextureTotalSize(format, width, height, 1, levels, tile, false,
total);
const bool built = TileGetTiledTextureLayout(description, surface);
constexpr u32 tail_xy[7][2] = {
{64, 0}, {0, 64}, {32, 0}, {0, 32}, {16, 0}, {8, 16}, {0, 24}};
bool valid = built && Prospero::NumBytesPerElement(format) == 4 &&
Prospero::BlockCompressedBytesPerBlock(format) == 0 &&
Prospero::IsSupportedTextureFormat(format) &&
Prospero::IsUintTextureFormat(format) &&
surface.texture.block.block_width == 128 &&
surface.texture.block.block_height == 128 &&
surface.texture.block.block_depth == 1 &&
surface.first_tail_level == 1 &&
surface.mips[0].offset == 0x10000 && total.size == 0x20000 &&
total.align == 0x10000;
for (u32 level = 1; level < levels && valid; level++) {
valid &= surface.mips[level].offset == 0 &&
surface.mips[level].tail_x == tail_xy[level - 1][0] &&
surface.mips[level].tail_y == tail_xy[level - 1][1];
}
Require(name, "11_11_10 uint layout", valid,
"PS5 packed integer texture metadata or Standard64KB mip tail changed");
}
{
constexpr auto format = Prospero::BufferFormat::k32_32_32Float;
TileTextureElementLayout element{};