[D3D12] Replicate red channel of single-channel textures

This commit is contained in:
Triang3l
2019-01-26 14:11:09 +03:00
parent 189ffca234
commit 61fd5a6dc2
2 changed files with 97 additions and 71 deletions

View File

@@ -261,6 +261,14 @@ class TextureCache {
// texture of this format.
DXGI_FORMAT dxgi_format_resolve_tile;
ResolveTileMode resolve_tile_mode;
// Whether the red component must be replicated in the SRV swizzle, for
// single-component formats. At least for DXT3A/DXT5A, this is according to
// http://fileadmin.cs.lth.se/cs/Personal/Michael_Doggett/talks/unc-xenos-doggett.pdf
// k_8 is also used with RGBA swizzle, but assumes replicated components, in
// Halo 3 sprites, thus it appears that all single-component formats should
// have RRRR swizzle.
bool replicate_component;
};
union TextureKey {