Use R16_UNORM, fixes 10bit encoding on NVIDIA
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user