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 <lionel.g.landwerlin@intel.com>
Fixes: 633efa7af7 ("anv: enable video decode extensions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21194>
This commit is contained in:
Lionel Landwerlin
2023-02-08 17:24:28 +02:00
committed by Marge Bot
parent 81af999a75
commit 6390953fa5
2 changed files with 8 additions and 4 deletions
+6 -4
View File
@@ -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,
+2
View File
@@ -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;