dzn: Only bind descriptor sets up to the used amount of the current layout
Prevents setting a root SRV into a slot that's not declared as an SRV in the root signature if a set is bound into a higher slot from a previous draw/dispatch op. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913>
This commit is contained in:
@@ -3106,7 +3106,7 @@ dzn_cmd_buffer_update_heaps(struct dzn_cmd_buffer *cmdbuf, uint32_t bindpoint)
|
||||
new_heap_offsets[type] = dst_heap_offset;
|
||||
update_root_desc_table[type] = true;
|
||||
|
||||
for (uint32_t s = 0; s < MAX_SETS; s++) {
|
||||
for (uint32_t s = 0; s < cmdbuf->state.pipeline->root.sets_param_count; s++) {
|
||||
const struct dzn_descriptor_set *set = desc_state->sets[s].set;
|
||||
if (!set) continue;
|
||||
|
||||
@@ -3175,7 +3175,7 @@ dzn_cmd_buffer_update_heaps(struct dzn_cmd_buffer *cmdbuf, uint32_t bindpoint)
|
||||
}
|
||||
|
||||
if (device->bindless) {
|
||||
for (uint32_t s = 0; s < MAX_SETS; ++s) {
|
||||
for (uint32_t s = 0; s < pipeline->root.sets_param_count; ++s) {
|
||||
const struct dzn_descriptor_set *set = desc_state->sets[s].set;
|
||||
if (!set || !set->pool->bindless.buf)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user