venus: Erase pViewports and pScissors in fewer cases
authorLina Versace <linyaa@google.com>
Fri, 4 Aug 2023 16:35:58 +0000 (09:35 -0700)
committerLina Versace <linyaa@google.com>
Wed, 18 Oct 2023 19:12:16 +0000 (12:12 -0700)
commit11f31f137c43d98a1bf62ad838755d0d807351ad
tree76aecba87eccf6cc50df1fe44e9ca54ce1dc0512
parent9a93ed7b5623138c5876e38c5c9f29fd36e41538
venus: Erase pViewports and pScissors in fewer cases

We should avoid erasing VkGraphicsPipelineCreateInfo when possible
because the erasure add cpu overhead. Do not erase pViewports if
viewportCount is 0. Do not erase pScissors if scissorCount is 0.

Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22419>
src/virtio/vulkan/vn_pipeline.c