[Mesa-dev] [PATCH v3 1/3] spirv: Fix reaching unreachable for compare exchange on images

Jason Ekstrand jason at jlekstrand.net
Mon Jul 10 21:14:13 UTC 2017


On Mon, Jul 10, 2017 at 1:46 PM, Andres Gomez <agomez at igalia.com> wrote:

> James, it doesn't seem like this patch has landed in master. Are you in
> need of review or is it that this has been superseded?
>

Sorry.  My fault.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

and pushed.  Thanks!


> Thanks!
>
> On Mon, 2017-06-26 at 10:46 +0100, James Legg wrote:
> > We were hitting the
> >       unreachable("Invalid image opcode")
> > near the end of vtn_handle_image when parsing the
> > SpvOpAtomicCompareExchange opcode.
> >
> > v2: Add stable CC.
> > v3: Ignore SpvOpAtomicCompareExchangeWeak. It requires the Kernel
> > capability which is not exposed in Vulkan, and spirv_to_nir is not used
> > for OpenCL which does support it.
> >
> > CC: <mesa-stable at lists.freedesktop.org>
> > ---
> >  src/compiler/spirv/spirv_to_nir.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/src/compiler/spirv/spirv_to_nir.c
> b/src/compiler/spirv/spirv_to_nir.c
> > index 0a5eb0e..0e6229b 100644
> > --- a/src/compiler/spirv/spirv_to_nir.c
> > +++ b/src/compiler/spirv/spirv_to_nir.c
> > @@ -1977,6 +1977,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp
> opcode,
> >        intrin->src[2] = nir_src_for_ssa(vtn_ssa_value(b, w[3])->def);
> >        break;
> >
> > +   case SpvOpAtomicCompareExchange:
> >     case SpvOpAtomicIIncrement:
> >     case SpvOpAtomicIDecrement:
> >     case SpvOpAtomicExchange:
> --
> Br,
>
> Andres
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170710/3ec932f7/attachment-0001.html>


More information about the mesa-dev mailing list