radv: move alpha_adjust into conditional during vertex input updating
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 8 Sep 2021 19:11:56 +0000 (15:11 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 Oct 2021 17:03:26 +0000 (17:03 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13320>

src/amd/vulkan/radv_cmd_buffer.c

index 9857081..38fa733 100644 (file)
@@ -5498,8 +5498,10 @@ radv_CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingD
          }
       }
 
-      state->alpha_adjust_lo |= (alpha_adjust & 0x1) << loc;
-      state->alpha_adjust_hi |= (alpha_adjust >> 1) << loc;
+      if (alpha_adjust) {
+         state->alpha_adjust_lo |= (alpha_adjust & 0x1) << loc;
+         state->alpha_adjust_hi |= (alpha_adjust >> 1) << loc;
+      }
 
       if (post_shuffle)
          state->post_shuffle |= 1u << loc;