Lines Matching refs:size

60 inline void readOrder (typename tcu::Vector<DstScalarType, 4>& dst, const int size, const void* ptr)  in readOrder()  argument
63 deMemcpy(aligned, ptr, size * sizeof(SrcScalarType)); in readOrder()
66 if (size >= 2) dst[Order::T1] = DstScalarType(aligned[1]); in readOrder()
67 if (size >= 3) dst[Order::T2] = DstScalarType(aligned[2]); in readOrder()
68 if (size >= 4) dst[Order::T3] = DstScalarType(aligned[3]); in readOrder()
72 inline void readUnormOrder (tcu::Vec4& dst, const int size, const void* ptr) in readUnormOrder() argument
77 deMemcpy(aligned, ptr, size * sizeof(SrcScalarType)); in readUnormOrder()
80 if (size >= 2) dst[Order::T1] = float(aligned[1]) / float(range); in readUnormOrder()
81 if (size >= 3) dst[Order::T2] = float(aligned[2]) / float(range); in readUnormOrder()
82 if (size >= 4) dst[Order::T3] = float(aligned[3]) / float(range); in readUnormOrder()
86 inline void readSnormClamp (tcu::Vec4& dst, const int size, const void* ptr) in readSnormClamp() argument
92 deMemcpy(aligned, ptr, size * sizeof(SrcScalarType)); in readSnormClamp()
95 if (size >= 2) dst[1] = de::max(-1.0f, float(aligned[1]) / float(range)); in readSnormClamp()
96 if (size >= 3) dst[2] = de::max(-1.0f, float(aligned[2]) / float(range)); in readSnormClamp()
97 if (size >= 4) dst[3] = de::max(-1.0f, float(aligned[3]) / float(range)); in readSnormClamp()
101 inline void readSnormScale (tcu::Vec4& dst, const int size, const void* ptr) in readSnormScale() argument
107 deMemcpy(aligned, ptr, size * sizeof(SrcScalarType)); in readSnormScale()
110 if (size >= 2) dst[1] = (float(aligned[1]) * 2.0f + 1.0f) / float(range); in readSnormScale()
111 if (size >= 3) dst[2] = (float(aligned[2]) * 2.0f + 1.0f) / float(range); in readSnormScale()
112 if (size >= 4) dst[3] = (float(aligned[3]) * 2.0f + 1.0f) / float(range); in readSnormScale()
115 inline void readHalf (tcu::Vec4& dst, const int size, const void* ptr) in readHalf() argument
118 deMemcpy(aligned, ptr, size * sizeof(deUint16)); in readHalf()
121 if (size >= 2) dst[1] = tcu::Float16(aligned[1]).asFloat(); in readHalf()
122 if (size >= 3) dst[2] = tcu::Float16(aligned[2]).asFloat(); in readHalf()
123 if (size >= 4) dst[3] = tcu::Float16(aligned[3]).asFloat(); in readHalf()
126 inline void readFixed (tcu::Vec4& dst, const int size, const void* ptr) in readFixed() argument
129 deMemcpy(aligned, ptr, size * sizeof(deInt32)); in readFixed()
132 if (size >= 2) dst[1] = float(aligned[1]) / float(1 << 16); in readFixed()
133 if (size >= 3) dst[2] = float(aligned[2]) / float(1 << 16); in readFixed()
134 if (size >= 4) dst[3] = float(aligned[3]) / float(1 << 16); in readFixed()
137 inline void readDouble (tcu::Vec4& dst, const int size, const void* ptr) in readDouble() argument
140 deMemcpy(aligned, ptr, size * sizeof(double)); in readDouble()
143 if (size >= 2) dst[1] = float(aligned[1]); in readDouble()
144 if (size >= 3) dst[2] = float(aligned[2]); in readDouble()
145 if (size >= 4) dst[3] = float(aligned[3]); in readDouble()
155 inline void readUint2101010Rev (typename tcu::Vector<DstScalarType, 4>& dst, const int size, const … in readUint2101010Rev() argument
161 if (size >= 2) dst[1] = DstScalarType((aligned >> 10) & ((1 << 10) - 1)); in readUint2101010Rev()
162 if (size >= 3) dst[2] = DstScalarType((aligned >> 20) & ((1 << 10) - 1)); in readUint2101010Rev()
163 if (size >= 4) dst[3] = DstScalarType((aligned >> 30) & ((1 << 2) - 1)); in readUint2101010Rev()
167 inline void readInt2101010Rev (typename tcu::Vector<DstScalarType, 4>& dst, const int size, const v… in readInt2101010Rev() argument
173 if (size >= 2) dst[1] = (DstScalarType)extendSign<10>((aligned >> 10) & ((1 << 10) - 1)); in readInt2101010Rev()
174 if (size >= 3) dst[2] = (DstScalarType)extendSign<10>((aligned >> 20) & ((1 << 10) - 1)); in readInt2101010Rev()
175 if (size >= 4) dst[3] = (DstScalarType)extendSign< 2>((aligned >> 30) & ((1 << 2) - 1)); in readInt2101010Rev()
179 inline void readUnorm2101010RevOrder (tcu::Vec4& dst, const int size, const void* ptr) in readUnorm2101010RevOrder() argument
188 if (size >= 2) dst[Order::T1] = float((aligned >> 10) & ((1 << 10) - 1)) / float(range10); in readUnorm2101010RevOrder()
189 if (size >= 3) dst[Order::T2] = float((aligned >> 20) & ((1 << 10) - 1)) / float(range10); in readUnorm2101010RevOrder()
190 if (size >= 4) dst[Order::T3] = float((aligned >> 30) & ((1 << 2) - 1)) / float(range2); in readUnorm2101010RevOrder()
194 inline void readSnorm2101010RevClampOrder (tcu::Vec4& dst, const int size, const void* ptr) in readSnorm2101010RevClampOrder() argument
204 …if (size >= 2) dst[Order::T1] = de::max(-1.0f, float(extendSign<10>((aligned >> 10) & ((1 << 10) -… in readSnorm2101010RevClampOrder()
205 …if (size >= 3) dst[Order::T2] = de::max(-1.0f, float(extendSign<10>((aligned >> 20) & ((1 << 10) -… in readSnorm2101010RevClampOrder()
206 …if (size >= 4) dst[Order::T3] = de::max(-1.0f, float(extendSign< 2>((aligned >> 30) & ((1 << 2) -… in readSnorm2101010RevClampOrder()
210 inline void readSnorm2101010RevScaleOrder (tcu::Vec4& dst, const int size, const void* ptr) in readSnorm2101010RevScaleOrder() argument
220 …if (size >= 2) dst[Order::T1] = (float(extendSign<10>((aligned >> 10) & ((1 << 10) - 1))) * 2.0f +… in readSnorm2101010RevScaleOrder()
221 …if (size >= 3) dst[Order::T2] = (float(extendSign<10>((aligned >> 20) & ((1 << 10) - 1))) * 2.0f +… in readSnorm2101010RevScaleOrder()
222 …if (size >= 4) dst[Order::T3] = (float(extendSign< 2>((aligned >> 30) & ((1 << 2) - 1))) * 2.0f +… in readSnorm2101010RevScaleOrder()
228 inline void read (typename tcu::Vector<DstScalarType, 4>& dst, const int size, const void* ptr) in read() argument
230 readOrder<SrcScalarType, DstScalarType, NormalOrder>(dst, size, ptr); in read()
234 inline void readUnorm (tcu::Vec4& dst, const int size, const void* ptr) in readUnorm() argument
236 readUnormOrder<SrcScalarType, NormalOrder>(dst, size, ptr); in readUnorm()
240 inline void readUnormBGRA (tcu::Vec4& dst, const int size, const void* ptr) in readUnormBGRA() argument
242 readUnormOrder<SrcScalarType, BGRAOrder>(dst, size, ptr); in readUnormBGRA()
245 inline void readUnorm2101010Rev (tcu::Vec4& dst, const int size, const void* ptr) in readUnorm2101010Rev() argument
247 readUnorm2101010RevOrder<NormalOrder>(dst, size, ptr); in readUnorm2101010Rev()
250 inline void readUnorm2101010RevBGRA (tcu::Vec4& dst, const int size, const void* ptr) in readUnorm2101010RevBGRA() argument
252 readUnorm2101010RevOrder<BGRAOrder>(dst, size, ptr); in readUnorm2101010RevBGRA()
255 inline void readSnorm2101010RevClamp (tcu::Vec4& dst, const int size, const void* ptr) in readSnorm2101010RevClamp() argument
257 readSnorm2101010RevClampOrder<NormalOrder>(dst, size, ptr); in readSnorm2101010RevClamp()
260 inline void readSnorm2101010RevClampBGRA (tcu::Vec4& dst, const int size, const void* ptr) in readSnorm2101010RevClampBGRA() argument
262 readSnorm2101010RevClampOrder<BGRAOrder>(dst, size, ptr); in readSnorm2101010RevClampBGRA()
265 inline void readSnorm2101010RevScale (tcu::Vec4& dst, const int size, const void* ptr) in readSnorm2101010RevScale() argument
267 readSnorm2101010RevScaleOrder<NormalOrder>(dst, size, ptr); in readSnorm2101010RevScale()
270 inline void readSnorm2101010RevScaleBGRA (tcu::Vec4& dst, const int size, const void* ptr) in readSnorm2101010RevScaleBGRA() argument
272 readSnorm2101010RevScaleOrder<BGRAOrder>(dst, size, ptr); in readSnorm2101010RevScaleBGRA()
277 void readFloat (tcu::Vec4& dst, const VertexAttribType type, const int size, const void* ptr) in readFloat() argument
281 case VERTEXATTRIBTYPE_FLOAT: read<float> (dst, size, ptr); break; in readFloat()
282 case VERTEXATTRIBTYPE_HALF: readHalf (dst, size, ptr); break; in readFloat()
283 case VERTEXATTRIBTYPE_FIXED: readFixed (dst, size, ptr); break; in readFloat()
284 case VERTEXATTRIBTYPE_DOUBLE: readDouble (dst, size, ptr); break; in readFloat()
285 case VERTEXATTRIBTYPE_NONPURE_UNORM8: readUnorm<deUint8> (dst, size, ptr); break; in readFloat()
286 case VERTEXATTRIBTYPE_NONPURE_UNORM16: readUnorm<deUint16> (dst, size, ptr); break; in readFloat()
287 case VERTEXATTRIBTYPE_NONPURE_UNORM32: readUnorm<deUint32> (dst, size, ptr); break; in readFloat()
288 …case VERTEXATTRIBTYPE_NONPURE_UNORM_2_10_10_10_REV: readUnorm2101010Rev (dst, size, ptr); bre… in readFloat()
289 case VERTEXATTRIBTYPE_NONPURE_SNORM8_CLAMP: readSnormClamp<deInt8> (dst, size, ptr); break; in readFloat()
290 case VERTEXATTRIBTYPE_NONPURE_SNORM16_CLAMP: readSnormClamp<deInt16> (dst, size, ptr); break; in readFloat()
291 case VERTEXATTRIBTYPE_NONPURE_SNORM32_CLAMP: readSnormClamp<deInt32> (dst, size, ptr); break; in readFloat()
292 …case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_CLAMP: readSnorm2101010RevClamp (dst, size, pt… in readFloat()
293 case VERTEXATTRIBTYPE_NONPURE_SNORM8_SCALE: readSnormScale<deInt8> (dst, size, ptr); break; in readFloat()
294 case VERTEXATTRIBTYPE_NONPURE_SNORM16_SCALE: readSnormScale<deInt16> (dst, size, ptr); break; in readFloat()
295 case VERTEXATTRIBTYPE_NONPURE_SNORM32_SCALE: readSnormScale<deInt32> (dst, size, ptr); break; in readFloat()
296 …case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_SCALE: readSnorm2101010RevScale (dst, size, pt… in readFloat()
297 case VERTEXATTRIBTYPE_NONPURE_UINT8: read<deUint8> (dst, size, ptr); break; in readFloat()
298 case VERTEXATTRIBTYPE_NONPURE_UINT16: read<deUint16> (dst, size, ptr); break; in readFloat()
299 case VERTEXATTRIBTYPE_NONPURE_UINT32: read<deUint32> (dst, size, ptr); break; in readFloat()
300 case VERTEXATTRIBTYPE_NONPURE_INT8: read<deInt8> (dst, size, ptr); break; in readFloat()
301 case VERTEXATTRIBTYPE_NONPURE_INT16: read<deInt16> (dst, size, ptr); break; in readFloat()
302 case VERTEXATTRIBTYPE_NONPURE_INT32: read<deInt32> (dst, size, ptr); break; in readFloat()
303 …case VERTEXATTRIBTYPE_NONPURE_UINT_2_10_10_10_REV: readUint2101010Rev (dst, size, ptr); break; in readFloat()
304 case VERTEXATTRIBTYPE_NONPURE_INT_2_10_10_10_REV: readInt2101010Rev (dst, size, ptr); break; in readFloat()
305 case VERTEXATTRIBTYPE_NONPURE_UNORM8_BGRA: readUnormBGRA<deUint8> (dst, size, ptr); break; in readFloat()
306 …case VERTEXATTRIBTYPE_NONPURE_UNORM_2_10_10_10_REV_BGRA: readUnorm2101010RevBGRA (dst, size, ptr… in readFloat()
307 …BTYPE_NONPURE_SNORM_2_10_10_10_REV_CLAMP_BGRA: readSnorm2101010RevClampBGRA(dst, size, ptr); break; in readFloat()
308 …BTYPE_NONPURE_SNORM_2_10_10_10_REV_SCALE_BGRA: readSnorm2101010RevScaleBGRA(dst, size, ptr); break; in readFloat()
323 void readInt (tcu::IVec4& dst, const VertexAttribType type, const int size, const void* ptr) in readInt() argument
327 case VERTEXATTRIBTYPE_PURE_INT8: read<deInt8> (dst, size, ptr); break; in readInt()
328 case VERTEXATTRIBTYPE_PURE_INT16: read<deInt16> (dst, size, ptr); break; in readInt()
329 case VERTEXATTRIBTYPE_PURE_INT32: read<deInt32> (dst, size, ptr); break; in readInt()
369 void readUint (tcu::UVec4& dst, const VertexAttribType type, const int size, const void* ptr) in readUint() argument
373 case VERTEXATTRIBTYPE_PURE_UINT8: read<deUint8> (dst, size, ptr); break; in readUint()
374 case VERTEXATTRIBTYPE_PURE_UINT16: read<deUint16> (dst, size, ptr); break; in readUint()
375 case VERTEXATTRIBTYPE_PURE_UINT32: read<deUint32> (dst, size, ptr); break; in readUint()
465 !de::inRange(vertexAttrib.size, 0, 4) || in isValidVertexAttrib()
482 vertexAttrib.size != 4) in isValidVertexAttrib()
496 …const int stride = (vertexAttrib.stride != 0) ? (vertexAttrib.stride) : (vertexAttrib.size*compS… in readVertexAttrib()
500 …readFloat(dst, vertexAttrib.type, vertexAttrib.size, (const deUint8*)vertexAttrib.pointer + byteOf… in readVertexAttrib()
516 …const int stride = (vertexAttrib.stride != 0) ? (vertexAttrib.stride) : (vertexAttrib.size*compS… in readVertexAttrib()
520 …readInt(dst, vertexAttrib.type, vertexAttrib.size, (const deUint8*)vertexAttrib.pointer + byteOffs… in readVertexAttrib()
536 …const int stride = (vertexAttrib.stride != 0) ? (vertexAttrib.stride) : (vertexAttrib.size*compS… in readVertexAttrib()
540 …readUint(dst, vertexAttrib.type, vertexAttrib.size, (const deUint8*)vertexAttrib.pointer + byteOff… in readVertexAttrib()