summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 3aa4b03159a..398587ac4b1 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -50,6 +50,7 @@
#include "pipe/p_inlines.h"
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_simple_shaders.h"
#include "util/u_draw_quad.h"
@@ -228,13 +229,13 @@ clear_with_quad(GLcontext *ctx,
blend.rgb_dst_factor = PIPE_BLENDFACTOR_ZERO;
blend.alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
if (color) {
- if (ctx->Color.ColorMask[0])
+ if (ctx->Color.ColorMask[0][0])
blend.colormask |= PIPE_MASK_R;
- if (ctx->Color.ColorMask[1])
+ if (ctx->Color.ColorMask[0][1])
blend.colormask |= PIPE_MASK_G;
- if (ctx->Color.ColorMask[2])
+ if (ctx->Color.ColorMask[0][2])
blend.colormask |= PIPE_MASK_B;
- if (ctx->Color.ColorMask[3])
+ if (ctx->Color.ColorMask[0][3])
blend.colormask |= PIPE_MASK_A;
if (st->ctx->Color.DitherFlag)
blend.dither = 1;
@@ -296,10 +297,10 @@ check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
ctx->Scissor.Height < rb->Height))
return TRUE;
- if (!ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3])
+ if (!ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3])
return TRUE;
return FALSE;
@@ -338,7 +339,7 @@ static INLINE GLboolean
check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
{
const struct st_renderbuffer *strb = st_renderbuffer(rb);
- const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
+ const GLboolean isDS = util_format_is_depth_and_stencil(strb->surface->format);
if (ctx->Scissor.Enabled &&
(ctx->Scissor.X != 0 ||
@@ -362,7 +363,7 @@ static INLINE GLboolean
check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
{
const struct st_renderbuffer *strb = st_renderbuffer(rb);
- const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
+ const GLboolean isDS = util_format_is_depth_and_stencil(strb->surface->format);
const GLuint stencilMax = 0xff;
const GLboolean maskStencil
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;