vulkan: parse instance list and add the DEBUG_UTILS extension

Required to let users know whether debugging is active.
pull/153/merge
Lynne 4 months ago
parent e3676d96cb
commit 356d1cc8ff
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 2
      libavfilter/vulkan_filter.c
  2. 1
      libavutil/hwcontext_vulkan.c
  3. 2
      libavutil/vulkan.c
  4. 4
      libavutil/vulkan_loader.h

@ -151,6 +151,8 @@ skip:
s->extensions = ff_vk_extensions_to_mask(vk_dev->enabled_dev_extensions,
vk_dev->nb_enabled_dev_extensions);
s->extensions |= ff_vk_extensions_to_mask(vk_dev->enabled_inst_extensions,
vk_dev->nb_enabled_inst_extensions);
err = ff_vk_load_functions(device_ctx, &s->vkfn, s->extensions, 1, 1);
if (err < 0) {

@ -739,7 +739,6 @@ static int check_extensions(AVHWDeviceContext *ctx, int dev, AVDictionary *opts,
if (found) {
av_log(ctx, AV_LOG_VERBOSE, "Using %s extension %s\n", mod, tstr);
ADD_VAL_TO_LIST(extension_names, extensions_found, tstr);
p->vkctx.extensions |= FF_VK_EXT_DEBUG_UTILS;
} else {
av_log(ctx, AV_LOG_ERROR, "Debug extension \"%s\" not found!\n",
tstr);

@ -2347,6 +2347,8 @@ int ff_vk_init(FFVulkanContext *s, void *log_parent,
s->extensions = ff_vk_extensions_to_mask(s->hwctx->enabled_dev_extensions,
s->hwctx->nb_enabled_dev_extensions);
s->extensions |= ff_vk_extensions_to_mask(s->hwctx->enabled_inst_extensions,
s->hwctx->nb_enabled_inst_extensions);
err = ff_vk_load_functions(s->device, &s->vkfn, s->extensions, 1, 1);
if (err < 0) {

@ -40,6 +40,10 @@ static inline uint64_t ff_vk_extensions_to_mask(const char * const *extensions,
const char *name;
FFVulkanExtensions flag;
} extension_map[] = {
/* Instance extensions */
{ VK_EXT_DEBUG_UTILS_EXTENSION_NAME, FF_VK_EXT_DEBUG_UTILS },
/* Device extensions */
{ VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME, FF_VK_EXT_RELAXED_EXTENDED_INSTR },
{ VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_DMABUF_MEMORY },
{ VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME, FF_VK_EXT_DRM_MODIFIER_FLAGS },

Loading…
Cancel
Save