summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-10-26 10:08:21 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2017-10-27 18:55:46 +0100
commit66603bff6f15ec00a20f7e13cd71d27c6593ebbd (patch)
treeb9510a56ad9dd59f032714ab5766c33daa58fe9f
parentb0082632eb6b71dd3ee9f7e2fd63205912133e7c (diff)
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 <ian.d.romanick@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 8ab9820d34d3a454e455c99e28ed2b6031b25b0f)
-rw-r--r--src/compiler/spirv/spirv_to_nir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index fe0a4efceb1..6825e0d6a82 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: {