summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jljusten@gmail.com>2021-01-27 11:57:39 -0800
committerJordan Justen <jljusten@gmail.com>2021-01-27 12:52:18 -0800
commit784d602fce9c4a6fa8f023818c65b9c6ec8f3b79 (patch)
tree3caa5637bb6ea34f83587bbbb844c57b5106eeeb
parentb27d474fca94f39a6712babba71bed1e9f5d47cb (diff)
fixup! anv: Support multiple engines with DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXTmr-gitlab-8667-fixups
-rw-r--r--src/intel/vulkan/anv_device.c8
-rw-r--r--src/intel/vulkan/anv_gem_stubs.c9
2 files changed, 16 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 7ef0085f854..a38adfc3be9 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -313,6 +313,10 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
.engine_class = I915_ENGINE_CLASS_RENDER,
};
}
+ /* Increase count below when other families are added as a reminder to
+ * increase the ANV_MAX_QUEUE_FAMILIES value.
+ */
+ STATIC_ASSERT(ANV_MAX_QUEUE_FAMILIES >= 1);
} else {
/* Default to a single render queue */
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
@@ -322,8 +326,10 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
.queueCount = 1,
.engine_class = I915_ENGINE_CLASS_RENDER,
};
+ family_count = 1;
}
- pdevice->queue.family_count = 1;
+ assert(family_count <= ANV_MAX_QUEUE_FAMILIES);
+ pdevice->queue.family_count = family_count;
}
static VkResult
diff --git a/src/intel/vulkan/anv_gem_stubs.c b/src/intel/vulkan/anv_gem_stubs.c
index b41e963fb28..10e57419ab1 100644
--- a/src/intel/vulkan/anv_gem_stubs.c
+++ b/src/intel/vulkan/anv_gem_stubs.c
@@ -252,6 +252,15 @@ anv_i915_query(int fd, uint64_t query_id, void *buffer,
unreachable("Unused");
}
+int
+anv_gem_create_context_engines(struct anv_device *device,
+ const struct drm_i915_query_engine_info *info,
+ int num_engines,
+ uint16_t *engine_classes)
+{
+ unreachable("Unused");
+}
+
struct drm_i915_query_engine_info *
anv_gem_get_engine_info(int fd)
{