<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 3:39 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Mar 21, 2016 at 5:05 AM, Samuel Iglesias Gonsálvez <span dir="ltr"><<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Iago Toral Quiroga <<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>><br>
<br>
v2 (Sam):<br>
- Use helper to get type size from nir_alu_type enum.<br>
---<br>
src/compiler/nir/nir_lower_tex.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c<br>
index 4999603..a58385a 100644<br>
--- a/src/compiler/nir/nir_lower_tex.c<br>
+++ b/src/compiler/nir/nir_lower_tex.c<br>
@@ -226,7 +226,8 @@ get_zero_or_one(nir_builder *b, nir_alu_type type, uint8_t swizzle_val)<br>
v.u32[0] = v.u32[1] = v.u32[2] = v.u32[3] = 0;<br>
} else {<br>
assert(swizzle_val == 5);<br>
- if (type == nir_type_float)<br>
+ assert(nir_alu_type_get_type_size(type) < 64);<br>
+ if (type == nir_type_float32)<br></blockquote><div><br></div></span><div>This seems dangerious. It switches a check from checking for float to checking for float32. At the particular point in the git history where this patch lands, one of these checks is broken. I'm guessing this actually breaks things that get fixed later when we switch glsl_to_nir to giving us sized types.<br><br>If we're going to change tex instructions to use sized types, we need to do it all in one big patch and it will have to touch all three drivers again.<br></div></div></div></div></blockquote><div><br></div><div>One more thought: Tex instructions already have a bit size provided by the destination so I don't see a need for having it be sized at all. At the end of the day it doesn't matter since we either don't have a size or we do have a size and it's required to match.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
v.f32[0] = v.f32[1] = v.f32[2] = v.f32[3] = 1.0;<br>
else<br>
v.u32[0] = v.u32[1] = v.u32[2] = v.u32[3] = 1;<br>
<span><font color="#888888">--<br>
2.5.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>