r600/sfn: Fix warning for mixed use of enum and integer
authorGert Wollny <gert.wollny@collabora.com>
Thu, 22 Dec 2022 12:54:36 +0000 (13:54 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 2 Jan 2023 14:31:35 +0000 (14:31 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20451>

src/gallium/drivers/r600/sfn/sfn_nir.cpp

index 2e639fe..72a89e6 100644 (file)
@@ -862,7 +862,7 @@ r600_shader_from_nir(struct r600_context *rctx,
        (sh->info.stage == MESA_SHADER_VERTEX && key->vs.as_ls)) {
       auto prim_type = sh->info.stage == MESA_SHADER_TESS_EVAL
                           ? u_tess_prim_from_shader(sh->info.tess._primitive_mode)
-                          : key->tcs.prim_mode;
+                          : (pipe_prim_type)key->tcs.prim_mode;
       NIR_PASS_V(sh, r600_lower_tess_io, static_cast<pipe_prim_type>(prim_type));
    }