[Mesa-dev] [PATCH] nir/spirv: add gl_spirv_validation method
jason at jlekstrand.net
Mon Feb 12 16:45:23 UTC 2018
On Tue, Jan 23, 2018 at 7:04 AM, Alejandro Piñeiro <apinheiro at igalia.com>
> Gentle ping to Jason, as he probably missed that I was trying (but
> failed) to make a question. See below (also skipped most of the original
> On 18/01/18 13:31, Alejandro Piñeiro wrote:
> > +
> > +#include "nir_spirv.h"
> > +
> > +#include "vtn_private.h"
> > +#include "spirv_info.h"
> > +
> > +static bool
> > +vtn_validate_preamble_instruction(struct vtn_builder *b, SpvOp
> > opcode,
> > + const uint32_t *w, unsigned count)
> > I think you could probably re-use all of
> > vtn_handle_preamble_instruction. It would do a bit more than strictly
> > needed (like handle capabilities) but I don't see any harm in it.
> >> Ok, will try to re-use it.
> > Well, I tried, and here the situation: as the validation is doing the
> > barely minimum to check for the errors defined at the method
> > glSpecializeShader, we are also passing it the barely minimum parameters
> > needed. So we are not passing spirv_to_nir_options. So if we try to
> > reuse vtn_handle_preamble_instruction during the validation, we start to
> > get several "Unsupported SPIR-V capabilities" vtn_warnings. So the
> > option is passing the spirv_to_nir_options here too, or just keep the
> > simplified version that this patch already includes.
> What option would you prefer? Pass the spirv_to_nir_options to the
> validation method in order to be able to reuse
> vtn_handle_preamble_instruction, or as it is not really needed for this
> validation, not pass the spirv_to_nir_options and keep a simplified
> version of such method in order to avoid those vtn_warnings?
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev