summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 1e739434577..97713076dd5 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -448,24 +448,22 @@ intel_map_unmap_framebuffer(struct intel_context *intel,
struct gl_framebuffer *fb,
GLboolean map)
{
- GLcontext *ctx = &intel->ctx;
GLuint i, j;
- /* color buffers */
- if (fb == ctx->DrawBuffer) {
- for (j = 0; j < fb->_NumColorDrawBuffers; j++) {
- if (map)
- intel_renderbuffer_map(intel, fb->_ColorDrawBuffers[j]);
- else
- intel_renderbuffer_unmap(intel, fb->_ColorDrawBuffers[j]);
- }
- } else {
+ /* color draw buffers */
+ for (j = 0; j < fb->_NumColorDrawBuffers; j++) {
if (map)
- intel_renderbuffer_map(intel, fb->_ColorReadBuffer);
+ intel_renderbuffer_map(intel, fb->_ColorDrawBuffers[j]);
else
- intel_renderbuffer_unmap(intel, fb->_ColorReadBuffer);
+ intel_renderbuffer_unmap(intel, fb->_ColorDrawBuffers[j]);
}
+ /* color read buffer */
+ if (map)
+ intel_renderbuffer_map(intel, fb->_ColorReadBuffer);
+ else
+ intel_renderbuffer_unmap(intel, fb->_ColorReadBuffer);
+
/* check for render to textures */
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att =
@@ -524,7 +522,8 @@ intelSpanRenderStart(GLcontext * ctx)
}
intel_map_unmap_framebuffer(intel, ctx->DrawBuffer, GL_TRUE);
- intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_TRUE);
+ if (ctx->ReadBuffer != ctx->DrawBuffer)
+ intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_TRUE);
}
/**
@@ -547,7 +546,8 @@ intelSpanRenderFinish(GLcontext * ctx)
}
intel_map_unmap_framebuffer(intel, ctx->DrawBuffer, GL_FALSE);
- intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_FALSE);
+ if (ctx->ReadBuffer != ctx->DrawBuffer)
+ intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_FALSE);
UNLOCK_HARDWARE(intel);
}