diff options
author | Marek Olšák <marek.olsak@amd.com> | 2020-11-28 05:18:38 -0500 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-12-08 17:47:56 +0000 |
commit | 351ba767afe5db4603a60be33fb78ec41630f502 (patch) | |
tree | f393879b03f98009124ba7e8a244e2a4c95e6a99 | |
parent | 60653366b8f014edd8cd1bc0b765932f3c2ac408 (diff) |
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>
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index eddb00e9d5f..af0b936c79b 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -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; |