summaryrefslogtreecommitdiff
path: root/src/mesa/main/renderbuffer.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-20 04:47:04 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-20 04:47:04 +0000
commit8fadf8f900d4f979af50a86f98a3577946d93fd1 (patch)
tree7f5fdd0a578f881af1c846dea705d6c31c945421 /src/mesa/main/renderbuffer.c
parent14570e6d7ccf43b228d09d6fc01a45b2ba31947b (diff)
change mask[] test in put_mono_row_uint()
Diffstat (limited to 'src/mesa/main/renderbuffer.c')
-rw-r--r--src/mesa/main/renderbuffer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index c6f1171fe2..17fb6456e8 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;
}
}