Mesa (main): intel/gem: Add support for I915_ENGINE_CLASS_COMPUTE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 09:35:54 UTC 2022


Module: Mesa
Branch: main
Commit: 60e29fc7c5be3cb15c170fc4a09f5518f48d3927
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=60e29fc7c5be3cb15c170fc4a09f5518f48d3927

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Tue Aug 14 02:34:16 2018 -0700

intel/gem: Add support for I915_ENGINE_CLASS_COMPUTE

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14395>

---

 src/intel/common/intel_gem.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/common/intel_gem.c b/src/intel/common/intel_gem.c
index 9c9da5ab0cb..5f35afabd06 100644
--- a/src/intel/common/intel_gem.c
+++ b/src/intel/common/intel_gem.c
@@ -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;



More information about the mesa-commit mailing list