From 149f35bbba1b86db112f9d8a71000760cf7fb54c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 30 Dec 2015 17:31:51 -0800 Subject: [PATCH] nir/spirv: Let OpEntryPoint act as an OpName --- src/glsl/nir/spirv/spirv_to_nir.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/glsl/nir/spirv/spirv_to_nir.c b/src/glsl/nir/spirv/spirv_to_nir.c index c4b0c50c52e..e5c99cd7bf4 100644 --- a/src/glsl/nir/spirv/spirv_to_nir.c +++ b/src/glsl/nir/spirv/spirv_to_nir.c @@ -3223,16 +3223,17 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, assert(w[2] == SpvMemoryModelGLSL450); break; - case SpvOpEntryPoint: { - char *name = vtn_string_literal(b, &w[3], count - 3); - if (strcmp(name, b->entry_point_name) != 0) + case SpvOpEntryPoint: + /* Let this be a name label regardless */ + b->values[w[2]].name = vtn_string_literal(b, &w[3], count - 3); + + if (strcmp(b->values[w[2]].name, b->entry_point_name) != 0) break; assert(b->entry_point == NULL); b->entry_point = &b->values[w[2]]; b->execution_model = w[1]; break; - } case SpvOpString: vtn_push_value(b, w[1], vtn_value_type_string)->str = -- 2.30.2