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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user