mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 10:58:03 +03:00
hasvk: add video engine support in various places
[dancingmirrors: A few forward port fixes.]
This commit is contained in:
1 parent
203bf6b58d
commit
d9147c64f6
3 files changed
+62
-2
No files matched your search
@@ -1482,11 +1482,12 @@ anv_physical_device_free_disk_cache(struct anv_physical_device *device)
|
||||
}
|
||||
|
||||
static void
|
||||
anv_override_engine_counts(int *gc_count, int *g_count, int *c_count)
|
||||
anv_override_engine_counts(int *gc_count, int *g_count, int *c_count, int *v_count)
|
||||
{
|
||||
int gc_override = -1;
|
||||
int g_override = -1;
|
||||
int c_override = -1;
|
||||
int v_override = -1;
|
||||
const char *env_ = os_get_option("HASVK_QUEUE_OVERRIDE");
|
||||
|
||||
if (env_ == NULL)
|
||||
@@ -1502,6 +1503,8 @@ anv_override_engine_counts(int *gc_count, int *g_count, int *c_count)
|
||||
g_override = strtol(next + 2, NULL, 0);
|
||||
} else if (strncmp(next, "c=", 2) == 0) {
|
||||
c_override = strtol(next + 2, NULL, 0);
|
||||
} else if (strncmp(next, "v=", 2) == 0) {
|
||||
v_override = strtol(next + 2, NULL, 0);
|
||||
} else {
|
||||
mesa_logw("Ignoring unsupported ANV_QUEUE_OVERRIDE token: %s", next);
|
||||
}
|
||||
@@ -1517,6 +1520,8 @@ anv_override_engine_counts(int *gc_count, int *g_count, int *c_count)
|
||||
"Vulkan specification");
|
||||
if (c_override >= 0)
|
||||
*c_count = c_override;
|
||||
if (v_override >= 0)
|
||||
*v_count = v_override;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1528,10 +1533,13 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
||||
int gc_count =
|
||||
intel_engines_count(pdevice->engine_info,
|
||||
INTEL_ENGINE_CLASS_RENDER);
|
||||
int v_count =
|
||||
intel_engines_count(pdevice->engine_info,
|
||||
I915_ENGINE_CLASS_VIDEO);
|
||||
int g_count = 0;
|
||||
int c_count = 0;
|
||||
|
||||
anv_override_engine_counts(&gc_count, &g_count, &c_count);
|
||||
anv_override_engine_counts(&gc_count, &g_count, &c_count, &v_count);
|
||||
|
||||
if (gc_count > 0) {
|
||||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
@@ -1558,6 +1566,13 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
||||
.engine_class = INTEL_ENGINE_CLASS_RENDER,
|
||||
};
|
||||
}
|
||||
if (v_count > 0) {
|
||||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
.queueFlags = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
|
||||
.queueCount = v_count,
|
||||
.engine_class = I915_ENGINE_CLASS_VIDEO,
|
||||
};
|
||||
}
|
||||
/* Increase count below when other families are added as a reminder to
|
||||
* increase the ANV_MAX_QUEUE_FAMILIES value.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user