mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
radv: fix access to uninitialized radeon_bo_metadata
If the image tiling is set to VK_IMAGE_TILING_LINEAR, buffer_set_metadata will read an uninitialized radeon_bo_metadata. Signed-off-by: Simon Ser <contact@emersion.fr> Fixes:d5fd8cd46e("radv: Allow non-dedicated linear images and buffer.") Cc: mesa-stable Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7898> (cherry picked from commitad19b0714a)
This commit is contained in:
parent
5ac08afcfc
commit
af6cadcc89
2 changed files with 3 additions and 4 deletions
|
|
@ -148,7 +148,7 @@
|
|||
"description": "radv: fix access to uninitialized radeon_bo_metadata",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "d5fd8cd46eeedeabf8647c06489a755aea8f0080"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4950,9 +4950,8 @@ bool radv_get_memory_fd(struct radv_device *device,
|
|||
{
|
||||
struct radeon_bo_metadata metadata;
|
||||
|
||||
if (memory->image) {
|
||||
if (memory->image->tiling != VK_IMAGE_TILING_LINEAR)
|
||||
radv_init_metadata(device, memory->image, &metadata);
|
||||
if (memory->image && memory->image->tiling != VK_IMAGE_TILING_LINEAR) {
|
||||
radv_init_metadata(device, memory->image, &metadata);
|
||||
device->ws->buffer_set_metadata(memory->bo, &metadata);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue