mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
intel: Allow copy engine class in intel_gem_create_context_engines()
I want to use I915_ENGINE_CLASS_COPY in iris. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
This commit is contained in:
parent
08ffbc055b
commit
79b199b333
1 changed files with 5 additions and 1 deletions
|
|
@ -89,11 +89,14 @@ intel_gem_create_context_engines(int fd,
|
|||
*/
|
||||
int last_engine_idx[] = {
|
||||
[I915_ENGINE_CLASS_RENDER] = -1,
|
||||
[I915_ENGINE_CLASS_COPY] = -1,
|
||||
};
|
||||
|
||||
int i915_engine_counts[] = {
|
||||
[I915_ENGINE_CLASS_RENDER] =
|
||||
intel_gem_count_engines(info, I915_ENGINE_CLASS_RENDER),
|
||||
[I915_ENGINE_CLASS_COPY] =
|
||||
intel_gem_count_engines(info, I915_ENGINE_CLASS_COPY),
|
||||
};
|
||||
|
||||
/* For each queue, we look for the next instance that matches the class we
|
||||
|
|
@ -101,7 +104,8 @@ intel_gem_create_context_engines(int fd,
|
|||
*/
|
||||
for (int i = 0; i < num_engines; i++) {
|
||||
uint16_t engine_class = engine_classes[i];
|
||||
assert(engine_class == I915_ENGINE_CLASS_RENDER);
|
||||
assert(engine_class == I915_ENGINE_CLASS_RENDER ||
|
||||
engine_class == I915_ENGINE_CLASS_COPY);
|
||||
if (i915_engine_counts[engine_class] <= 0) {
|
||||
free(engines_param);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue