From 6390953fa5c0e0a001ce6c07f704366c18f85ccf Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 8 Feb 2023 17:24:28 +0200 Subject: [PATCH] anv: put the video extension behind a variable As initialized acked. The WSI code is currently trying to blit on the video queue. Signed-off-by: Lionel Landwerlin Fixes: 633efa7af7b4 ("anv: enable video decode extensions.") Part-of: --- src/intel/vulkan/anv_device.c | 10 ++++++---- src/intel/vulkan/anv_private.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index eefd1108e2e..acde4792a46 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -272,9 +272,9 @@ get_device_extensions(const struct anv_physical_device *device, .KHR_timeline_semaphore = true, .KHR_uniform_buffer_standard_layout = true, .KHR_variable_pointers = true, - .KHR_video_queue = true, - .KHR_video_decode_queue = true, - .KHR_video_decode_h264 = VIDEO_CODEC_H264DEC, + .KHR_video_queue = device->video_decode_enabled, + .KHR_video_decode_queue = device->video_decode_enabled, + .KHR_video_decode_h264 = VIDEO_CODEC_H264DEC && device->video_decode_enabled, .KHR_vulkan_memory_model = true, .KHR_workgroup_memory_explicit_layout = true, .KHR_zero_initialize_workgroup_memory = true, @@ -765,7 +765,7 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice) .engine_class = compute_class, }; } - if (v_count > 0) { + if (v_count > 0 && pdevice->video_decode_enabled) { pdevice->queue.families[family_count++] = (struct anv_queue_family) { .queueFlags = VK_QUEUE_VIDEO_DECODE_BIT_KHR, .queueCount = v_count, @@ -936,6 +936,8 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, device->has_implicit_ccs = device->info.has_aux_map || device->info.verx10 >= 125; + device->video_decode_enabled = debug_get_bool_option("ANV_VIDEO_DECODE", false); + /* Check if we can read the GPU timestamp register from the CPU */ uint64_t u64_ignore; device->has_reg_timestamp = intel_gem_read_render_timestamp(fd, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 00efb87c848..47dc99a9360 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -925,6 +925,8 @@ struct anv_physical_device { * the total system ram to try and avoid running out of RAM. */ bool supports_48bit_addresses; + bool video_decode_enabled; + struct brw_compiler * compiler; struct isl_device isl_dev; struct intel_perf_config * perf;