diff options
author | Marek Olšák <[email protected]> | 2018-01-31 03:03:25 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-04 01:50:10 +0100 |
commit | af3685d14936844f79e6f372b4b258e29375f21b (patch) | |
tree | 84c3ab4b661bceaf4364be3e7c9501cb6b50537e /src/mesa/main/attrib.c | |
parent | 83e60ce927142752c57163fcb8b30eca2370d014 (diff) |
mesa: change ctx->Color.ColorMask into a 32-bit bitmask
4 bits per draw buffer, 8 draw buffers in total --> 32 bits.
This is easier to work with.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r-- | src/mesa/main/attrib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 0b4b63f712f..a9e4a11d7d7 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -967,19 +967,19 @@ _mesa_PopAttrib(void) color->ClearColor.f[3]); _mesa_IndexMask(color->IndexMask); if (!ctx->Extensions.EXT_draw_buffers2) { - _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0), - (GLboolean) (color->ColorMask[0][1] != 0), - (GLboolean) (color->ColorMask[0][2] != 0), - (GLboolean) (color->ColorMask[0][3] != 0)); + _mesa_ColorMask(GET_COLORMASK_BIT(color->ColorMask, 0, 0), + GET_COLORMASK_BIT(color->ColorMask, 0, 1), + GET_COLORMASK_BIT(color->ColorMask, 0, 2), + GET_COLORMASK_BIT(color->ColorMask, 0, 3)); } else { GLuint i; for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { _mesa_ColorMaski(i, - (GLboolean) (color->ColorMask[i][0] != 0), - (GLboolean) (color->ColorMask[i][1] != 0), - (GLboolean) (color->ColorMask[i][2] != 0), - (GLboolean) (color->ColorMask[i][3] != 0)); + GET_COLORMASK_BIT(color->ColorMask, i, 0), + GET_COLORMASK_BIT(color->ColorMask, i, 1), + GET_COLORMASK_BIT(color->ColorMask, i, 2), + GET_COLORMASK_BIT(color->ColorMask, i, 3)); } } { |