mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 19:08:03 +03:00
hasvk: Gate video decode behind HASVK_DEBUG=video-decode.
Assisted-by: Claude
This commit is contained in:
1 parent
31fd4c3ded
commit
bd3d4fc732
3 files changed
+20
-3
No files matched your search
@@ -96,6 +96,13 @@ static const driOptionDescription anv_dri_options[] = {
|
||||
/* Render engine timestamp register */
|
||||
#define TIMESTAMP 0x2358
|
||||
|
||||
static const struct debug_control debug_control[] = {
|
||||
{ "video-decode", ANV_DEBUG_VIDEO_DECODE },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
enum anv_debug anv_debug;
|
||||
|
||||
/* The "RAW" clocks on Linux are called "FAST" on FreeBSD */
|
||||
#if !defined(CLOCK_MONOTONIC_RAW) && defined(CLOCK_MONOTONIC_FAST)
|
||||
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST
|
||||
@@ -198,7 +205,7 @@ get_device_extensions(const struct anv_physical_device *device,
|
||||
const bool has_syncobj_wait =
|
||||
(device->sync_syncobj_type.features & VK_SYNC_FEATURE_CPU_WAIT) != 0;
|
||||
|
||||
const bool video_decode = VIDEO_CODEC_H264DEC;
|
||||
const bool video_decode = VIDEO_CODEC_H264DEC && ANV_DEBUG(VIDEO_DECODE);
|
||||
|
||||
*ext = (struct vk_device_extension_table) {
|
||||
.KHR_8bit_storage = device->info.ver >= 8,
|
||||
@@ -1582,7 +1589,7 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
||||
.engine_class = INTEL_ENGINE_CLASS_RENDER,
|
||||
};
|
||||
}
|
||||
if (v_count > 0 && VIDEO_CODEC_H264DEC) {
|
||||
if (v_count > 0 && VIDEO_CODEC_H264DEC && ANV_DEBUG(VIDEO_DECODE)) {
|
||||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
.queueFlags = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
|
||||
.queueCount = v_count,
|
||||
@@ -2024,6 +2031,7 @@ VkResult anv_CreateInstance(
|
||||
anv_init_dri_options(instance);
|
||||
|
||||
process_intel_debug_variable();
|
||||
anv_debug = parse_debug_string(os_get_option("HASVK_DEBUG"), debug_control);
|
||||
instance->vk.enable_debug_logging = INTEL_DEBUG(DEBUG_PERF);
|
||||
|
||||
intel_driver_ds_init();
|
||||
|
||||
Reference in new issue
Block a user