MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / ValidateCopyObject

Function ValidateCopyObject

source/val/validate_composites.cpp:538–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538spv_result_t ValidateCopyObject(ValidationState_t& _, const Instruction* inst) {
539 const uint32_t result_type = inst->type_id();
540 const uint32_t operand_type = _.GetOperandTypeId(inst, 2);
541 if (operand_type != result_type) {
542 return _.diag(SPV_ERROR_INVALID_DATA, inst)
543 << "Expected Result Type and Operand type to be the same";
544 }
545 if (_.IsVoidType(result_type)) {
546 return _.diag(SPV_ERROR_INVALID_DATA, inst)
547 << "OpCopyObject cannot have void result type";
548 }
549 return SPV_SUCCESS;
550}
551
552spv_result_t ValidateTranspose(ValidationState_t& _, const Instruction* inst) {
553 uint32_t result_num_rows = 0;

Callers 1

CompositesPassFunction · 0.85

Calls 4

GetOperandTypeIdMethod · 0.80
diagMethod · 0.80
IsVoidTypeMethod · 0.80
type_idMethod · 0.45

Tested by

no test coverage detected