mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
pvr: allow pvr_get_copy_format to handle ycbcr formats
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39916>
This commit is contained in:
parent
9a25926bf3
commit
9f5cc58919
1 changed files with 5 additions and 3 deletions
|
|
@ -464,8 +464,11 @@ void pvr_rogue_CmdBlitImage2(VkCommandBuffer commandBuffer,
|
|||
}
|
||||
}
|
||||
|
||||
static VkFormat pvr_get_copy_format(VkFormat format)
|
||||
static VkFormat pvr_get_copy_format(VkFormat format,
|
||||
VkImageAspectFlagBits aspect)
|
||||
{
|
||||
format = vk_format_get_plane_aspect_format(format, aspect);
|
||||
|
||||
switch (format) {
|
||||
case VK_FORMAT_R8_SNORM:
|
||||
return VK_FORMAT_R8_SINT;
|
||||
|
|
@ -1160,8 +1163,7 @@ pvr_copy_image_to_buffer_region(struct pvr_cmd_buffer *const cmd_buffer,
|
|||
{
|
||||
const VkImageAspectFlags aspect_mask = region->imageSubresource.aspectMask;
|
||||
|
||||
VkFormat src_format = pvr_get_copy_format(
|
||||
vk_format_get_plane_aspect_format(image->vk.format, aspect_mask));
|
||||
VkFormat src_format = pvr_get_copy_format(image->vk.format, aspect_mask);
|
||||
VkFormat dst_format;
|
||||
|
||||
/* From the Vulkan spec:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue