<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 23, 2018 at 7:04 AM, Alejandro Piñeiro <span dir="ltr"><<a href="mailto:apinheiro@igalia.com" target="_blank">apinheiro@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gentle ping to Jason, as he probably missed that I was trying (but<br>
failed) to make a question. See below (also skipped most of the original<br>
email)<br>
<span class=""><br>
<br>
On 18/01/18 13:31, Alejandro Piñeiro wrote:<br>
><br>
>     +<br>
>     +#include "nir_spirv.h"<br>
>     +<br>
>     +#include "vtn_private.h"<br>
>     +#include "spirv_info.h"<br>
>     +<br>
>     +static bool<br>
>     +vtn_validate_preamble_<wbr>instruction(struct vtn_builder *b, SpvOp<br>
>     opcode,<br>
>     +                                  const uint32_t *w, unsigned count)<br>
><br>
><br>
> I think you could probably re-use all of<br>
> vtn_handle_preamble_<wbr>instruction.  It would do a bit more than strictly<br>
> needed (like handle capabilities) but I don't see any harm in it.<br>
>> Ok, will try to re-use it.<br>
> Well, I tried, and here the situation: as the validation is doing the<br>
> barely minimum to check for the errors defined at the method<br>
> glSpecializeShader, we are also passing it the barely minimum parameters<br>
> needed. So we are not passing spirv_to_nir_options. So if we try to<br>
> reuse vtn_handle_preamble_<wbr>instruction during the validation, we start to<br>
> get several "Unsupported SPIR-V capabilities" vtn_warnings. So the<br>
> option is passing the spirv_to_nir_options here too, or just keep the<br>
> simplified version that this patch already includes.<br>
<br>
</span>What option would you prefer? Pass the spirv_to_nir_options to the<br>
validation method in order to be able to reuse<br>
vtn_handle_preamble_<wbr>instruction, or as it is not really needed for this<br>
validation, not pass the spirv_to_nir_options and keep a simplified<br>
version of such method in order to avoid those vtn_warnings?<br>
</blockquote></div><br></div><div class="gmail_extra">Just keeping the simplified version is fine with me.  I was hoping to save you some typing but didn't know that it would cause problems.<br></div></div>