mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
zink: do not open-code memcpy
There's a lot of optimized memcpy implementations out there, let's use them instead of manually copying. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>
This commit is contained in:
parent
93682f9f4d
commit
cef751c86a
1 changed files with 3 additions and 2 deletions
|
|
@ -1732,8 +1732,9 @@ spirv_builder_get_words(struct spirv_builder *b, uint32_t *words,
|
|||
if (buffer == &b->exec_modes && *tcs_vertices_out_word > 0)
|
||||
*tcs_vertices_out_word += written;
|
||||
|
||||
for (int j = 0; j < buffer->num_words; ++j)
|
||||
words[written++] = buffer->words[j];
|
||||
memcpy(words + written, buffer->words,
|
||||
buffer->num_words * sizeof(uint32_t));
|
||||
written += buffer->num_words;
|
||||
}
|
||||
|
||||
assert(written == spirv_builder_get_num_words(b));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue