summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_drawpix.c2
-rw-r--r--src/mesa/swrast/s_readpix.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 6535a8f4350..20bf4d62635 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -593,6 +593,8 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
depthRb->Format == MESA_FORMAT_Z24_S8 &&
type == GL_UNSIGNED_INT_24_8 &&
depthRb == stencilRb &&
+ depthRb->GetRow && /* May be null if depthRb is a wrapper around
+ * separate depth and stencil buffers. */
!scaleOrBias &&
!zoom &&
ctx->Depth.Mask &&
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index d120468c021..0d2e63f72bc 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -394,6 +394,8 @@ read_depth_stencil_pixels(struct gl_context *ctx,
depthRb->Format == MESA_FORMAT_Z24_S8 &&
type == GL_UNSIGNED_INT_24_8 &&
depthRb == stencilRb &&
+ depthRb->GetRow && /* May be null if depthRb is a wrapper around
+ * separate depth and stencil buffers. */
!scaleOrBias &&
!stencilTransfer) {
/* This is the ideal case.