diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_program.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 30ec3f1ff86..d5c5a32bbc4 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -1526,6 +1526,7 @@ iris_create_tcs_state(struct pipe_context *ctx, { struct iris_context *ice = (void *) ctx; struct iris_screen *screen = (void *) ctx->screen; + const struct brw_compiler *compiler = screen->compiler; struct iris_uncompiled_shader *ish = iris_create_shader_state(ctx, state); struct shader_info *info = &ish->nir->info; @@ -1544,6 +1545,14 @@ iris_create_tcs_state(struct pipe_context *ctx, .patch_outputs_written = info->patch_outputs_written, }; + /* 8_PATCH mode needs the key to contain the input patch dimensionality. + * We don't have that information, so we randomly guess that the input + * and output patches are the same size. This is a bad guess, but we + * can't do much better. + */ + if (compiler->use_tcs_8_patch) + key.input_vertices = info->tess.tcs_vertices_out; + iris_compile_tcs(ice, ish, &key); } diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index a9af1cd0dc4..f48bacf77e1 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3651,6 +3651,11 @@ iris_store_tcs_state(struct iris_context *ice, hs.InstanceCount = tcs_prog_data->instances - 1; hs.MaximumNumberofThreads = devinfo->max_tcs_threads - 1; hs.IncludeVertexHandles = true; + +#if GEN_GEN >= 9 + hs.DispatchMode = vue_prog_data->dispatch_mode; + hs.IncludePrimitiveID = tcs_prog_data->include_primitive_id; +#endif } } |