mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
vulkan/state: Fix input attachment map state initialization/copy
vk_dynamic_graphics_state_copy() is not copying the input attachment map, and color_attachment_count is not initialized in vk_dynamic_graphics_state_init_ial(). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
This commit is contained in:
parent
34a5f4ac7c
commit
38e546c202
1 changed files with 9 additions and 0 deletions
|
|
@ -1142,6 +1142,7 @@ vk_dynamic_graphics_state_init_ial(struct vk_dynamic_graphics_state *dst,
|
|||
const struct vk_input_attachment_location_state *ial)
|
||||
{
|
||||
if (IS_NEEDED(INPUT_ATTACHMENT_MAP)) {
|
||||
dst->ial.color_attachment_count = ial->color_attachment_count;
|
||||
typed_memcpy(dst->ial.color_map, ial->color_map, MESA_VK_MAX_COLOR_ATTACHMENTS);
|
||||
dst->ial.depth_att = ial->depth_att;
|
||||
dst->ial.stencil_att = ial->stencil_att;
|
||||
|
|
@ -2246,6 +2247,14 @@ vk_dynamic_graphics_state_copy(struct vk_dynamic_graphics_state *dst,
|
|||
|
||||
COPY_IF_SET(RP_ATTACHMENTS, rp.attachments);
|
||||
|
||||
if (IS_SET_IN_SRC(INPUT_ATTACHMENT_MAP)) {
|
||||
COPY_MEMBER(INPUT_ATTACHMENT_MAP, ial.color_attachment_count);
|
||||
COPY_ARRAY(INPUT_ATTACHMENT_MAP, ial.color_map,
|
||||
MESA_VK_MAX_COLOR_ATTACHMENTS);
|
||||
COPY_MEMBER(INPUT_ATTACHMENT_MAP, ial.depth_att);
|
||||
COPY_MEMBER(INPUT_ATTACHMENT_MAP, ial.stencil_att);
|
||||
}
|
||||
|
||||
if (IS_SET_IN_SRC(COLOR_ATTACHMENT_MAP)) {
|
||||
COPY_ARRAY(COLOR_ATTACHMENT_MAP, cal.color_map,
|
||||
MESA_VK_MAX_COLOR_ATTACHMENTS);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue