History

hwcontext_vulkan: ask for storage images by default

The issue is that we ask for storage images by default if available, but because that is gated by the format supporting storage images, and the check for the format supporting storage images is gated by the usage, this resulted in a catch-22.

Lynne committed 2 years ago

Commit 0ffa9671 parent eb5088d1 file · +4 −2Browse files

Unified · Split

libavutil/hwcontext_vulkan.c+4−2
@@ -2617,7 +2617,8 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc) · 2616 unmodified lines
26172617 err = vkfmt_from_pixfmt2(hwfc->device_ctx, hwfc->sw_format,
26182618 hwctx->tiling, NULL,
26192619 NULL, NULL, &supported_usage, 0,
2620− hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT);
2620+ !hwctx->usage ||
2621+ (hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT));
26212622 if (err < 0) {
26222623 av_log(hwfc, AV_LOG_ERROR, "Unsupported sw format: %s!\n",
26232624 av_get_pix_fmt_name(hwfc->sw_format));
@@ -2628,7 +2629,8 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc) · 4 unmodified lines
26282629 hwctx->tiling, hwctx->format, NULL,
26292630 NULL, &supported_usage,
26302631 disable_multiplane,
2631− hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT);
2632+ !hwctx->usage ||
2633+ (hwctx->usage & VK_IMAGE_USAGE_STORAGE_BIT));
26322634 if (err < 0)
26332635 return err;
26342636 }

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