mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
nir/spirv: Add support for OpLabel
This commit is contained in:
parent
a6cb9d9222
commit
eccd798cc2
1 changed files with 13 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ enum vtn_value_type {
|
|||
vtn_value_type_constant,
|
||||
vtn_value_type_variable,
|
||||
vtn_value_type_function,
|
||||
vtn_value_type_block,
|
||||
vtn_value_type_ssa,
|
||||
vtn_value_type_deref,
|
||||
};
|
||||
|
|
@ -55,6 +56,7 @@ struct vtn_value {
|
|||
nir_constant *constant;
|
||||
nir_variable *var;
|
||||
nir_function_impl *impl;
|
||||
nir_block *block;
|
||||
nir_ssa_def *ssa;
|
||||
nir_deref_var *deref;
|
||||
};
|
||||
|
|
@ -612,6 +614,17 @@ vtn_handle_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||
b->execution_model = w[1];
|
||||
break;
|
||||
|
||||
case SpvOpLabel: {
|
||||
struct exec_node *list_tail = exec_list_get_tail(b->cf_list);
|
||||
nir_cf_node *tail_node = exec_node_data(nir_cf_node, list_tail, node);
|
||||
assert(tail_node->type == nir_cf_node_block);
|
||||
nir_block *block = nir_cf_node_as_block(tail_node);
|
||||
|
||||
assert(exec_list_is_empty(&block->instr_list));
|
||||
vtn_push_value(b, w[1], vtn_value_type_block)->block = block;
|
||||
break;
|
||||
}
|
||||
|
||||
case SpvOpExtInstImport:
|
||||
case SpvOpExtInst:
|
||||
vtn_handle_extension(b, opcode, w, count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue