diff options
author | marha <marha@users.sourceforge.net> | 2011-12-12 14:26:41 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-12 14:26:41 +0100 |
commit | 2b5652fc7742c5ac57aca701214b046626a729e9 (patch) | |
tree | a994b9e63a32a7c061bcfb563aa22369c217e49c /mesalib/src/mesa/state_tracker/st_cb_fbo.c | |
parent | 2331d6e4ac699e775ccee07a8a461cae0a98033a (diff) | |
parent | 5efb0a5e19b75137b7294b27f4e7878aeb8f0927 (diff) | |
download | vcxsrv-2b5652fc7742c5ac57aca701214b046626a729e9.tar.gz vcxsrv-2b5652fc7742c5ac57aca701214b046626a729e9.tar.bz2 vcxsrv-2b5652fc7742c5ac57aca701214b046626a729e9.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_fbo.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index 2a60ed4df..ec40a2b70 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -667,6 +667,22 @@ st_MapRenderbuffer(struct gl_context *ctx, unsigned usage; GLuint y2; + if (strb->software) { + /* software-allocated renderbuffer (probably an accum buffer) */ + GLubyte *map = (GLubyte *) strb->data; + if (strb->data) { + map += strb->stride * y; + map += util_format_get_blocksize(strb->format) * x; + *mapOut = map; + *rowStrideOut = strb->stride; + } + else { + *mapOut = NULL; + *rowStrideOut = 0; + } + return; + } + usage = 0x0; if (mode & GL_MAP_READ_BIT) usage |= PIPE_TRANSFER_READ; @@ -716,6 +732,11 @@ st_UnmapRenderbuffer(struct gl_context *ctx, struct st_renderbuffer *strb = st_renderbuffer(rb); struct pipe_context *pipe = st->pipe; + if (strb->software) { + /* software-allocated renderbuffer (probably an accum buffer) */ + return; + } + pipe_transfer_unmap(pipe, strb->transfer); pipe->transfer_destroy(pipe, strb->transfer); strb->transfer = NULL; |