aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/readpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/readpix.c')
-rw-r--r--mesalib/src/mesa/main/readpix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/readpix.c b/mesalib/src/mesa/main/readpix.c
index 51a0b1553..e16346896 100644
--- a/mesalib/src/mesa/main/readpix.c
+++ b/mesalib/src/mesa/main/readpix.c
@@ -45,7 +45,7 @@
* Return true if the conversion L=R+G+B is needed.
*/
static GLboolean
-need_rgb_to_luminance_conversion(gl_format texFormat, GLenum format)
+need_rgb_to_luminance_conversion(mesa_format texFormat, GLenum format)
{
GLenum baseTexFormat = _mesa_get_format_base_format(texFormat);
@@ -60,7 +60,7 @@ need_rgb_to_luminance_conversion(gl_format texFormat, GLenum format)
* Return transfer op flags for this ReadPixels operation.
*/
static GLbitfield
-get_readpixels_transfer_ops(const struct gl_context *ctx, gl_format texFormat,
+get_readpixels_transfer_ops(const struct gl_context *ctx, mesa_format texFormat,
GLenum format, GLenum type, GLboolean uses_blit)
{
GLbitfield transferOps = ctx->_ImageTransferState;
@@ -424,13 +424,13 @@ read_rgba_pixels_swizzle(struct gl_context *ctx,
GLboolean swizzle_rb = GL_FALSE, copy_xrgb = GL_FALSE;
/* XXX we could check for other swizzle/special cases here as needed */
- if (rb->Format == MESA_FORMAT_RGBA8888_REV &&
+ if (rb->Format == MESA_FORMAT_R8G8B8A8_UNORM &&
format == GL_BGRA &&
type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!ctx->Pack.SwapBytes) {
swizzle_rb = GL_TRUE;
}
- else if (rb->Format == MESA_FORMAT_XRGB8888 &&
+ else if (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM &&
format == GL_BGRA &&
type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!ctx->Pack.SwapBytes) {
@@ -493,7 +493,7 @@ slow_read_rgba_pixels( struct gl_context *ctx,
GLbitfield transferOps )
{
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
- const gl_format rbFormat = _mesa_get_srgb_format_linear(rb->Format);
+ const mesa_format rbFormat = _mesa_get_srgb_format_linear(rb->Format);
void *rgba;
GLubyte *dst, *map;
int dstStride, stride, j;
@@ -594,8 +594,8 @@ fast_read_depth_stencil_pixels(struct gl_context *ctx,
if (rb != stencilRb)
return GL_FALSE;
- if (rb->Format != MESA_FORMAT_Z24_S8 &&
- rb->Format != MESA_FORMAT_S8_Z24)
+ if (rb->Format != MESA_FORMAT_S8_UINT_Z24_UNORM &&
+ rb->Format != MESA_FORMAT_Z24_UNORM_X8_UINT)
return GL_FALSE;
ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,