mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
vulkan: initialize discardRectangleCount even if the state is dynamic
Only the array of rectangles should be dynamic. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18015>
This commit is contained in:
parent
bb5d09da6c
commit
3f9450b4e5
1 changed files with 2 additions and 2 deletions
|
|
@ -403,11 +403,11 @@ vk_discard_rectangles_state_init(struct vk_discard_rectangles_state *dr,
|
|||
if (dr_info == NULL)
|
||||
return;
|
||||
|
||||
assert(dr_info->discardRectangleCount <= MESA_VK_MAX_DISCARD_RECTANGLES);
|
||||
dr->mode = dr_info->discardRectangleMode;
|
||||
dr->rectangle_count = dr_info->discardRectangleCount;
|
||||
|
||||
if (!IS_DYNAMIC(DR_RECTANGLES)) {
|
||||
assert(dr_info->discardRectangleCount <= MESA_VK_MAX_DISCARD_RECTANGLES);
|
||||
dr->rectangle_count = dr_info->discardRectangleCount;
|
||||
typed_memcpy(dr->rectangles, dr_info->pDiscardRectangles,
|
||||
dr_info->discardRectangleCount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue