Add MapRenderbuffer implementations for software drivers.
Mesa core's is generic for things like osmesa. For swrast_dri.so, we have to do Y flipping. The front-buffer path isn't actually tested, though, because both before and after it fails with a BadMatch in XGetImage. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -1716,6 +1716,33 @@ _mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_map_soft_renderbuffer(struct gl_context *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint x, GLuint y, GLuint w, GLuint h,
|
||||
GLbitfield mode,
|
||||
GLubyte **out_map,
|
||||
GLint *out_stride)
|
||||
{
|
||||
GLubyte *map = rb->Data;
|
||||
int cpp = _mesa_get_format_bytes(rb->Format);
|
||||
int stride = rb->RowStride * cpp;
|
||||
|
||||
ASSERT(rb->Data);
|
||||
|
||||
map += y * stride;
|
||||
map += x * cpp;
|
||||
|
||||
*out_map = map;
|
||||
*out_stride = stride;
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_unmap_soft_renderbuffer(struct gl_context *ctx,
|
||||
struct gl_renderbuffer *rb)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
/**********************************************************************/
|
||||
|
Reference in New Issue
Block a user