diff options
author | dan sinclair <dj2@everburning.com> | 2018-08-01 13:00:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-01 13:00:38 -0400 |
commit | 78335c927a04001fda30aff5a229d83384855605 (patch) | |
tree | e58ceeb515a0cf20b5a876ddbe6e1d6f96f7ee61 | |
parent | 6bb9ab48b859908250f49ff116a55262c4efebcb (diff) |
Update diag() calls in validate_primitives. (#1774)
This CL updates the diag() calls in validate_primitives to provide the
relevant instruction.
-rw-r--r-- | source/val/validate_primitives.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/val/validate_primitives.cpp b/source/val/validate_primitives.cpp index 81c2e4a5..3616cb99 100644 --- a/source/val/validate_primitives.cpp +++ b/source/val/validate_primitives.cpp @@ -50,14 +50,14 @@ spv_result_t PrimitivesPass(ValidationState_t& _, const Instruction* inst) { const uint32_t stream_id = inst->word(1); const uint32_t stream_type = _.GetTypeId(stream_id); if (!_.IsIntScalarType(stream_type)) { - return _.diag(SPV_ERROR_INVALID_DATA) + return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Stream to be int scalar"; } const SpvOp stream_opcode = _.GetIdOpcode(stream_id); if (!spvOpcodeIsConstant(stream_opcode)) { - return _.diag(SPV_ERROR_INVALID_DATA) + return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Stream to be constant instruction"; } |