summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-08-01 11:04:22 -0400
committerGitHub <noreply@github.com>2018-08-01 11:04:22 -0400
commit441c0190eb0328dc80ad4cc4526d6f178e06eb17 (patch)
tree3f87791db1b6d411e93de1928632a34e87a2987e
parent83b7f2b67412f5c82990a5ea3de1bb605f4ad321 (diff)
Update diag() calls in validate_derivatives. (#1765)
This CL updates diag() in validate_derivatives to provide the instruction of interest.
-rw-r--r--source/val/validate_derivatives.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/val/validate_derivatives.cpp b/source/val/validate_derivatives.cpp
index fb414bb4..398e79ab 100644
--- a/source/val/validate_derivatives.cpp
+++ b/source/val/validate_derivatives.cpp
@@ -40,14 +40,14 @@ spv_result_t DerivativesPass(ValidationState_t& _, const Instruction* inst) {
case SpvOpDPdyCoarse:
case SpvOpFwidthCoarse: {
if (!_.IsFloatScalarOrVectorType(result_type)) {
- return _.diag(SPV_ERROR_INVALID_DATA)
+ return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< "Expected Result Type to be float scalar or vector type: "
<< spvOpcodeString(opcode);
}
const uint32_t p_type = _.GetOperandTypeId(inst, 2);
if (p_type != result_type) {
- return _.diag(SPV_ERROR_INVALID_DATA)
+ return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< "Expected P type and Result Type to be the same: "
<< spvOpcodeString(opcode);
}