summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_cmd_buffer.c
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/intel/vulkan/anv_cmd_buffer.c
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/intel/vulkan/anv_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/anv_cmd_buffer.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index 64d1417f5b1..b45f8f83757 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -707,12 +707,10 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer)
uint32_t *u32_map = state.map;
if (cs_prog_data->push.cross_thread.size > 0) {
- 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);
u32_map[i] = anv_push_constant_value(data, prog_data->param[i]);
}
}
@@ -724,11 +722,11 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer)
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) {
+ u32_map[dst] = t * cs_prog_data->simd_size;
+ } else {
u32_map[dst] =
anv_push_constant_value(data, prog_data->param[src]);
- } else {
- u32_map[dst] = t * cs_prog_data->simd_size;
}
}
}