Validate OpImage*Proj* instructions
| 831 | |
| 832 | // Validate OpImage*Proj* instructions |
| 833 | spv_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 |
| 855 | spv_result_t ValidateImageReadWrite(ValidationState_t& _, |
no test coverage detected