History

hwcontext_vulkan: require storage properties to claim formats as supported

This function dates back a long time ago, before vkfmt_from_pixfmt2. When it was converted over, the thought was that this was far too restrictive to demand storage images for each format. With the new clever function, it makes sure to check that the compatible subformats a format can be used as support storage capabilities. This gets rid of fake support for RGB48/RGB96 which some implementations offer but don't support using as storage images.

Lynne committed 1 year ago

Commit cf0961a1 parent f65e5121 file · +2 −2Browse files

Unified · Split

libavutil/hwcontext_vulkan.c+2−2
@@ -2040,7 +2040,7 @@ static int vulkan_frames_get_constraints(AVHWDeviceContext *ctx, · 2039 unmodified lines
20402040 count += vkfmt_from_pixfmt2(ctx, vk_formats_list[i].pixfmt,
20412041 p->use_linear_images ? VK_IMAGE_TILING_LINEAR :
20422042 VK_IMAGE_TILING_OPTIMAL,
2043− NULL, NULL, NULL, NULL, 0, 0) >= 0;
2043+ NULL, NULL, NULL, NULL, 0, 1) >= 0;
20442044 }
20452045
20462046 constraints->valid_sw_formats = av_malloc_array(count + 1,
@@ -2053,7 +2053,7 @@ static int vulkan_frames_get_constraints(AVHWDeviceContext *ctx, · 6 unmodified lines
20532053 if (vkfmt_from_pixfmt2(ctx, vk_formats_list[i].pixfmt,
20542054 p->use_linear_images ? VK_IMAGE_TILING_LINEAR :
20552055 VK_IMAGE_TILING_OPTIMAL,
2056− NULL, NULL, NULL, NULL, 0, 0) >= 0) {
2056+ NULL, NULL, NULL, NULL, 0, 1) >= 0) {
20572057 constraints->valid_sw_formats[count++] = vk_formats_list[i].pixfmt;
20582058 }
20592059 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t