<div dir="ltr"><div>It would be better to use PIPE_TEX_WRAP_CLAMP_TO_EDGE. In any case:<br><br>Reviewed-by: Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>><br><br></div>Marek<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 12:38 AM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The default wrap mode (PIPE_TEX_WRAP_REPEAT) is incompatible with<br>
unnormalized texcoords (at least for softpipe).<br>
---<br>
src/gallium/auxiliary/hud/hud_context.c | 6 ++++++<br>
1 files changed, 6 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c<br>
index b417f5d..5722df3 100644<br>
--- a/src/gallium/auxiliary/hud/hud_context.c<br>
+++ b/src/gallium/auxiliary/hud/hud_context.c<br>
@@ -1018,6 +1018,12 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)<br>
hud->font_sampler_view = pipe->create_sampler_view(pipe, hud->font.texture,<br>
&view_templ);<br>
<br>
+ /* sampler state (for font drawing) */<br>
+ hud->font_sampler_state.wrap_s = PIPE_TEX_WRAP_CLAMP;<br>
+ hud->font_sampler_state.wrap_t = PIPE_TEX_WRAP_CLAMP;<br>
+ hud->font_sampler_state.wrap_r = PIPE_TEX_WRAP_CLAMP;<br>
+ hud->font_sampler_state.normalized_coords = 0;<br>
+<br>
/* constants */<br>
hud->constbuf.buffer_size = sizeof(hud->constants);<br>
hud->constbuf.user_buffer = &hud->constants;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.3.4<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>