Rework formats to support passing through guest swizzle values

Almost every Maxwell format now directly corresponds to a Vulkan format. This allows formats to be passed through and the swizzle used directly from guest (with some extra swizzle handling for edge cases) thus saving the need to explicitly support each swizzle combination which is adds a lot of code bloat. The format header is additionally reordered with line breaks to separate formats by their bits-per-block.
This commit is contained in:
Billy Laws
2022-01-25 23:01:43 +00:00
committed by PixelyIon
parent 6f17d1351f
commit 011de98940
6 changed files with 195 additions and 186 deletions

View File

@ -51,7 +51,7 @@ namespace skyline::gpu {
.aspectMask = guestTexture.format->vkAspect,
.levelCount = texture->mipLevels,
.layerCount = texture->layerCount,
}, guestTexture.format, guestTexture.format->swizzle);
}, guestTexture.format, guestTexture.swizzle);
}
} /* else if (mappingMatch) {
// We've gotten a partial match with a certain subset of contiguous mappings matching, we need to check if this is a meaningful overlap
@ -82,6 +82,6 @@ namespace skyline::gpu {
.aspectMask = guestTexture.format->vkAspect,
.levelCount = texture->mipLevels,
.layerCount = texture->layerCount,
}, guestTexture.format, guestTexture.format->swizzle);
}, guestTexture.format, guestTexture.swizzle);
}
}