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

Andres Gomez agomez at igalia.com
Mon Jul 10 20:46:49 UTC 2017


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?

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


More information about the mesa-dev mailing list