r600: Fix warning regarding mixing enums and unsigned in ?: expression
authorGert Wollny <gert.wollny@collabora.com>
Wed, 6 May 2020 16:48:35 +0000 (18:48 +0200)
committerGert Wollny <gert.wollny@collabora.com>
Thu, 7 May 2020 09:01:02 +0000 (11:01 +0200)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>

src/gallium/drivers/r600/sb/sb_bc_parser.cpp

index 6b19d61babeed4aa000b1c3177f3df44cef58dfe..abbb26c13c16d5304352d518faf24dc34fb30ef2 100644 (file)
@@ -476,7 +476,7 @@ int bc_parser::prepare_alu_group(cf_node* cf, alu_group_node *g) {
                                n->src[s] = sh->get_const_value(src.value);
                        } else if (src.sel == ALU_SRC_PS || src.sel == ALU_SRC_PV) {
                                unsigned pgroup = !cgroup, prev_slot = src.sel == ALU_SRC_PS ?
-                                               SLOT_TRANS : src.chan;
+                                               ((unsigned)SLOT_TRANS) : src.chan;
 
                                // XXX shouldn't happen but llvm backend uses PS on cayman
                                if (prev_slot == SLOT_TRANS && ctx.is_cayman())