diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index d1c2232..61d6c1f 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1522,6 +1522,8 @@ _mesa_meta_draw_pixels(GLcontext *ctx, } else if (_mesa_is_stencil_format(format)) { if (ctx->Extensions.ARB_fragment_program && + ctx->Pixel.IndexShift == 0 && + ctx->Pixel.IndexOffset == 0 && type == GL_UNSIGNED_BYTE) { /* We'll store stencil as alpha. This only works for GLubyte * image data because of how incoming values are mapped to alpha