Use R16_UNORM, fixes 10bit encoding on NVIDIA

This commit is contained in:
Patrick Nicolas
2026-01-30 15:00:21 +01:00
parent f3cfa0d747
commit 0efa540ce0
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -180,8 +180,8 @@ static VkResult create_images(struct wivrn_comp_target * cn, vk::ImageUsageFlags
bool is_10bit = format == vk::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16;
std::array formats = {
is_10bit ? vk::Format::eR10X6UnormPack16 : vk::Format::eR8Unorm,
is_10bit ? vk::Format::eR10X6G10X6Unorm2Pack16 : vk::Format::eR8G8Unorm,
is_10bit ? vk::Format::eR16Unorm : vk::Format::eR8Unorm,
is_10bit ? vk::Format::eR16G16Unorm : vk::Format::eR8G8Unorm,
format};
cn->images = U_TYPED_ARRAY_CALLOC(struct comp_target_image, cn->image_count);
+1 -1
View File
@@ -379,7 +379,7 @@ std::array<encoder_settings, 3> get_encoder_settings(wivrn_vk_bundle & bundle, c
return true;
};
if (bit_depth == 10 and not(check_format(vk::Format::eR10X6UnormPack16) and check_vaapi(*bit_depth)))
if (bit_depth == 10 and not(check_format(vk::Format::eR16Unorm) and check_vaapi(*bit_depth)))
{
U_LOG_W("GPU does not have sufficient support for 10-bit images, reverting to 8");
bit_depth = 8;