<div dir="ltr"><div><div>This patch should go in stable<br><br></div>SHA in master is 7cc3bb2318aa22ba1e85505ff50706bdacdbbf92 <br><br></div>--Jason<br><br><div><div><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Jason Ekstrand</b> <span dir="ltr"><<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></span><br>Date: Fri, Jan 30, 2015 at 3:45 PM<br>Subject: [PATCH v2 2/2] main: Add STENCIL_INDEX formats to base_tex_format<br>To: <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>Cc: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br><br><br>This fixes a bug on BDW when our meta-based stencil blit path assert-fails<br>
due to an invalid internal format even though we do support the<br>
ARB_stencil_texturing extension.<br>
---<br>
src/mesa/main/teximage.c | 10 ++++++++++<br>
1 file changed, 10 insertions(+)<br>
<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index e067078..29c325b 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -221,6 +221,16 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )<br>
}<br>
}<br>
<br>
+ if (ctx->Extensions.ARB_stencil_texturing) {<br>
+ switch (internalFormat) {<br>
+ case GL_STENCIL_INDEX:<br>
+ case GL_STENCIL_INDEX8:<br>
+ return GL_STENCIL_INDEX;<br>
+ default:<br>
+ ; /* fallthrough */<br>
+ }<br>
+ }<br>
+<br>
switch (internalFormat) {<br>
case GL_COMPRESSED_ALPHA:<br>
return GL_ALPHA;<br>
<span class=""><font color="#888888">--<br>
2.2.2<br>
<br>
</font></span></div><br></div></div></div></div>