----- Original Message ----- > On 12/05/2011 09:27 AM, Jose Fonseca wrote: > > ----- Original Message ----- > >> Implemented in terms of renderbuffer mapping/unmapping and format > >> packing/unpacking functions. > >> > >> The swrast and state tracker code for implementing accumulation > >> are > >> unused and will be removed in the next commit. > >> > >> v2: don't use memcpy() in _mesa_clear_accum_buffer() > >> --- > >> src/mesa/SConscript | 2 - > >> src/mesa/drivers/common/driverfuncs.c | 3 +- > >> src/mesa/drivers/dri/intel/intel_pixel.c | 2 +- > >> src/mesa/main/accum.c | 364 > >> +++++++++++++++++++++++++++++- > >> src/mesa/main/accum.h | 18 ++ > >> src/mesa/sources.mak | 2 - > >> src/mesa/state_tracker/st_cb_clear.c | 5 +- > >> src/mesa/state_tracker/st_cb_fbo.c | 21 ++ > >> src/mesa/state_tracker/st_context.c | 5 +- > >> src/mesa/swrast/s_clear.c | 5 +- > >> 10 files changed, 412 insertions(+), 15 deletions(-) > >> > > [...] > >> + > >> + /* bounds, with scissor */ > >> + x = ctx->DrawBuffer->_Xmin; > >> + y = ctx->DrawBuffer->_Ymin; > >> + width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; > >> + height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; > >> + > >> + ctx->Driver.MapRenderbuffer(ctx, accRb, x, y, width, height, > >> + GL_MAP_READ_BIT | > >> GL_MAP_WRITE_BIT, > >> +&accMap,&accRowStride); > > > > I suppose that GL_MAP_READ_BIT could be skipped when scissor is not > > set, but the fact that nobody bothered with writing a hardware > > accelerated version of this till date means it doesn't really > > matter in practice. > > I think that was probably a copy&paste bug. I intended MAP_WRITE > there (regardless of scissor). Though, it won't really make any > difference in practice.
Ah yes. As you're only mapping the rectangle you're writing. Jose _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev