diff options
author | Jordan Justen <[email protected]> | 2018-09-18 16:24:13 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:09 -0800 |
commit | b35c8f218204a1dcd41769c8a97e3de85eff320f (patch) | |
tree | dda199a2d57f758ee9a1b35826d25d6065898354 /src/gallium/drivers/iris/iris_program.c | |
parent | 229450a2a60b6cd14b063465d1cdd7f381e53ae2 (diff) |
iris/compute: Push subgroup-id
Signed-off-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_program.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_program.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 4aba8d0bfe3..ed72c2848e2 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -1059,6 +1059,19 @@ iris_update_compiled_compute_shader(struct iris_context *ice) } void +iris_fill_cs_push_const_buffer(struct brw_cs_prog_data *cs_prog_data, + uint32_t *dst) +{ + struct brw_stage_prog_data *prog_data = &cs_prog_data->base; + assert(cs_prog_data->push.total.size > 0); + assert(cs_prog_data->push.cross_thread.size == 0); + assert(cs_prog_data->push.per_thread.dwords == 1); + assert(prog_data->param[0] == BRW_PARAM_BUILTIN_SUBGROUP_ID); + for (unsigned t = 0; t < cs_prog_data->threads; t++) + dst[8 * t] = t; +} + +void iris_init_program_functions(struct pipe_context *ctx) { ctx->create_vs_state = iris_create_shader_state; |