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

Function ValidateImageProj

source/val/validate_image.cpp:833–852  ·  view source on GitHub ↗

Validate OpImage*Proj* instructions

Source from the content-addressed store, hash-verified

831
832// Validate OpImage*Proj* instructions
833spv_result_t ValidateImageProj(ValidationState_t& _, const Instruction* inst,
834 const ImageTypeInfo& info) {
835 if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D &&
836 info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Rect) {
837 return _.diag(SPV_ERROR_INVALID_DATA, inst)
838 << "Expected Image 'Dim' parameter to be 1D, 2D, 3D or Rect";
839 }
840
841 if (info.multisampled != 0) {
842 return _.diag(SPV_ERROR_INVALID_DATA, inst)
843 << "Expected Image 'MS' parameter to be 0";
844 }
845
846 if (info.arrayed != 0) {
847 return _.diag(SPV_ERROR_INVALID_DATA, inst)
848 << "Expected Image 'arrayed' parameter to be 0";
849 }
850
851 return SPV_SUCCESS;
852}
853
854// Validate OpImage*Read and OpImage*Write instructions
855spv_result_t ValidateImageReadWrite(ValidationState_t& _,

Callers 2

ValidateImageLodFunction · 0.85
ValidateImageDrefLodFunction · 0.85

Calls 1

diagMethod · 0.80

Tested by

no test coverage detected