On Sun, 12 Jun 2011 22:36:04 -0700, Chad Versace <c...@chad-versace.us> wrote: > On Tue, 7 Jun 2011 11:47:14 -0700, Eric Anholt <e...@anholt.net> wrote: > > We were mapping the renderbuffer once, then walking over all the > > buffers to map just the texture ones using the other texture mapping > > function that handled the x/y offset to the image in the region. But > > then we would go and overwrite *those* mappings with the original > > mappings for depth/stencil, which was wrong. > > > > Instead, just walk over the attachments once and map the attachments. > > Wasn't that easy? > > --- > > src/mesa/drivers/dri/intel/intel_span.c | 87 > > ++++++++---------------------- > > 1 files changed, 23 insertions(+), 64 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/intel/intel_span.c > > b/src/mesa/drivers/dri/intel/intel_span.c > > index 8978129..92a7586 100644 > > --- a/src/mesa/drivers/dri/intel/intel_span.c > > +++ b/src/mesa/drivers/dri/intel/intel_span.c > > @@ -239,9 +200,8 @@ intelSpanRenderStart(struct gl_context * ctx) > > } > > } > > > > - intel_map_unmap_framebuffer(intel, ctx->DrawBuffer, GL_TRUE); > > - if (ctx->ReadBuffer != ctx->DrawBuffer) > > - intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_TRUE); > > + intel_framebuffer_map(intel, ctx->DrawBuffer); > > + intel_framebuffer_map(intel, ctx->ReadBuffer); > > } > > I think this hunk should be: > > @@ -239,9 +200,8 @@ intelSpanRenderStart(struct gl_context * ctx) > } > } > > - intel_map_unmap_framebuffer(intel, ctx->DrawBuffer, GL_TRUE); > + intel_framebuffer_map(intel, ctx->DrawBuffer); > - if (ctx->ReadBuffer != ctx->DrawBuffer) > - intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_TRUE); > + intel_framebuffer_map(intel, ctx->ReadBuffer); > } > > There's no reason to re-map the read buffer if we've already done so.
Nice catch. I like it.
pgpiqv8zYwg5D.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev