mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
gallium/u_threaded_context: don't call memcpy in tc_set_constant_buffer
In sysprof, the CPU time spend in tc_set_constant_buffer drops from 7% to 1.4% in a release build. It doesn't make sense to me. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6952>
This commit is contained in:
parent
ed3c5fe469
commit
28256d3d7b
1 changed files with 3 additions and 1 deletions
|
|
@ -696,7 +696,9 @@ tc_set_constant_buffer(struct pipe_context *_pipe,
|
|||
} else {
|
||||
tc_set_resource_reference(&p->cb.buffer,
|
||||
cb->buffer);
|
||||
memcpy(&p->cb, cb, sizeof(*cb));
|
||||
p->cb.user_buffer = NULL;
|
||||
p->cb.buffer_offset = cb->buffer_offset;
|
||||
p->cb.buffer_size = cb->buffer_size;
|
||||
}
|
||||
} else {
|
||||
memset(&p->cb, 0, sizeof(*cb));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue