summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-09-29 12:22:48 -0700
committerJason Ekstrand <[email protected]>2017-10-12 22:39:31 -0700
commit79d403417cacd2728916e32ae55f4fc2a018515c (patch)
treefab0fd92ab5a0192d2f883d12af00c6258fddf6e /src/mesa
parent8d90e2883954eb7022cf8fc98be3773cc5513e7b (diff)
intel/cs: Make thread_local_id a regular builtin param
This is a lot more natural than special casing it all over the place. We still have to do a bit of special-casing in assign_constant_locations but it's not special-cased quite as bad as it was before. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_constant_state.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_constant_state.c b/src/mesa/drivers/dri/i965/gen6_constant_state.c
index eb9e29187c4..62ad6b04976 100644
--- a/src/mesa/drivers/dri/i965/gen6_constant_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_constant_state.c
@@ -305,12 +305,10 @@ brw_upload_cs_push_constants(struct brw_context *brw,
if (cs_prog_data->push.cross_thread.size > 0) {
uint32_t *param_copy = param;
- assert(cs_prog_data->thread_local_id_index < 0 ||
- cs_prog_data->thread_local_id_index >=
- cs_prog_data->push.cross_thread.dwords);
for (unsigned i = 0;
i < cs_prog_data->push.cross_thread.dwords;
i++) {
+ assert(prog_data->param[i] != BRW_PARAM_BUILTIN_THREAD_LOCAL_ID);
param_copy[i] = brw_param_value(brw, prog, stage_state,
prog_data->param[i]);
}
@@ -323,11 +321,11 @@ 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 (src != cs_prog_data->thread_local_id_index) {
+ if (prog_data->param[src] == BRW_PARAM_BUILTIN_THREAD_LOCAL_ID) {
+ param[dst] = t * cs_prog_data->simd_size;
+ } else {
param[dst] = brw_param_value(brw, prog, stage_state,
prog_data->param[src]);
- } else {
- param[dst] = t * cs_prog_data->simd_size;
}
}
}