diff options
author | Marek Olšák <[email protected]> | 2013-03-14 15:20:27 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-03-23 13:17:05 +0100 |
commit | d702c67ba51f55c04be670c0ac618b687f7d2127 (patch) | |
tree | afe9d63089fec62b709f5df02684e2a1a7bae15f /src/mesa/main/framebuffer.c | |
parent | f8855a42141cc76cf6954eee2af80e7dbc932c85 (diff) |
mesa: add common format-independent memcpy-based ReadPixels path
I'll need the _mesa_readpixels_needs_slow_path function for the blit-based
version, but it's also useful to have this memcpy-based path in one place
and not scattered across several functions.
v2: add "const" to function parameters
Reviewed-by: Brian Paul <[email protected]>
Tested-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r-- | src/mesa/main/framebuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index d3abc2b30b1..619aaa33754 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -923,10 +923,10 @@ _mesa_get_color_read_type(struct gl_context *ctx) * Returns the read renderbuffer for the specified format. */ struct gl_renderbuffer * -_mesa_get_read_renderbuffer_for_format(struct gl_context *ctx, +_mesa_get_read_renderbuffer_for_format(const struct gl_context *ctx, GLenum format) { - struct gl_framebuffer *rfb = ctx->ReadBuffer; + const struct gl_framebuffer *rfb = ctx->ReadBuffer; if (_mesa_is_color_format(format)) { return rfb->Attachment[rfb->_ColorReadBufferIndex].Renderbuffer; |