diff options
author | Kenneth Graunke <[email protected]> | 2018-12-04 14:11:51 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:10 -0800 |
commit | 286b8b8f99580fae0a61803517898b1b80795747 (patch) | |
tree | bfc45b7dc52e7f081327484885dd5993710603b9 /src/gallium/drivers/iris/iris_draw.c | |
parent | 96bb328e9b82c36ed271f1acbaff76b23ba319d3 (diff) |
iris: handle PatchVerticesIn as a system value.
Diffstat (limited to 'src/gallium/drivers/iris/iris_draw.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_draw.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index 4b8205a2bbe..d33bad0a0ff 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -47,11 +47,24 @@ static void iris_update_draw_info(struct iris_context *ice, const struct pipe_draw_info *info) { - if (ice->state.prim_mode != info->mode || - ice->state.vertices_per_patch != info->vertices_per_patch) { + if (ice->state.prim_mode != info->mode) { ice->state.prim_mode = info->mode; + ice->state.dirty |= IRIS_DIRTY_VF_TOPOLOGY; + } + + if (info->mode == PIPE_PRIM_PATCHES && + ice->state.vertices_per_patch != info->vertices_per_patch) { ice->state.vertices_per_patch = info->vertices_per_patch; ice->state.dirty |= IRIS_DIRTY_VF_TOPOLOGY; + + /* Flag constants dirty for gl_PatchVerticesIn if needed. */ + const struct shader_info *tcs_info = + iris_get_shader_info(ice, MESA_SHADER_TESS_CTRL); + if (tcs_info && + tcs_info->system_values_read & (1ull << SYSTEM_VALUE_VERTICES_IN)) { + ice->state.dirty |= IRIS_DIRTY_CONSTANTS_TCS; + ice->state.shaders[MESA_SHADER_TESS_CTRL].cbuf0_needs_upload = true; + } } if (ice->state.primitive_restart != info->primitive_restart || |