projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix copypixels overlap test bug (#12417)
[mesa.git]
/
src
/
mesa
/
swrast
/
s_readpix.c
diff --git
a/src/mesa/swrast/s_readpix.c
b/src/mesa/swrast/s_readpix.c
index 15dc8106b4a9f3ecc08e7eda60b54addcdf2d29b..fe9a70f4eae03932dc91a58be33e373c479c8f37 100644
(file)
--- a/
src/mesa/swrast/s_readpix.c
+++ b/
src/mesa/swrast/s_readpix.c
@@
-119,7
+119,7
@@
read_depth_pixels( GLcontext *ctx,
&& !biasOrScale && !packing->SwapBytes) {
/* Special case: directly read 24-bit unsigned depth values. */
GLint j;
&& !biasOrScale && !packing->SwapBytes) {
/* Special case: directly read 24-bit unsigned depth values. */
GLint j;
- ASSERT(rb->InternalFormat == GL_DEPTH_COMPONENT
32
);
+ ASSERT(rb->InternalFormat == GL_DEPTH_COMPONENT
24
);
ASSERT(rb->DataType == GL_UNSIGNED_INT);
for (j = 0; j < height; j++, y++) {
GLuint *dest = (GLuint *)
ASSERT(rb->DataType == GL_UNSIGNED_INT);
for (j = 0; j < height; j++, y++) {
GLuint *dest = (GLuint *)
@@
-404,12
+404,16
@@
read_rgba_pixels( GLcontext *ctx,
/* no convolution */
const GLint dstStride
= _mesa_image_row_stride(packing, width, format, type);
/* no convolution */
const GLint dstStride
= _mesa_image_row_stride(packing, width, format, type);
- GLfloat (*rgba)[4] = swrast->SpanArrays->
color.sz4.rgba
;
+ GLfloat (*rgba)[4] = swrast->SpanArrays->
attribs[FRAG_ATTRIB_COL0]
;
GLint row;
GLubyte *dst
= (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
format, type, 0, 0);
GLint row;
GLubyte *dst
= (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
format, type, 0, 0);
+ /* make sure we don't apply 1D convolution */
+ transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+ IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+
for (row = 0; row < height; row++, y++) {
/* Get float rgba pixels */
for (row = 0; row < height; row++, y++) {
/* Get float rgba pixels */