<div dir="ltr"><div>Have you checked the font is rendered correctly? The font should be transparent and the blend function reads the alpha channel to determine the transparency, so A8 would be a better option. If that isn't an option either, the fragment shader should do .xxxx swizzling.<br>

</div><div></div><div></div><div><br></div>Marek<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 2, 2013 at 12:46 AM, Brian Paul <span dir="ltr"><<a href="mailto:brian.e.paul@gmail.com" target="_blank">brian.e.paul@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>><br>
<br>
---<br>
 src/gallium/auxiliary/hud/font.c |   17 +++++++++++++----<br>
 1 file changed, 13 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/hud/font.c b/src/gallium/auxiliary/hud/font.c<br>
index 5c4a4d0..6747874 100644<br>
--- a/src/gallium/auxiliary/hud/font.c<br>
+++ b/src/gallium/auxiliary/hud/font.c<br>
@@ -377,17 +377,26 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,<br>
    struct pipe_resource tex_templ, *tex;<br>
    struct pipe_transfer *transfer = NULL;<br>
    char *map;<br>
+   enum pipe_format tex_format;<br>
    int i;<br>
<br>
-   if (!screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,<br>
-                                    PIPE_TEXTURE_RECT, 0,<br>
-                                    PIPE_BIND_SAMPLER_VIEW)) {<br>
+   if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,<br>
+                                   PIPE_TEXTURE_RECT, 0,<br>
+                                   PIPE_BIND_SAMPLER_VIEW)) {<br>
+      tex_format = PIPE_FORMAT_I8_UNORM;<br>
+   }<br>
+   else if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM,<br>
+                                   PIPE_TEXTURE_RECT, 0,<br>
+                                   PIPE_BIND_SAMPLER_VIEW)) {<br>
+      tex_format = PIPE_FORMAT_L8_UNORM;<br>
+   }<br>
+   else {<br>
       return FALSE;<br>
    }<br>
<br>
    memset(&tex_templ, 0, sizeof(tex_templ));<br>
    tex_templ.target = PIPE_TEXTURE_RECT;<br>
-   tex_templ.format = PIPE_FORMAT_I8_UNORM;<br>
+   tex_templ.format = tex_format;<br>
    tex_templ.width0 = 128;<br>
    tex_templ.height0 = 256;<br>
    tex_templ.depth0 = 1;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>