nir/spirv: Let OpEntryPoint act as an OpName
This commit is contained in:
@@ -3223,16 +3223,17 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||||||
assert(w[2] == SpvMemoryModelGLSL450);
|
assert(w[2] == SpvMemoryModelGLSL450);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvOpEntryPoint: {
|
case SpvOpEntryPoint:
|
||||||
char *name = vtn_string_literal(b, &w[3], count - 3);
|
/* Let this be a name label regardless */
|
||||||
if (strcmp(name, b->entry_point_name) != 0)
|
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;
|
break;
|
||||||
|
|
||||||
assert(b->entry_point == NULL);
|
assert(b->entry_point == NULL);
|
||||||
b->entry_point = &b->values[w[2]];
|
b->entry_point = &b->values[w[2]];
|
||||||
b->execution_model = w[1];
|
b->execution_model = w[1];
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case SpvOpString:
|
case SpvOpString:
|
||||||
vtn_push_value(b, w[1], vtn_value_type_string)->str =
|
vtn_push_value(b, w[1], vtn_value_type_string)->str =
|
||||||
|
Reference in New Issue
Block a user