mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 19:38:10 +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> (cherry picked from commit822dc384b1)
This commit is contained in:
parent
5f3317ec1c
commit
9d31e05b8a
2 changed files with 5 additions and 1 deletions
|
|
@ -1939,7 +1939,7 @@
|
|||
"description": "pvr: Fix seg fault on empty descriptor set",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ce67f5ac944bdc6ebf27e3b115706bec5b63f002"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3571,6 +3571,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_bo *new_desc_set_bo;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue