gallium: Replace defines by enums

That helps the code checker to see whether all switch cases are used.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago committed by Gert Wollny
parent ffda0d35de
commit 5826b29a17
  1. 35
      src/gallium/include/pipe/p_defines.h

@ -77,22 +77,25 @@ enum pipe_error {
#define PIPE_BLEND_MIN 3 #define PIPE_BLEND_MIN 3
#define PIPE_BLEND_MAX 4 #define PIPE_BLEND_MAX 4
#define PIPE_LOGICOP_CLEAR 0
#define PIPE_LOGICOP_NOR 1 enum pipe_logicop {
#define PIPE_LOGICOP_AND_INVERTED 2 PIPE_LOGICOP_CLEAR,
#define PIPE_LOGICOP_COPY_INVERTED 3 PIPE_LOGICOP_NOR,
#define PIPE_LOGICOP_AND_REVERSE 4 PIPE_LOGICOP_AND_INVERTED,
#define PIPE_LOGICOP_INVERT 5 PIPE_LOGICOP_COPY_INVERTED,
#define PIPE_LOGICOP_XOR 6 PIPE_LOGICOP_AND_REVERSE,
#define PIPE_LOGICOP_NAND 7 PIPE_LOGICOP_INVERT,
#define PIPE_LOGICOP_AND 8 PIPE_LOGICOP_XOR,
#define PIPE_LOGICOP_EQUIV 9 PIPE_LOGICOP_NAND,
#define PIPE_LOGICOP_NOOP 10 PIPE_LOGICOP_AND,
#define PIPE_LOGICOP_OR_INVERTED 11 PIPE_LOGICOP_EQUIV,
#define PIPE_LOGICOP_COPY 12 PIPE_LOGICOP_NOOP,
#define PIPE_LOGICOP_OR_REVERSE 13 PIPE_LOGICOP_OR_INVERTED,
#define PIPE_LOGICOP_OR 14 PIPE_LOGICOP_COPY,
#define PIPE_LOGICOP_SET 15 PIPE_LOGICOP_OR_REVERSE,
PIPE_LOGICOP_OR,
PIPE_LOGICOP_SET,
};
#define PIPE_MASK_R 0x1 #define PIPE_MASK_R 0x1
#define PIPE_MASK_G 0x2 #define PIPE_MASK_G 0x2

Loading…
Cancel
Save