void radeonReadPixels(struct gl_context * ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *pack, GLvoid * pixels) { radeonContextPtr radeon = RADEON_CONTEXT(ctx); radeon_prepare_render(radeon); if (do_blit_readpixels(ctx, x, y, width, height, format, type, pack, pixels)) return; /* Update Mesa state before calling down into _swrast_ReadPixels, as * the spans code requires the computed buffer states to be up to date, * but _swrast_ReadPixels only updates Mesa state after setting up * the spans code. */ radeon_print(RADEON_FALLBACKS, RADEON_NORMAL, "Falling back to sw for ReadPixels (format %s, type %s)\n", _mesa_lookup_enum_by_nr(format), _mesa_lookup_enum_by_nr(type)); if (ctx->NewState) _mesa_update_state(ctx); _swrast_ReadPixels(ctx, x, y, width, height, format, type, pack, pixels); }
void intelReadPixels(GLcontext * ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *pack, GLvoid * pixels) { if (INTEL_DEBUG & DEBUG_PIXEL) fprintf(stderr, "%s\n", __FUNCTION__); intelFlush(ctx); intel_prepare_render(intel_context(ctx)); if (do_blit_readpixels (ctx, x, y, width, height, format, type, pack, pixels)) return; if (INTEL_DEBUG & DEBUG_PIXEL) printf("%s: fallback to swrast\n", __FUNCTION__); /* Update Mesa state before calling down into _swrast_ReadPixels, as * the spans code requires the computed buffer states to be up to date, * but _swrast_ReadPixels only updates Mesa state after setting up * the spans code. */ if (ctx->NewState) _mesa_update_state(ctx); _swrast_ReadPixels(ctx, x, y, width, height, format, type, pack, pixels); }
static void mgaDDReadPixels( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *pack, GLvoid *pixels ) { if (!mgaTryReadPixels( ctx, x, y, width, height, format, type, pack, pixels)) _swrast_ReadPixels( ctx, x, y, width, height, format, type, pack, pixels); }
static void r200ReadPixels( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *pack, GLvoid *pixels ) { if (R200_DEBUG & DEBUG_PIXEL) fprintf(stderr, "%s\n", __FUNCTION__); if (!r200TryReadPixels( ctx, x, y, width, height, format, type, pack, pixels)) _swrast_ReadPixels( ctx, x, y, width, height, format, type, pack, pixels); }