-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/src/vulkan/formats.c b/src/vulkan/formats.c | ||
index f0eb0fb7..7d1c6478 100644 | ||
--- a/src/vulkan/formats.c | ||
+++ b/src/vulkan/formats.c | ||
@@ -415,7 +415,12 @@ void vk_setup_formats(struct pl_gpu_t *gpu) | ||
.pNext = has_drm_mods ? &drm_props : NULL, | ||
}; | ||
|
||
- vk->GetPhysicalDeviceFormatProperties2KHR(vk->physd, vk_fmt->tfmt, &prop2); | ||
+ VkFormat tfmt = vk_fmt->tfmt; | ||
+ if (tfmt == VK_FORMAT_R10X6_UNORM_PACK16) | ||
+ tfmt = VK_FORMAT_R16_UNORM; | ||
+ else if (tfmt == VK_FORMAT_R10X6G10X6_UNORM_2PACK16) | ||
+ tfmt = VK_FORMAT_R16G16_UNORM; | ||
+ vk->GetPhysicalDeviceFormatProperties2KHR(vk->physd, tfmt, &prop2); | ||
|
||
// If wholly unsupported, try falling back to the emulation formats | ||
// for texture operations | ||
diff --git a/src/vulkan/gpu_tex.c b/src/vulkan/gpu_tex.c | ||
index a419ffdc..ccb5a16c 100644 | ||
--- a/src/vulkan/gpu_tex.c | ||
+++ b/src/vulkan/gpu_tex.c | ||
@@ -1215,7 +1215,12 @@ pl_tex pl_vulkan_wrap(pl_gpu gpu, const struct pl_vulkan_wrap_params *params) | ||
tex_vk->external_img = true; | ||
tex_vk->held = !fmt->num_planes; | ||
tex_vk->img = params->image; | ||
- tex_vk->img_fmt = params->format; | ||
+ if (params->format == VK_FORMAT_R10X6_UNORM_PACK16) | ||
+ tex_vk->img_fmt = VK_FORMAT_R16_UNORM; | ||
+ else if (params->format == VK_FORMAT_R10X6G10X6_UNORM_2PACK16) | ||
+ tex_vk->img_fmt = VK_FORMAT_R16G16_UNORM; | ||
+ else | ||
+ tex_vk->img_fmt = params->format; | ||
tex_vk->num_planes = fmt->num_planes; | ||
tex_vk->usage_flags = usage; | ||
tex_vk->aspect = params->aspect; |
45c63e9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nowrep, any chance to upstream this patch to libplacebo?
With the arrival of Mesa 25.0 release, my FFmpeg use case also hit this bug. jellyfin/jellyfin-ffmpeg#546
45c63e9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it needs to be fixed in RADV.
45c63e9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, will keep an eye on Mesa side.