Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2024-06-15 10:33:35 -07:00
parent 2ca2bbc20e
commit ba632e83b8
40 changed files with 830 additions and 354 deletions
+7 -1
View File
@@ -1005,7 +1005,8 @@ bool IsAllowedSampledImageOperand(spv::Op opcode, ValidationState_t& _) {
spv_result_t ValidateSampledImage(ValidationState_t& _,
const Instruction* inst) {
if (_.GetIdOpcode(inst->type_id()) != spv::Op::OpTypeSampledImage) {
auto type_inst = _.FindDef(inst->type_id());
if (type_inst->opcode() != spv::Op::OpTypeSampledImage) {
return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< "Expected Result Type to be OpTypeSampledImage.";
}
@@ -1016,6 +1017,11 @@ spv_result_t ValidateSampledImage(ValidationState_t& _,
<< "Expected Image to be of type OpTypeImage.";
}
if (type_inst->GetOperandAs<uint32_t>(1) != image_type) {
return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< "Expected Image to have the same type as Result Type Image";
}
ImageTypeInfo info;
if (!GetImageTypeInfo(_, image_type, &info)) {
return _.diag(SPV_ERROR_INVALID_DATA, inst)