mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 12:00:12 +01:00
mesa: Reverse s8z24 into z24s8 as required by EXT_packed_depth_stencil.
Actually, after spotting this problem, I realized this is unreachable code. However don't bother to enable this fast path now, given the normal path is working just fine.
This commit is contained in:
parent
8fa8669aeb
commit
337f559cd2
1 changed files with 7 additions and 2 deletions
|
|
@ -445,11 +445,16 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* untested, but simple: */
|
||||
/* XXX: unreachable code -- should be before st_read_stencil_pixels */
|
||||
assert(format == GL_DEPTH_STENCIL_EXT);
|
||||
for (i = 0; i < height; i++) {
|
||||
GLuint *zshort = (GLuint *)dst;
|
||||
pipe_get_tile_raw(trans, 0, y, width, 1, dst, 0);
|
||||
y += yStep;
|
||||
/* Reverse into 24/8 */
|
||||
for (j = 0; j < width; j++) {
|
||||
zshort[j] = (zshort[j] << 8) | (zshort[j] >> 24);
|
||||
}
|
||||
dst += dstStride;
|
||||
}
|
||||
}
|
||||
|
|
@ -472,7 +477,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* untested, but simple: */
|
||||
/* XXX: unreachable code -- should be before st_read_stencil_pixels */
|
||||
assert(format == GL_DEPTH_STENCIL_EXT);
|
||||
for (i = 0; i < height; i++) {
|
||||
pipe_get_tile_raw(trans, 0, y, width, 1, dst, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue