mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
intel/gem: Add support for I915_ENGINE_CLASS_COMPUTE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14395>
This commit is contained in:
parent
2d0edbbd37
commit
60e29fc7c5
1 changed files with 5 additions and 1 deletions
|
|
@ -90,6 +90,7 @@ intel_gem_create_context_engines(int fd,
|
|||
int last_engine_idx[] = {
|
||||
[I915_ENGINE_CLASS_RENDER] = -1,
|
||||
[I915_ENGINE_CLASS_COPY] = -1,
|
||||
[I915_ENGINE_CLASS_COMPUTE] = -1,
|
||||
};
|
||||
|
||||
int i915_engine_counts[] = {
|
||||
|
|
@ -97,6 +98,8 @@ intel_gem_create_context_engines(int fd,
|
|||
intel_gem_count_engines(info, I915_ENGINE_CLASS_RENDER),
|
||||
[I915_ENGINE_CLASS_COPY] =
|
||||
intel_gem_count_engines(info, I915_ENGINE_CLASS_COPY),
|
||||
[I915_ENGINE_CLASS_COMPUTE] =
|
||||
intel_gem_count_engines(info, I915_ENGINE_CLASS_COMPUTE),
|
||||
};
|
||||
|
||||
/* For each queue, we look for the next instance that matches the class we
|
||||
|
|
@ -105,7 +108,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 ||
|
||||
engine_class == I915_ENGINE_CLASS_COPY);
|
||||
engine_class == I915_ENGINE_CLASS_COPY ||
|
||||
engine_class == I915_ENGINE_CLASS_COMPUTE);
|
||||
if (i915_engine_counts[engine_class] <= 0) {
|
||||
free(engines_param);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue