gallium/u_threaded: set has_user_indices = false in the driver thread
to remove some overhead from the main thread. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
This commit is contained in:
parent
60653366b8
commit
351ba767af
|
@ -2297,6 +2297,7 @@ tc_call_draw_single(struct pipe_context *pipe, union tc_payload *payload)
|
|||
draw.start = info->info.min_index;
|
||||
draw.count = info->info.max_index;
|
||||
info->info.index_bounds_valid = false;
|
||||
info->info.has_user_indices = false;
|
||||
|
||||
pipe->draw_vbo(pipe, &info->info, NULL, &draw, 1);
|
||||
if (info->info.index_size)
|
||||
|
@ -2336,6 +2337,7 @@ tc_call_draw_multi(struct pipe_context *pipe, union tc_payload *payload)
|
|||
{
|
||||
struct tc_draw_multi *info = (struct tc_draw_multi*)payload;
|
||||
|
||||
info->info.has_user_indices = false;
|
||||
info->info.index_bounds_valid = false;
|
||||
|
||||
pipe->draw_vbo(pipe, &info->info, NULL, info->slot, info->num_draws);
|
||||
|
@ -2396,7 +2398,6 @@ tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info,
|
|||
struct tc_draw_single *p =
|
||||
tc_add_struct_typed_call(tc, TC_CALL_draw_single, tc_draw_single);
|
||||
memcpy(&p->info, info, DRAW_INFO_SIZE_WITHOUT_MIN_MAX_INDEX);
|
||||
p->info.has_user_indices = false;
|
||||
p->info.index.resource = buffer;
|
||||
/* u_threaded_context stores start/count in min/max_index for single draws. */
|
||||
p->info.min_index = offset >> util_logbase2(index_size);
|
||||
|
@ -2444,7 +2445,6 @@ tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info,
|
|||
tc_add_slot_based_call(tc, TC_CALL_draw_multi, tc_draw_multi,
|
||||
num_draws);
|
||||
memcpy(&p->info, info, DRAW_INFO_SIZE_WITHOUT_MIN_MAX_INDEX);
|
||||
p->info.has_user_indices = false;
|
||||
p->info.index.resource = buffer;
|
||||
p->num_draws = num_draws;
|
||||
|
||||
|
|
Loading…
Reference in New Issue