radv: fix clearing images with vkCmdClear{Color,DepthStencil}Image()
The image aspects field is actually never set and we should use the
range aspect anyways.
Fixes: 1a7b7b17ad ("radv: avoid oob read during clear")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8324>
This commit is contained in:
committed by
Marge Bot
parent
4c751ad67a
commit
58c68bac39
@@ -2206,7 +2206,7 @@ radv_cmd_clear_image(struct radv_cmd_buffer *cmd_buffer,
|
||||
VkFormat format = image->vk_format;
|
||||
VkClearValue internal_clear_value;
|
||||
|
||||
if (image->aspects & VK_IMAGE_ASPECT_COLOR_BIT)
|
||||
if (ranges->aspectMask & VK_IMAGE_ASPECT_COLOR_BIT)
|
||||
internal_clear_value.color = clear_value->color;
|
||||
else
|
||||
internal_clear_value.depthStencil = clear_value->depthStencil;
|
||||
|
||||
Reference in New Issue
Block a user