swrast: Rename blend_func->swrast_blend_func
[mesa.git] / src / mesa / swrast / s_renderbuffer.c
index 66a823def32ae47ad8e288be03399d66c5b283fb..8c97e4e11b480fd83a249254a8ea1a0a074e5866 100644 (file)
@@ -180,7 +180,8 @@ _swrast_map_soft_renderbuffer(struct gl_context *ctx,
                               GLuint x, GLuint y, GLuint w, GLuint h,
                               GLbitfield mode,
                               GLubyte **out_map,
-                              GLint *out_stride)
+                              GLint *out_stride,
+                              bool flip_y)
 {
    struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
    GLubyte *map = srb->Buffer;
@@ -578,7 +579,8 @@ map_attachment(struct gl_context *ctx,
       ctx->Driver.MapRenderbuffer(ctx, rb,
                                   0, 0, rb->Width, rb->Height,
                                   GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
-                                  &srb->Map, &srb->RowStride);
+                                  &srb->Map, &srb->RowStride,
+                                  fb->FlipY);
    }
 
    assert(srb->Map);
@@ -659,7 +661,7 @@ _swrast_map_renderbuffers(struct gl_context *ctx)
    }
 
    for (buf = 0; buf < fb->_NumColorDrawBuffers; buf++) {
-      if (fb->_ColorDrawBufferIndexes[buf] >= 0) {
+      if (fb->_ColorDrawBufferIndexes[buf] != BUFFER_NONE) {
          map_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]);
          find_renderbuffer_colortype(fb->_ColorDrawBuffers[buf]);
       }
@@ -690,7 +692,7 @@ _swrast_unmap_renderbuffers(struct gl_context *ctx)
    }
 
    for (buf = 0; buf < fb->_NumColorDrawBuffers; buf++) {
-      if (fb->_ColorDrawBufferIndexes[buf] >= 0) {
+      if (fb->_ColorDrawBufferIndexes[buf] != BUFFER_NONE) {
          unmap_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]);
       }
    }