mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: clean up tcs_vertices_out_word handling
At this point, we already have the index of the declaration itself in the tcs_vertices_out_word variable, so we only need to add the offset from the start of the exec_modes buffer. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>
This commit is contained in:
parent
e6edce2f2a
commit
93682f9f4d
1 changed files with 5 additions and 7 deletions
|
|
@ -1726,16 +1726,14 @@ spirv_builder_get_words(struct spirv_builder *b, uint32_t *words,
|
|||
&b->instructions
|
||||
};
|
||||
|
||||
bool find_tcs_vertices_out = *tcs_vertices_out_word > 0;
|
||||
for (int i = 0; i < ARRAY_SIZE(buffers); ++i) {
|
||||
const struct spirv_buffer *buffer = buffers[i];
|
||||
for (int j = 0; j < buffer->num_words; ++j) {
|
||||
if (find_tcs_vertices_out && buffer == &b->exec_modes && *tcs_vertices_out_word == j) {
|
||||
*tcs_vertices_out_word = written;
|
||||
find_tcs_vertices_out = false;
|
||||
}
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
||||
assert(written == spirv_builder_get_num_words(b));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue