anv: Don't copy the lineStipple values if lineStipple is not enabled
authorIván Briano <ivan.briano@intel.com>
Thu, 29 Jul 2021 03:32:15 +0000 (20:32 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 29 Jul 2021 23:10:12 +0000 (23:10 +0000)
commitdf338fe7d1ebe3caa7a6ad2168a103835577c4c6
tree8ed0c9c43e47c16e6b98fe6a30da0e9928e4f056
parentc6be4f85e3c443f4ec46e60e25054601e8af979a
anv: Don't copy the lineStipple values if lineStipple is not enabled

If the passed VkPipelineRasterizationLineStateCreateInfoEXT wasn't zero
initialized, we copy garbage values that are later on used to set the
state and may end up crashing when they are beyond the limits of the HW.

v2 (Lionel): Simplify if condition

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12121>
src/intel/vulkan/anv_pipeline.c