This removes some texture errors when using Himavant.
-- v2: wined3d: Add DXT format mappings in the Vulkan renderer.
From: Aida Jonikienė aidas957@gmail.com
This removes some texture errors when using Himavant. --- dlls/wined3d/utils.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index f4036eed726..9bf9a97d550 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4263,6 +4263,11 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format, {WINED3DFMT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, }, {WINED3DFMT_B5G5R5A1_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16, }, {WINED3DFMT_B4G4R4A4_UNORM, VK_FORMAT_R4G4B4A4_UNORM_PACK16, "YZWX"}, + {WINED3DFMT_DXT1, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, }, + {WINED3DFMT_DXT2, VK_FORMAT_BC2_UNORM_BLOCK, }, + {WINED3DFMT_DXT3, VK_FORMAT_BC2_UNORM_BLOCK, }, + {WINED3DFMT_DXT4, VK_FORMAT_BC2_UNORM_BLOCK, }, + {WINED3DFMT_DXT5, VK_FORMAT_BC3_UNORM_BLOCK, }, {WINED3DFMT_BC1_UNORM, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, }, {WINED3DFMT_BC1_UNORM_SRGB, VK_FORMAT_BC1_RGBA_SRGB_BLOCK, }, {WINED3DFMT_BC2_UNORM, VK_FORMAT_BC2_UNORM_BLOCK, },
On Fri Jan 24 10:03:18 2025 +0000, Elizabeth Figura wrote:
While you're at it you might as well add DXT2 and DXT4, which should map to the same formats as DXT3 and DXT5. Thanks!
I only added those three formats because these were the only ones that the tested games asked for (but I'll add all of them anyway)
On Fri Jan 24 10:04:05 2025 +0000, Elizabeth Figura wrote:
DXT1 should use the RGBA variant. See the relevant part of the spec [1]; we have volume_dxtn_test() in d3d9:visual, which you'll notice currently fails as it always emits 1.0 for alpha. [1] https://registry.khronos.org/DataFormat/specs/1.3/dataformat.1.3.html#s3tc_b...
This should be fixed after the MR update
Jan Sikorski (@jsikorski) commented about dlls/wined3d/utils.c:
{WINED3DFMT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, }, {WINED3DFMT_B5G5R5A1_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16, }, {WINED3DFMT_B4G4R4A4_UNORM, VK_FORMAT_R4G4B4A4_UNORM_PACK16, "YZWX"},
{WINED3DFMT_DXT1, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, },
{WINED3DFMT_DXT2, VK_FORMAT_BC2_UNORM_BLOCK, },
{WINED3DFMT_DXT3, VK_FORMAT_BC2_UNORM_BLOCK, },
{WINED3DFMT_DXT4, VK_FORMAT_BC2_UNORM_BLOCK, },
Should be BC3?