turnip: Use hw enum when emitting A6XX_RB_STENCIL_CONTROL
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 22 May 2020 20:56:13 +0000 (13:56 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Tue, 26 May 2020 19:46:18 +0000 (12:46 -0700)
We're hard-coding this value, so let's use the hw enum and avoid a
warning.

src/freedreno/vulkan/tu_clear_blit.c:2091:19: warning: implicit
conversion from enumeration type 'enum VkStencilOp' to different
enumeration type 'enum adreno_stencil_op' [-Wenum-conversion]

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>

src/freedreno/vulkan/tu_clear_blit.c

index 35a4ccd3fe62bc4198df2b2e3acb6dddf0685166..48e49b224d2189e67f6c93d705b10db2e6644095 100644 (file)
@@ -2088,7 +2088,7 @@ tu_clear_sysmem_attachments(struct tu_cmd_buffer *cmd,
    tu_cs_emit_regs(cs, A6XX_RB_STENCIL_CONTROL(
          .stencil_enable = s_clear,
          .func = FUNC_ALWAYS,
-         .zpass = VK_STENCIL_OP_REPLACE));
+         .zpass = STENCIL_REPLACE));
    tu_cs_emit_regs(cs, A6XX_RB_STENCILMASK(.mask = 0xff));
    tu_cs_emit_regs(cs, A6XX_RB_STENCILWRMASK(.wrmask = 0xff));
    tu_cs_emit_regs(cs, A6XX_RB_STENCILREF(.ref = s_clear_val));