mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
pvr: Fix seg fault on empty descriptor set
Vulkan allows empty descriptor sets to be created. When we setup
the descriptor set addresses table we fill in the address of the
`bo` for each valid/currently bound desc set. For empty desc sets
there is no `bo` which was causing a seg fault. Now skip them,
leaving their address set to `~0`.
Reported-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: ce67f5ac94 ("pvr: Write descriptor set addrs table dev addr into shareds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23692>
This commit is contained in:
parent
9d75795087
commit
822dc384b1
1 changed files with 4 additions and 0 deletions
|
|
@ -3906,6 +3906,10 @@ pvr_cmd_buffer_upload_desc_set_table(struct pvr_cmd_buffer *const cmd_buffer,
|
|||
|
||||
desc_set = desc_state->descriptor_sets[set];
|
||||
|
||||
/* TODO: Is it better if we don't set the valid_mask for empty sets? */
|
||||
if (desc_set->layout->descriptor_count == 0)
|
||||
continue;
|
||||
|
||||
if (desc_set->layout->dynamic_buffer_count > 0) {
|
||||
struct pvr_suballoc_bo *new_desc_set_bo;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue