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

Function IsAllowedSampledImageOperand

source/val/validate_image.cpp:1172–1210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170}
1171
1172bool IsAllowedSampledImageOperand(spv::Op opcode, ValidationState_t& _) {
1173 switch (opcode) {
1174 case spv::Op::OpSampledImage:
1175 case spv::Op::OpImageSampleImplicitLod:
1176 case spv::Op::OpImageSampleExplicitLod:
1177 case spv::Op::OpImageSampleDrefImplicitLod:
1178 case spv::Op::OpImageSampleDrefExplicitLod:
1179 case spv::Op::OpImageSampleProjImplicitLod:
1180 case spv::Op::OpImageSampleProjExplicitLod:
1181 case spv::Op::OpImageSampleProjDrefImplicitLod:
1182 case spv::Op::OpImageSampleProjDrefExplicitLod:
1183 case spv::Op::OpImageGather:
1184 case spv::Op::OpImageDrefGather:
1185 case spv::Op::OpImage:
1186 case spv::Op::OpImageQueryLod:
1187 case spv::Op::OpImageSparseSampleImplicitLod:
1188 case spv::Op::OpImageSparseSampleExplicitLod:
1189 case spv::Op::OpImageSparseSampleDrefImplicitLod:
1190 case spv::Op::OpImageSparseSampleDrefExplicitLod:
1191 case spv::Op::OpImageSparseGather:
1192 case spv::Op::OpImageSparseDrefGather:
1193 case spv::Op::OpCopyObject:
1194 case spv::Op::OpImageSampleWeightedQCOM:
1195 case spv::Op::OpImageBoxFilterQCOM:
1196 case spv::Op::OpImageBlockMatchSSDQCOM:
1197 case spv::Op::OpImageBlockMatchSADQCOM:
1198 case spv::Op::OpImageBlockMatchWindowSADQCOM:
1199 case spv::Op::OpImageBlockMatchWindowSSDQCOM:
1200 case spv::Op::OpImageBlockMatchGatherSADQCOM:
1201 case spv::Op::OpImageBlockMatchGatherSSDQCOM:
1202 case spv::Op::OpImageSampleFootprintNV:
1203 return true;
1204 case spv::Op::OpStore:
1205 if (_.HasCapability(spv::Capability::BindlessTextureNV)) return true;
1206 return false;
1207 default:
1208 return false;
1209 }
1210}
1211
1212spv_result_t ValidateImageCoordinate(ValidationState_t& _,
1213 const Instruction* inst,

Callers 1

ValidateSampledImageFunction · 0.85

Calls 1

HasCapabilityMethod · 0.45

Tested by

no test coverage detected