freedreno/a6xx: Turn on geometry shaders
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 11 Oct 2019 03:54:28 +0000 (20:54 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Thu, 17 Oct 2019 20:45:03 +0000 (13:45 -0700)
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
src/gallium/drivers/freedreno/a6xx/fd6_program.c
src/gallium/drivers/freedreno/freedreno_screen.c

index b8a58f635a09b3bcc3968f7daa845bdb8b25aa86..493ee67a08857e6b80650c1c70db07a4b688ebfa 100644 (file)
@@ -916,6 +916,9 @@ fd6_prog_init(struct pipe_context *pctx)
        pctx->create_gs_state = fd6_shader_state_create;
        pctx->delete_gs_state = fd6_shader_state_delete;
 
+       pctx->create_gs_state = fd6_shader_state_create;
+       pctx->delete_gs_state = fd6_shader_state_delete;
+
        pctx->create_fs_state = fd6_shader_state_create;
        pctx->delete_fs_state = fd6_shader_state_delete;
 
index 8c83ddb8041dfb72ad14b855485f45b9ba7b9fec..c1ac4a1c5d046b77f10d24bc5bf31d3455910721 100644 (file)
@@ -354,6 +354,14 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                        return 1;
                return 0;
 
+       /* Geometry shaders.. */
+       case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
+               return 512;
+       case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
+               return 2048;
+       case PIPE_CAP_MAX_GS_INVOCATIONS:
+               return 32;
+
        /* Stream output. */
        case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
                if (is_ir3(screen))
@@ -460,13 +468,14 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen,
        case PIPE_SHADER_FRAGMENT:
        case PIPE_SHADER_VERTEX:
                break;
+       case PIPE_SHADER_GEOMETRY:
+               if (is_a6xx(screen))
+                       break;
+               return 0;
        case PIPE_SHADER_COMPUTE:
                if (has_compute(screen))
                        break;
                return 0;
-       case PIPE_SHADER_GEOMETRY:
-               /* maye we could emulate.. */
-               return 0;
        default:
                DBG("unknown shader type %d", shader);
                return 0;