From: Kristian H. Kristensen Date: Fri, 11 Oct 2019 03:54:28 +0000 (-0700) Subject: freedreno/a6xx: Turn on geometry shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a4e6726baa15e362c8297d6d64cd51e9b27491d;p=mesa.git freedreno/a6xx: Turn on geometry shaders Signed-off-by: Kristian H. Kristensen --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index b8a58f635a0..493ee67a088 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -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; diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 8c83ddb8041..c1ac4a1c5d0 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -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;