freedreno: add ESSL cap
authorRob Clark <robdclark@gmail.com>
Thu, 21 Mar 2019 13:33:33 +0000 (09:33 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 22 Mar 2019 20:39:14 +0000 (16:39 -0400)
Report 320 for a6xx, which isn't *quite* true (no geom/tess, in
particular), but other caps keep the reported GL and GLSL versions
correct (3.1 / 3.10 es).  But reporting 320 will switch on
EXT_gpu_shader5, which is the goal.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_screen.c

index 98f720afbf0d581f6cb9684fb589b29b7a35d509..62f65369cc766ac4e2df387dbba2fe4d9fdef7e9 100644 (file)
@@ -279,6 +279,13 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                        return 120;
                return is_ir3(screen) ? 140 : 120;
 
+       case PIPE_CAP_ESSL_FEATURE_LEVEL:
+               /* we can probably enable 320 for a5xx too, but need to test: */
+               if (is_a6xx(screen)) return 320;
+               if (is_a5xx(screen)) return 310;
+               if (is_ir3(screen))  return 300;
+               return 120;
+
        case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
                if (is_a6xx(screen)) return 64;
                if (is_a5xx(screen)) return 4;