From: Brian Paul Date: Tue, 20 Sep 2005 04:47:04 +0000 (+0000) Subject: change mask[] test in put_mono_row_uint() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8fadf8f900d4f979af50a86f98a3577946d93fd1;p=mesa.git change mask[] test in put_mono_row_uint() --- diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index c6f1171fe24..17fb6456e85 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -373,10 +373,18 @@ put_mono_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const GLuint val = *((const GLuint *) value); GLuint *dst = (GLuint *) rb->Data + y * rb->Width + x; - GLuint i; ASSERT(rb->DataType == GL_UNSIGNED_INT); - for (i = 0; i < count; i++) { - if (!mask || mask[i]) { + if (mask) { + GLuint i; + for (i = 0; i < count; i++) { + if (mask[i]) { + dst[i] = val; + } + } + } + else { + GLuint i; + for (i = 0; i < count; i++) { dst[i] = val; } }