st/mesa: Fix blitting from GL_DEPTH_STENCIL to GL_STENCIL_INDEX
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Mar 2019 22:03:13 +0000 (15:03 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 28 Mar 2019 17:47:23 +0000 (10:47 -0700)
Fixes assertion failures in Piglit's "framebuffer-blit-levels
{draw,read} stencil" tests on iris.  Also fixes assert failures in
frameretrace, which tries to ReadPixels the stencil values (only)
from a Z24S8 depth/stencil attachment.

Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/mesa/state_tracker/st_cb_texture.c

index 2caf61e8943d985a5c72044fba065017eadf8a87..f489f8012f412d4fa84a78ff63250f5ac8d2549a 100644 (file)
@@ -794,6 +794,7 @@ st_get_blit_mask(GLenum srcFormat, GLenum dstFormat)
 
    case GL_STENCIL_INDEX:
       switch (srcFormat) {
+      case GL_DEPTH_STENCIL:
       case GL_STENCIL_INDEX:
          return PIPE_MASK_S;
       default: