vtn: handle SpvOpExtInstWithForwardRefsKHR for non semantic instructions
Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30726>
This commit is contained in:
@@ -831,8 +831,13 @@ vtn_handle_extension(struct vtn_builder *b, SpvOp opcode,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SpvOpExtInst: {
|
case SpvOpExtInst:
|
||||||
|
case SpvOpExtInstWithForwardRefsKHR: {
|
||||||
struct vtn_value *val = vtn_value(b, w[3], vtn_value_type_extension);
|
struct vtn_value *val = vtn_value(b, w[3], vtn_value_type_extension);
|
||||||
|
|
||||||
|
if (opcode == SpvOpExtInstWithForwardRefsKHR)
|
||||||
|
assert(val->ext_handler == vtn_handle_non_semantic_instruction);
|
||||||
|
|
||||||
bool handled = val->ext_handler(b, w[4], w, count);
|
bool handled = val->ext_handler(b, w[4], w, count);
|
||||||
vtn_assert(handled);
|
vtn_assert(handled);
|
||||||
break;
|
break;
|
||||||
@@ -5007,7 +5012,8 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||||||
vtn_handle_decoration(b, opcode, w, count);
|
vtn_handle_decoration(b, opcode, w, count);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvOpExtInst: {
|
case SpvOpExtInst:
|
||||||
|
case SpvOpExtInstWithForwardRefsKHR: {
|
||||||
struct vtn_value *val = vtn_value(b, w[3], vtn_value_type_extension);
|
struct vtn_value *val = vtn_value(b, w[3], vtn_value_type_extension);
|
||||||
if (val->ext_handler == vtn_handle_non_semantic_instruction) {
|
if (val->ext_handler == vtn_handle_non_semantic_instruction) {
|
||||||
/* NonSemantic extended instructions are acceptable in preamble. */
|
/* NonSemantic extended instructions are acceptable in preamble. */
|
||||||
@@ -5626,7 +5632,8 @@ vtn_handle_variable_or_type_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||||||
vtn_handle_variables(b, opcode, w, count);
|
vtn_handle_variables(b, opcode, w, count);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvOpExtInst: {
|
case SpvOpExtInst:
|
||||||
|
case SpvOpExtInstWithForwardRefsKHR: {
|
||||||
struct vtn_value *val = vtn_value(b, w[3], vtn_value_type_extension);
|
struct vtn_value *val = vtn_value(b, w[3], vtn_value_type_extension);
|
||||||
/* NonSemantic extended instructions are acceptable in preamble, others
|
/* NonSemantic extended instructions are acceptable in preamble, others
|
||||||
* will indicate the end of preamble.
|
* will indicate the end of preamble.
|
||||||
@@ -6105,6 +6112,7 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SpvOpExtInst:
|
case SpvOpExtInst:
|
||||||
|
case SpvOpExtInstWithForwardRefsKHR:
|
||||||
vtn_handle_extension(b, opcode, w, count);
|
vtn_handle_extension(b, opcode, w, count);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user