diff options
author | Kristian H. Kristensen <[email protected]> | 2019-10-22 17:16:09 -0700 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-11-07 16:36:56 -0800 |
commit | 8621fbc37b205b142639a582cf6a2a76d68b25cb (patch) | |
tree | 47ea88798ef80e6b6ea9f0de93cb99c77ebb5cc6 /src/gallium/drivers/freedreno | |
parent | 77b96b843e4d58a1462976dacf6ae314de815881 (diff) |
freedreno/ir3: Add tessellation field to shader key
Whether we're tessellating and which primitives the TES outputs
affects the entire pipeline so let's add a field to the key to track
that.
Signed-off-by: Kristian H. Kristensen <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index fcf0dc19233..a635e66d932 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -157,6 +157,23 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, .sprite_coord_mode = ctx->rasterizer->sprite_coord_mode, }; + if (info->mode == PIPE_PRIM_PATCHES) { + shader_info *ds_info = &emit.key.ds->nir->info; + switch (ds_info->tess.primitive_mode) { + case GL_ISOLINES: + emit.key.key.tessellation = IR3_TESS_ISOLINES; + break; + case GL_TRIANGLES: + emit.key.key.tessellation = IR3_TESS_TRIANGLES; + break; + case GL_QUADS: + emit.key.key.tessellation = IR3_TESS_QUADS; + break; + default: + unreachable("bad tessmode"); + } + } + if (emit.key.gs) emit.key.key.has_gs = true; |