summaryrefslogtreecommitdiff
path: root/src/mesa/main/readpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/readpix.c')
-rw-r--r--src/mesa/main/readpix.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 882d863c1c..319d8c45e3 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -289,6 +289,20 @@ read_uint_depth_pixels( struct gl_context *ctx,
dst = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
GL_DEPTH_COMPONENT, type, 0, 0);
+ if (MESA_VERBOSE & VERBOSE_DUMPBUFFERS) {
+ GLsizei i, my_width;
+ const GLuint *s = ((const GLuint *) map);
+
+ printf("\n%s:\n\n", __FUNCTION__);
+ my_width = (width > 16 ? 16 : width);
+ for (i = 0; i < my_width; i++) {
+ printf("0x%08x ", s[i]);
+ if ((i+1) % 4 == 0)
+ printf("\n");
+ }
+ printf("\n");
+ }
+
for (j = 0; j < height; j++) {
_mesa_unpack_uint_z_row(rb->Format, width, map, (GLuint *)dst);
@@ -345,6 +359,19 @@ read_depth_pixels( struct gl_context *ctx,
depthValues = malloc(width * sizeof(GLfloat));
if (depthValues) {
+ if (MESA_VERBOSE & VERBOSE_DUMPBUFFERS) {
+ GLsizei i, my_width;
+ const GLuint *s = ((const GLuint *) map);
+
+ printf("\n%s:\n\n", __FUNCTION__);
+ my_width = (width > 16 ? 16 : width);
+ for (i = 0; i < my_width; i++) {
+ printf("0x%08x ", s[i]);
+ if ((i+1) % 4 == 0)
+ printf("\n");
+ }
+ printf("\n");
+ }
/* General case (slower) */
for (j = 0; j < height; j++, y++) {
_mesa_unpack_float_z_row(rb->Format, width, map, depthValues);
@@ -652,6 +679,20 @@ fast_read_depth_stencil_pixels(struct gl_context *ctx,
return GL_TRUE; /* don't bother trying the slow path */
}
+ if (MESA_VERBOSE & VERBOSE_DUMPBUFFERS) {
+ GLsizei j, my_width;
+ const GLuint *s = ((const GLuint *) map);
+
+ printf("\n%s:\n\n", __FUNCTION__);
+ my_width = (width > 16 ? 16 : width);
+ for (j = 0; j < my_width; j++) {
+ printf("0x%08x ", s[j]);
+ if ((j+1) % 4 == 0)
+ printf("\n");
+ }
+ printf("\n");
+ }
+
for (i = 0; i < height; i++) {
_mesa_unpack_uint_24_8_depth_stencil_row(rb->Format, width,
map, (GLuint *)dst);