radv: null bo list pointer for null descriptors on update

failing to unset any existing pointers here leads to stale bo entries in
the list and then the kernel rejecting the cmdbuf with ENOENT

Fixes: 126d5adb11 ("radv: Use host memory pool for non-freeable descriptors.")

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8840>
(cherry picked from commit 2f534c2e2e)
This commit is contained in:
Mike Blumenkrantz 2021-02-02 19:59:12 -05:00 committed by Dylan Baker
parent bb2aea8ded
commit bde380bde9
2 changed files with 8 additions and 1 deletions

View file

@ -2128,7 +2128,7 @@
"description": "radv: null bo list pointer for null descriptors on update",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "126d5adb11e18a329e197db8f117b47bba30eeed"
},

View file

@ -968,6 +968,8 @@ static void write_texel_buffer_descriptor(struct radv_device *device,
if (!buffer_view) {
memset(dst, 0, 4 * 4);
if (!cmd_buffer)
*buffer_list = NULL;
return;
}
@ -989,6 +991,8 @@ static void write_buffer_descriptor(struct radv_device *device,
if (!buffer) {
memset(dst, 0, 4 * 4);
if (!cmd_buffer)
*buffer_list = NULL;
return;
}
@ -1053,6 +1057,7 @@ static void write_dynamic_buffer_descriptor(struct radv_device *device,
if (!buffer) {
range->va = 0;
*buffer_list = NULL;
return;
}
@ -1088,6 +1093,8 @@ write_image_descriptor(struct radv_device *device,
if (!iview) {
memset(dst, 0, size);
if (!cmd_buffer)
*buffer_list = NULL;
return;
}