spirv: Implement SpvOpCopyLogical
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 25 Apr 2019 08:30:24 +0000 (01:30 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 4 Jun 2019 00:20:54 +0000 (17:20 -0700)
This is the same as SpvOpCopyObject but without the type checking,
which is how vtn_composite_copy works, so we just need to hook the
operation.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/spirv_to_nir.c

index 8efe0fa285cae2cd4ed2e00577b4ccc10a0d0f72..5aac137471074c98a8483054402a590f751ea079 100644 (file)
@@ -3252,6 +3252,7 @@ vtn_handle_composite(struct vtn_builder *b, SpvOp opcode,
                                       w + 5, count - 5);
       break;
 
+   case SpvOpCopyLogical:
    case SpvOpCopyObject:
       val->ssa = vtn_composite_copy(b, vtn_ssa_value(b, w[3]));
       break;
@@ -4445,6 +4446,7 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode,
    case SpvOpCompositeConstruct:
    case SpvOpCompositeExtract:
    case SpvOpCompositeInsert:
+   case SpvOpCopyLogical:
    case SpvOpCopyObject:
       vtn_handle_composite(b, opcode, w, count);
       break;