Home | History | Annotate | Download | only in opengl

Lines Matching refs:DATATYPE

95 // DataType
97 enum DataType
214 const char* getDataTypeName (DataType dataType);
215 int getDataTypeScalarSize (DataType dataType);
216 DataType getDataTypeScalarType (DataType dataType);
217 DataType getDataTypeFloatScalars (DataType dataType);
218 DataType getDataTypeDoubleScalars (DataType dataType);
219 DataType getDataTypeVector (DataType scalarType, int size);
220 DataType getDataTypeFloatVec (int vecSize);
221 DataType getDataTypeIntVec (int vecSize);
222 DataType getDataTypeUintVec (int vecSize);
223 DataType getDataTypeBoolVec (int vecSize);
224 DataType getDataTypeMatrix (int numCols, int numRows);
225 DataType getDataTypeFromGLType (deUint32 glType);
227 inline bool isDataTypeFloatOrVec (DataType dataType) { return (dataType >= TYPE_FLOAT) && (dataType <= TYPE_FLOAT_VEC4); }
228 inline bool isDataTypeDoubleOrDVec (DataType dataType) { return (dataType >= TYPE_DOUBLE) && (dataType <= TYPE_DOUBLE_VEC4); }
229 inline bool isDataTypeMatrix (DataType dataType) { return ((dataType >= TYPE_FLOAT_MAT2) && (dataType <= TYPE_FLOAT_MAT4)) || ((dataType >= TYPE_DOUBLE_MAT2) && (dataType <= TYPE_DOUBLE_MAT4)); }
230 inline bool isDataTypeIntOrIVec (DataType dataType) { return (dataType >= TYPE_INT) && (dataType <= TYPE_INT_VEC4); }
231 inline bool isDataTypeUintOrUVec (DataType dataType) { return (dataType >= TYPE_UINT) && (dataType <= TYPE_UINT_VEC4); }
232 inline bool isDataTypeBoolOrBVec (DataType dataType) { return (dataType >= TYPE_BOOL) && (dataType <= TYPE_BOOL_VEC4); }
233 inline bool isDataTypeScalar (DataType dataType) { return (dataType == TYPE_FLOAT) || (dataType == TYPE_DOUBLE) ||(dataType == TYPE_INT) || (dataType == TYPE_UINT) || (dataType == TYPE_BOOL); }
234 inline bool isDataTypeVector (DataType dataType) { return deInRange32(dataType, TYPE_FLOAT_VEC2, TYPE_FLOAT_VEC4) || deInRange32(dataType, TYPE_DOUBLE_VEC2, TYPE_DOUBLE_VEC4) || deInRange32(dataType, TYPE_INT_VEC2, TYPE_INT_VEC4) || deInRange32(dataType, TYPE_UINT_VEC2, TYPE_UINT_VEC4) || deInRange32(dataType, TYPE_BOOL_VEC2, TYPE_BOOL_VEC4); }
235 inline bool isDataTypeScalarOrVector (DataType dataType) { return deInRange32(dataType, TYPE_FLOAT, TYPE_FLOAT_VEC4) || deInRange32(dataType, TYPE_DOUBLE, TYPE_DOUBLE_VEC4) || deInRange32(dataType, TYPE_INT, TYPE_INT_VEC4) || deInRange32(dataType, TYPE_UINT, TYPE_UINT_VEC4) || deInRange32(dataType, TYPE_BOOL, TYPE_BOOL_VEC4); }
236 inline bool isDataTypeSampler (DataType dataType) { return (dataType >= TYPE_SAMPLER_1D) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE); }
237 inline bool isDataTypeImage (DataType dataType) { return (dataType >= TYPE_IMAGE_2D) && (dataType <= TYPE_UINT_IMAGE_3D); }
238 inline bool isDataTypeSamplerMultisample(DataType dataType) { return (dataType >= TYPE_SAMPLER_2D_MULTISAMPLE) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE); }
239 inline bool isDataTypeAtomicCounter (DataType dataType) { return dataType == TYPE_UINT_ATOMIC_COUNTER; }
240 inline bool isDataTypeSamplerBuffer (DataType dataType) { return (dataType >= TYPE_SAMPLER_BUFFER) && (dataType <= TYPE_UINT_SAMPLER_BUFFER); }
241 inline bool isDataTypeSamplerMSArray (DataType dataType) { return (dataType >= TYPE_SAMPLER_2D_MULTISAMPLE_ARRAY) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE_ARRAY); }
242 inline bool isDataTypeImageBuffer (DataType dataType) { return (dataType >= TYPE_IMAGE_BUFFER) && (dataType <= TYPE_UINT_IMAGE_BUFFER); }
244 int getDataTypeMatrixNumRows (DataType dataType);
245 int getDataTypeMatrixNumColumns (DataType dataType);
247 int getDataTypeNumLocations (DataType dataType);
248 int getDataTypeNumComponents (DataType dataType);
253 template <> struct DataTypeTraits<float> { enum { DATATYPE = TYPE_FLOAT }; };
254 template <> struct DataTypeTraits<bool> { enum { DATATYPE = TYPE_BOOL }; };
255 template <> struct DataTypeTraits<int> { enum { DATATYPE = TYPE_INT }; };
256 template <> struct DataTypeTraits<deUint32> { enum { DATATYPE = TYPE_UINT }; };
257 template <> struct DataTypeTraits<tcu::Mat2> { enum { DATATYPE = TYPE_FLOAT_MAT2 }; };
258 template <> struct DataTypeTraits<tcu::Mat2x3> { enum { DATATYPE = TYPE_FLOAT_MAT2X3 }; };
259 template <> struct DataTypeTraits<tcu::Mat2x4> { enum { DATATYPE = TYPE_FLOAT_MAT2X4 }; };
260 template <> struct DataTypeTraits<tcu::Mat3x2> { enum { DATATYPE = TYPE_FLOAT_MAT3X2 }; };
261 template <> struct DataTypeTraits<tcu::Mat3> { enum { DATATYPE = TYPE_FLOAT_MAT3 }; };
262 template <> struct DataTypeTraits<tcu::Mat3x4> { enum { DATATYPE = TYPE_FLOAT_MAT3X4 }; };
263 template <> struct DataTypeTraits<tcu::Mat4x2> { enum { DATATYPE = TYPE_FLOAT_MAT4X2 }; };
264 template <> struct DataTypeTraits<tcu::Mat4x3> { enum { DATATYPE = TYPE_FLOAT_MAT4X3 }; };
265 template <> struct DataTypeTraits<tcu::Mat4> { enum { DATATYPE = TYPE_FLOAT_MAT4 }; };
274 enum { DATATYPE = DataTypeTraits<T>::DATATYPE + Size - 1 };
278 inline DataType dataTypeOf (void) { return DataType(DataTypeTraits<T>::DATATYPE); }