diff options
author | dan sinclair <dj2@everburning.com> | 2018-08-01 12:49:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-01 12:49:43 -0400 |
commit | 6bb9ab48b859908250f49ff116a55262c4efebcb (patch) | |
tree | 59f95e52e53ec10da5a3bb82153ca44ec3285096 /source | |
parent | 7c9a73fc30f0543cbf45c09f81272eb7a4468e30 (diff) |
Update diag() calls in validate_non_uniform. (#1773)
This CL upldates diag() calls in validate_non_uniform to provide the
relevant instruction.
Diffstat (limited to 'source')
-rw-r--r-- | source/val/validate_non_uniform.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/val/validate_non_uniform.cpp b/source/val/validate_non_uniform.cpp index ba68f18e..89e82c61 100644 --- a/source/val/validate_non_uniform.cpp +++ b/source/val/validate_non_uniform.cpp @@ -36,7 +36,7 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(scope); if (!is_int32) { - return _.diag(SPV_ERROR_INVALID_DATA) + return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Execution Scope to be a 32-bit int"; } @@ -48,16 +48,16 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, if (spvIsVulkanEnv(_.context()->target_env) && _.context()->target_env != SPV_ENV_VULKAN_1_0 && value != SpvScopeSubgroup) { - return _.diag(SPV_ERROR_INVALID_DATA) + return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": in Vulkan environment Execution scope is limited to " "Subgroup"; } if (value != SpvScopeSubgroup && value != SpvScopeWorkgroup) { - return _.diag(SPV_ERROR_INVALID_DATA) << spvOpcodeString(opcode) - << ": Execution scope is limited to " - "Subgroup or Workgroup"; + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << spvOpcodeString(opcode) + << ": Execution scope is limited to Subgroup or Workgroup"; } return SPV_SUCCESS; |