From c8bc6644475953b0e6d26a7883bcb8d9a330ac88 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 23 Jul 2019 09:05:40 -0700 Subject: [PATCH] panfrost: Expose COMPUTE-related caps for GLES3.1 Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_screen.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index d8aa6e34103..b517c6c6fe0 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -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) { -- 2.30.2