diff options
author | Jason Ekstrand <[email protected]> | 2017-08-24 11:40:31 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:37:52 -0800 |
commit | 295605c930270a5b90f847b79474507d8b0c9e9c (patch) | |
tree | 1ad33ed0da14147d207cb16682fb800a790cf6a0 /src/mesa/drivers | |
parent | 6411defdcd6f560e74eaaaf3266f9efbb6dd81da (diff) |
intel/cs: Push subgroup ID instead of base thread ID
We're going to want subgroup ID for SPIR-V subgroups eventually anyway.
We really only want to push one and calculate the other from it. It
makes a bit more sense to push the subgroup ID because it's simpler to
calculate and because it's a real API thing. The only advantage to
pushing the base thread ID is to avoid a single SHL in the shader.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_constant_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_constant_state.c b/src/mesa/drivers/dri/i965/gen6_constant_state.c index acf7454cef5..d89e7bde24b 100644 --- a/src/mesa/drivers/dri/i965/gen6_constant_state.c +++ b/src/mesa/drivers/dri/i965/gen6_constant_state.c @@ -317,7 +317,7 @@ brw_upload_cs_push_constants(struct brw_context *brw, for (unsigned i = 0; i < cs_prog_data->push.cross_thread.dwords; i++) { - assert(prog_data->param[i] != BRW_PARAM_BUILTIN_THREAD_LOCAL_ID); + assert(prog_data->param[i] != BRW_PARAM_BUILTIN_SUBGROUP_ID); param_copy[i] = brw_param_value(brw, prog, stage_state, prog_data->param[i]); } @@ -330,8 +330,8 @@ brw_upload_cs_push_constants(struct brw_context *brw, cs_prog_data->push.cross_thread.regs); unsigned src = cs_prog_data->push.cross_thread.dwords; for ( ; src < prog_data->nr_params; src++, dst++) { - if (prog_data->param[src] == BRW_PARAM_BUILTIN_THREAD_LOCAL_ID) { - param[dst] = t * cs_prog_data->simd_size; + if (prog_data->param[src] == BRW_PARAM_BUILTIN_SUBGROUP_ID) { + param[dst] = t; } else { param[dst] = brw_param_value(brw, prog, stage_state, prog_data->param[src]); |