Commit c9c8c2f7 authored by Lionel Landwerlin's avatar Lionel Landwerlin

anv: fix crash in vkCmdClearAttachments with unused attachment

anv_render_pass_compile() turns an unused attachment into a NULL
depth_stencil_attachment pointer so check that pointer before
accessing it.

Found with updates to existing CTS tests.
Signed-off-by: 's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 208be8ea ("anv: Make subpass::depth_stencil_attachment a pointer")
Reviewed-by: 's avatarEric Engestrom <eric@engestrom.ch>
Reviewed-by: 's avatarJuan A. Suarez <jasuarez@igalia.com>
parent b650f3d1
Pipeline #4643 failed