From 9e27cdc7712f28532dc19cc5a772dd7b245b586b Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 26 Oct 2017 10:08:21 -0700 Subject: [PATCH] spirv: Claim support for the simple memory model 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 Reviewed-by: Bas Nieuwenhuizen Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 8ab9820d34d3a454e455c99e28ed2b6031b25b0f) --- 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 c5ec2c92117..8265a58eecb 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: {