panfrost: Expose COMPUTE-related caps for GLES3.1
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 23 Jul 2019 16:05:40 +0000 (09:05 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 1 Aug 2019 23:23:01 +0000 (16:23 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_screen.c

index d8aa6e3410380469e08b640a6314a063a8a55017..b517c6c6fe0854d98b2adaa2fce4e1c9875c07fe 100644 (file)
@@ -143,6 +143,10 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
         case PIPE_CAP_IMAGE_LOAD_FORMATTED:
                 return is_deqp;
 
+        /* For faking compute shaders */
+        case PIPE_CAP_COMPUTE:
+                return is_deqp;
+
         /* TODO: Where does this req come from in practice? */
         case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
                 return 1;
@@ -238,12 +242,12 @@ panfrost_get_shader_param(struct pipe_screen *screen,
                           enum pipe_shader_type shader,
                           enum pipe_shader_cap param)
 {
+        bool is_deqp = pan_debug & PAN_DBG_DEQP;
+
         if (shader != PIPE_SHADER_VERTEX &&
-            shader != PIPE_SHADER_FRAGMENT) {
+            shader != PIPE_SHADER_FRAGMENT &&
+            !(shader == PIPE_SHADER_COMPUTE && is_deqp))
                 return 0;
-        }
-
-        bool is_deqp = pan_debug & PAN_DBG_DEQP;
 
         /* this is probably not totally correct.. but it's a start: */
         switch (param) {