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

Function IsProj

source/val/validate_image.cpp:295–310  ·  view source on GitHub ↗

Returns true if the opcode is a Image instruction which applies homogenous projection to the coordinates.

Source from the content-addressed store, hash-verified

293// Returns true if the opcode is a Image instruction which applies
294// homogenous projection to the coordinates.
295bool IsProj(spv::Op opcode) {
296 switch (opcode) {
297 case spv::Op::OpImageSampleProjImplicitLod:
298 case spv::Op::OpImageSampleProjDrefImplicitLod:
299 case spv::Op::OpImageSparseSampleProjImplicitLod:
300 case spv::Op::OpImageSparseSampleProjDrefImplicitLod:
301 case spv::Op::OpImageSampleProjExplicitLod:
302 case spv::Op::OpImageSampleProjDrefExplicitLod:
303 case spv::Op::OpImageSparseSampleProjExplicitLod:
304 case spv::Op::OpImageSparseSampleProjDrefExplicitLod:
305 return true;
306 default:
307 break;
308 }
309 return false;
310}
311
312// Returns the number of components in a coordinate used to access a texel in
313// a single plane of an image with the given parameters.

Callers 3

GetMinCoordSizeFunction · 0.85
ValidateImageLodFunction · 0.85
ValidateImageDrefLodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected