[Mesa-dev] [PATCH] intel: fix mapping of malloc'd renderbuffers

Eric Anholt eric at anholt.net
Sat Jan 7 22:37:50 PST 2012


On Sat,  7 Jan 2012 15:08:19 -0700, Brian Paul <brianp at vmware.com> wrote:
> This fixes accum buffer operations.  The accumulation buffer is the
> only malloc-based renderbuffer for the intel drivers.
> ---
>  src/mesa/drivers/dri/intel/intel_fbo.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> index b95193d..8cb6c2a 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -132,6 +132,13 @@ intel_map_renderbuffer(struct gl_context *ctx,
>     void *map;
>     int stride;
>  
> +   if (!irb && rb->Data) {
> +      /* this is a malloc'd renderbuffer (accum buffer) */
> +      *out_map = rb->Data;
> +      *out_stride = rb->RowStride * _mesa_get_format_bytes(rb->Format);
> +      return;
> +   }

Missing x/y handling, right?  I think I'd rather that we just allocate a
hardware renderbuffer -- shouldn't be hard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120107/996f9b95/attachment.pgp>


More information about the mesa-dev mailing list