[Mesa-dev] [PATCH] spirv: Claim support for the simple memory model

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Thu Oct 26 18:15:10 UTC 2017


I couldn't find in the SPIR-V spec what the actual difference is
supposed by the two? Seems like in both cases the compiler can assume
no aliasing.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Thu, Oct 26, 2017 at 7:11 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> It's rather surprising that we've never actually hit this before.
> Aparently, Ian's SPIR-V generator currently claims the Simple when you
> don't do anything complex.  We really shouldn't assert-fail on it.
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/compiler/spirv/spirv_to_nir.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
> index fe0a4ef..6825e0d 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -2802,7 +2802,8 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
>
>     case SpvOpMemoryModel:
>        assert(w[1] == SpvAddressingModelLogical);
> -      assert(w[2] == SpvMemoryModelGLSL450);
> +      assert(w[2] == SpvMemoryModelSimple ||
> +             w[2] == SpvMemoryModelGLSL450);
>        break;
>
>     case SpvOpEntryPoint: {
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list