summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-06 18:07:26 -0700
committerBrian <[email protected]>2008-01-06 18:07:26 -0700
commit601a6b872c33bfe3cb4ea03a5a8ba5ebe92dedaf (patch)
tree96730ec79e4a8c0dcbea3bab085ed624213f41fd /src/mesa/drivers/x11
parentff73c783cc47361ff0dd819c82d067b4b85870dd (diff)
Replace gl_framebuffer's _ColorDrawBufferMask with _ColorDrawBufferIndexes
Each array element is now a BUFFER_x token rather than a BUFFER_BIT_x bitmask. The number of active color buffers is specified by _NumColorDrawBuffers. This builds on the previous DrawBuffer changes and will help with drivers implementing GL_ARB_draw_buffers.
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_line.c6
-rw-r--r--src/mesa/drivers/x11/xm_tri.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c
index 7109c439157..9833b4c9f07 100644
--- a/src/mesa/drivers/x11/xm_line.c
+++ b/src/mesa/drivers/x11/xm_line.c
@@ -587,8 +587,8 @@ get_line_func(GLcontext *ctx)
const int depth = GET_VISUAL_DEPTH(xmesa->xm_visual);
const struct xmesa_renderbuffer *xrb;
- if ((ctx->DrawBuffer->_ColorDrawBufferMask[0]
- & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) == 0)
+ if ((ctx->DrawBuffer->_ColorDrawBufferIndexes[0] != BUFFER_BIT_FRONT_LEFT) &&
+ (ctx->DrawBuffer->_ColorDrawBufferIndexes[0] != BUFFER_BIT_BACK_LEFT))
return (swrast_line_func) NULL;
if (ctx->RenderMode != GL_RENDER) return (swrast_line_func) NULL;
if (ctx->Line.SmoothFlag) return (swrast_line_func) NULL;
@@ -662,7 +662,7 @@ get_line_func(GLcontext *ctx)
#ifndef XFree86Server
if (ctx->DrawBuffer->_NumColorDrawBuffers == 1
- && ctx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT
+ && ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT
&& swrast->_RasterMask == LOGIC_OP_BIT
&& ctx->Color.LogicOp == GL_XOR
&& !ctx->Line.StippleFlag
diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c
index a3978abdd07..c87a2937567 100644
--- a/src/mesa/drivers/x11/xm_tri.c
+++ b/src/mesa/drivers/x11/xm_tri.c
@@ -1462,8 +1462,8 @@ get_triangle_func(GLcontext *ctx)
#endif
/* trivial fallback tests */
- if ((ctx->DrawBuffer->_ColorDrawBufferMask[0]
- & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) == 0)
+ if ((ctx->DrawBuffer->_ColorDrawBufferIndexes[0] != BUFFER_BIT_FRONT_LEFT) &&
+ (ctx->DrawBuffer->_ColorDrawBufferIndexes[0] != BUFFER_BIT_BACK_LEFT))
return (swrast_tri_func) NULL;
if (ctx->RenderMode != GL_RENDER)
return (swrast_tri_func) NULL;