anv: use the parameter passed to the macro
authorIván Briano <ivan.briano@intel.com>
Wed, 1 Mar 2023 00:04:56 +0000 (16:04 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 1 Mar 2023 19:07:41 +0000 (19:07 +0000)
The two points calling this macro pass dyn->rs.provoking_vertex to it,
which is why it works, but it's cleaner to use the parameter instead.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21613>

src/intel/vulkan/anv_private.h

index 7f935cc..309639c 100644 (file)
@@ -4011,7 +4011,7 @@ anv_line_rasterization_mode(VkLineRasterizationModeEXT line_mode,
 
 /* Fill provoking vertex mode to packet. */
 #define ANV_SETUP_PROVOKING_VERTEX(cmd, mode)         \
-   switch (dyn->rs.provoking_vertex) {                \
+   switch (mode) {                                    \
    case VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT:    \
       cmd.TriangleStripListProvokingVertexSelect = 0; \
       cmd.LineStripListProvokingVertexSelect = 0;     \