From: Chad Versace Date: Wed, 22 Jun 2011 04:42:48 +0000 (-0700) Subject: intel: Perform gather on s8z24 texture images during glGetTexImage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=951b75808eeac5fb97183ea8e653512bfa35fdb2;p=mesa.git intel: Perform gather on s8z24 texture images during glGetTexImage Signed-off-by: Chad Versace --- diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 606523828b2..4a29bc5ac6b 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -659,6 +659,14 @@ intel_get_tex_image(struct gl_context * ctx, GLenum target, GLint level, assert(intelImage->base.Data); } + if (intelImage->stencil_rb) { + /* + * The texture has packed depth/stencil format, but uses separate + * stencil. The texture's embedded stencil buffer contains the real + * stencil data, so copy that into the miptree. + */ + intel_tex_image_s8z24_gather(intel, intelImage); + } if (compressed) { _mesa_get_compressed_teximage(ctx, target, level, pixels,