<div dir="ltr">On 18 December 2013 07:14, Francisco Jerez <span dir="ltr"><<a href="mailto:currojerez@riseup.net" target="_blank">currojerez@riseup.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> writes:<br>
>[...]<br>
</div><div class="im">> This is definitely an improvement, thanks. I still think there are some<br>
> minor tweaks that would reduce duplication of information, though:<br>
><br>
> - Precompute the value (glsl ? IMAGE_FUNCTION_EMIT_STUB : 0) rather than<br>
> duplicating it at each add_image_function call site. Alternatively, just<br>
> make emit_stub a bool parameter to add_image_function rather than including<br>
> it in flags.<br>
><br>
<br>
</div>Okay.<br>
<div class="im"><br>
> - Rather than repeating the pattern add_image_function((glsl ? BUILTIN_NAME<br>
> : INTRINSIC_NAME), INTRINSIC_NAME, ...) everywhere, make BUILTIN_NAME and<br>
> INTRINSIC_NAME the first two arguments to add_image_function(), and have<br>
> add_image_function() pick which name to use based on emit_stub.<br>
><br>
<br>
</div>That would make the interpretation of its arguments somewhat more<br>
obscure. Even if the code would be slightly shorter that way, I think<br>
it's easier to understand what's going on the way it is. I'd rather<br>
leave this unchanged.<br></blockquote><div><br></div>I disagree, but I don't want to waste time arguing about this anymore. Patch is:<br><br>Acked-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> <br>
</div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="im">
> - Since IMAGE_FUNCTION_HAS_RETURN is by far the more common case, invert<br>
> the sense of the flag (e.g. change it to IMAGE_FUNCTION_RETURNS_VOID).<br>
><br>
<br>
</div>See <a href="http://cgit.freedesktop.org/~currojerez/mesa/commit/?h=image-load-store&id=9026d1d9b645ee7dd1fa48bdcdfff2891a7efbfc" target="_blank">http://cgit.freedesktop.org/~currojerez/mesa/commit/?h=image-load-store&id=9026d1d9b645ee7dd1fa48bdcdfff2891a7efbfc</a><br>
<br>
Thanks.<br>
<br>
> [...]<br>
</blockquote></div><br></div></div>