diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2016-05-26 13:49:07 -0700 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2016-06-01 19:29:02 -0700 |
commit | 1b79e7ebbd77a7e714fafadd91459059aacf2407 (patch) | |
tree | 9321a46aae9763a888e2796e31dc6fbb493251f3 /src/intel/vulkan/anv_cmd_buffer.c | |
parent | 3ef0957dac11edee7babc9746ec766dcb055d909 (diff) |
i965: Store number of threads in brw_cs_prog_data
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/intel/vulkan/anv_cmd_buffer.c')
-rw-r--r-- | src/intel/vulkan/anv_cmd_buffer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 4d0fd7c67ff..63d096c6e8b 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -1076,9 +1076,8 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer) if (reg_aligned_constant_size == 0) return (struct anv_state) { .offset = 0 }; - const unsigned threads = pipeline->cs_thread_width_max; const unsigned total_push_constants_size = - reg_aligned_constant_size * threads; + reg_aligned_constant_size * cs_prog_data->threads; const unsigned push_constant_alignment = cmd_buffer->device->info.gen < 8 ? 32 : 64; const unsigned aligned_total_push_constants_size = @@ -1091,7 +1090,7 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer) /* Walk through the param array and fill the buffer with data */ uint32_t *u32_map = state.map; - brw_cs_fill_local_id_payload(cs_prog_data, u32_map, threads, + brw_cs_fill_local_id_payload(cs_prog_data, u32_map, cs_prog_data->threads, reg_aligned_constant_size); /* Setup uniform data for the first thread */ @@ -1102,7 +1101,7 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer) /* Copy uniform data from the first thread to every other thread */ const size_t uniform_data_size = prog_data->nr_params * sizeof(uint32_t); - for (unsigned t = 1; t < threads; t++) { + for (unsigned t = 1; t < cs_prog_data->threads; t++) { memcpy(&u32_map[t * param_aligned_count + local_id_dwords], &u32_map[local_id_dwords], uniform_data_size); |