summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/relnotes-7.6.1.html1
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c7
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c9
-rw-r--r--src/mesa/main/renderbuffer.c2
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c7
6 files changed, 26 insertions, 10 deletions
diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html
index 52a4728133..47a906f1f4 100644
--- a/docs/relnotes-7.6.1.html
+++ b/docs/relnotes-7.6.1.html
@@ -43,6 +43,7 @@ tbd
<li>Fixed default texture binding bug when a bound texture was deleted.
<li>r300: Work around an issue with very large fragment programs on R500.
<li>Fake glXQueryDrawable() didn't return good values (bug 24320)
+<li>Fixed AUX buffer breakage (bug 24426).
</ul>
</body>
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 83fb4e0d15..65872cecc4 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -97,7 +97,12 @@ sp_create_tile_cache( struct pipe_screen *screen )
}
tc->last_tile = &tc->entries[0]; /* any tile */
-#if TILE_CLEAR_OPTIMIZATION
+ /* XXX this code prevents valgrind warnings about use of uninitialized
+ * memory in programs that don't clear the surface before rendering.
+ * However, it breaks clearing in other situations (such as in
+ * progs/tests/drawbuffers, see bug 24402).
+ */
+#if 0 && TILE_CLEAR_OPTIMIZATION
/* set flags to indicate all the tiles are cleared */
memset(tc->clear_flags, 255, sizeof(tc->clear_flags));
#endif
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 7e8b48f91e..3d3c8b958f 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -1295,11 +1295,15 @@ void r700SetScissor(context_t *context) //---------------
return;
}
if (context->radeon.state.scissor.enabled) {
- /* r600 has exclusive scissors */
x1 = context->radeon.state.scissor.rect.x1;
y1 = context->radeon.state.scissor.rect.y1;
- x2 = context->radeon.state.scissor.rect.x2 + 1;
- y2 = context->radeon.state.scissor.rect.y2 + 1;
+ x2 = context->radeon.state.scissor.rect.x2;
+ y2 = context->radeon.state.scissor.rect.y2;
+ /* r600 has exclusive BR scissors */
+ if (context->radeon.radeonScreen->kernel_mm) {
+ x2++;
+ y2++;
+ }
} else {
if (context->radeon.radeonScreen->driScreen->dri2.enabled) {
x1 = 0;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index f8a4cdb495..097ab7cf61 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -229,16 +229,15 @@ void radeonUpdateScissor( GLcontext *ctx )
}
if (!rmesa->radeonScreen->kernel_mm) {
/* Fix scissors for dri 1 */
-
__DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa);
x1 += dPriv->x;
- x2 += dPriv->x;
+ x2 += dPriv->x + 1;
min_x += dPriv->x;
- max_x += dPriv->x;
+ max_x += dPriv->x + 1;
y1 += dPriv->y;
- y2 += dPriv->y;
+ y2 += dPriv->y + 1;
min_y += dPriv->y;
- max_y += dPriv->y;
+ max_y += dPriv->y + 1;
}
rmesa->state.scissor.rect.x1 = CLAMP(x1, min_x, max_x);
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 38be8266e0..5bef7c84fb 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1955,7 +1955,7 @@ _mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
return GL_FALSE;
}
- assert(numBuffers < MAX_AUX_BUFFERS);
+ assert(numBuffers <= MAX_AUX_BUFFERS);
for (i = 0; i < numBuffers; i++) {
struct gl_renderbuffer *rb = _mesa_new_renderbuffer(ctx, 0);
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 5c0d335d62..a5d1ae3b03 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -52,6 +52,7 @@ st_create_framebuffer( const __GLcontextModes *visual,
struct st_framebuffer *stfb = ST_CALLOC_STRUCT(st_framebuffer);
if (stfb) {
int samples = st_get_msaa();
+ int i;
if (visual->sampleBuffers)
samples = visual->samples;
@@ -119,6 +120,12 @@ st_create_framebuffer( const __GLcontextModes *visual,
_mesa_add_renderbuffer(&stfb->Base, BUFFER_ACCUM, accumRb);
}
+ for (i = 0; i < visual->numAuxBuffers; i++) {
+ struct gl_renderbuffer *aux
+ = st_new_renderbuffer_fb(colorFormat, 0, FALSE);
+ _mesa_add_renderbuffer(&stfb->Base, BUFFER_AUX0 + i, aux);
+ }
+
stfb->Base.Initialized = GL_TRUE;
stfb->InitWidth = width;
stfb->InitHeight = height;