diff options
author | Kenneth Graunke <[email protected]> | 2019-07-07 16:48:10 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-07-11 01:18:24 -0700 |
commit | a01770b9c878b6b95875ef60146ce4ee5e4cfd54 (patch) | |
tree | 38c2d9c26db73475ebda21d4a041149f91a19e0b /src/gallium/drivers/iris/iris_draw.c | |
parent | c58f52f0ef39db7ca6574381931203f435b03280 (diff) |
iris: Fix key->input_vertices for 8_PATCH TCS mode.
We were failing to flag the program dirty when it changed. Also, we
were unnecessarily setting key->input_vertices for SINGLE_PATCH mode,
which would reduce program cache hits. Only set it if needed.
Diffstat (limited to 'src/gallium/drivers/iris/iris_draw.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_draw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index 50c18774c70..5793dc15064 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -63,6 +63,9 @@ static void iris_update_draw_info(struct iris_context *ice, const struct pipe_draw_info *info) { + struct iris_screen *screen = (struct iris_screen *)ice->ctx.screen; + const struct brw_compiler *compiler = screen->compiler; + if (ice->state.prim_mode != info->mode) { ice->state.prim_mode = info->mode; ice->state.dirty |= IRIS_DIRTY_VF_TOPOLOGY; @@ -81,6 +84,10 @@ iris_update_draw_info(struct iris_context *ice, ice->state.vertices_per_patch = info->vertices_per_patch; ice->state.dirty |= IRIS_DIRTY_VF_TOPOLOGY; + /* 8_PATCH TCS needs this for key->input_vertices */ + if (compiler->use_tcs_8_patch) + ice->state.dirty |= IRIS_DIRTY_UNCOMPILED_TCS; + /* Flag constants dirty for gl_PatchVerticesIn if needed. */ const struct shader_info *tcs_info = iris_get_shader_info(ice, MESA_SHADER_TESS_CTRL); |