Lines Matching refs:dst
60 inline void readOrder (typename tcu::Vector<DstScalarType, 4>& dst, const int size, const void* ptr) in readOrder() argument
65 dst[Order::T0] = DstScalarType(aligned[0]); 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
79 dst[Order::T0] = float(aligned[0]) / float(range); 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
94 dst[0] = de::max(-1.0f, float(aligned[0]) / float(range)); 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
109 dst[0] = (float(aligned[0]) * 2.0f + 1.0f) / float(range); 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
120 dst[0] = tcu::Float16(aligned[0]).asFloat(); 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
131 dst[0] = float(aligned[0]) / float(1 << 16); 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
142 dst[0] = float(aligned[0]); 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
160 dst[0] = DstScalarType((aligned >> 0) & ((1 << 10) - 1)); in readUint2101010Rev()
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
172 dst[0] = (DstScalarType)extendSign<10>((aligned >> 0) & ((1 << 10) - 1)); in readInt2101010Rev()
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
187 dst[Order::T0] = float((aligned >> 0) & ((1 << 10) - 1)) / float(range10); in readUnorm2101010RevOrder()
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
203 …dst[Order::T0] = de::max(-1.0f, float(extendSign<10>((aligned >> 0) & ((1 << 10) - 1))) / float(r… in readSnorm2101010RevClampOrder()
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
219 …dst[Order::T0] = (float(extendSign<10>((aligned >> 0) & ((1 << 10) - 1))) * 2.0f + 1.0f) / float(… in readSnorm2101010RevScaleOrder()
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 …case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_CLAMP_BGRA: readSnorm2101010RevClampBGRA(dst, s… in readFloat()
308 …case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_SCALE_BGRA: readSnorm2101010RevScaleBGRA(dst, s… in readFloat()
324 void readInt (tcu::IVec4& dst, const VertexAttribType type, const int size, const void* ptr) in readInt() argument
328 case VERTEXATTRIBTYPE_PURE_INT8: read<deInt8> (dst, size, ptr); break; in readInt()
329 case VERTEXATTRIBTYPE_PURE_INT16: read<deInt16> (dst, size, ptr); break; in readInt()
330 case VERTEXATTRIBTYPE_PURE_INT32: read<deInt32> (dst, size, ptr); break; in readInt()
371 void readUint (tcu::UVec4& dst, const VertexAttribType type, const int size, const void* ptr) in readUint() argument
375 case VERTEXATTRIBTYPE_PURE_UINT8: read<deUint8> (dst, size, ptr); break; in readUint()
376 case VERTEXATTRIBTYPE_PURE_UINT16: read<deUint16> (dst, size, ptr); break; in readUint()
377 case VERTEXATTRIBTYPE_PURE_UINT32: read<deUint32> (dst, size, ptr); break; in readUint()
491 void readVertexAttrib (tcu::Vec4& dst, const VertexAttrib& vertexAttrib, const int instanceNdx, con… in readVertexAttrib() argument
502 dst = tcu::Vec4(0, 0, 0, 1); // defaults in readVertexAttrib()
503 …readFloat(dst, vertexAttrib.type, vertexAttrib.size, (const deUint8*)vertexAttrib.pointer + byteOf… in readVertexAttrib()
507 dst = vertexAttrib.generic.get<float>(); in readVertexAttrib()
511 void readVertexAttrib (tcu::IVec4& dst, const VertexAttrib& vertexAttrib, const int instanceNdx, co… in readVertexAttrib() argument
522 dst = tcu::IVec4(0, 0, 0, 1); // defaults in readVertexAttrib()
523 …readInt(dst, vertexAttrib.type, vertexAttrib.size, (const deUint8*)vertexAttrib.pointer + byteOffs… in readVertexAttrib()
527 dst = vertexAttrib.generic.get<deInt32>(); in readVertexAttrib()
531 void readVertexAttrib (tcu::UVec4& dst, const VertexAttrib& vertexAttrib, const int instanceNdx, co… in readVertexAttrib() argument
542 dst = tcu::UVec4(0, 0, 0, 1); // defaults in readVertexAttrib()
543 …readUint(dst, vertexAttrib.type, vertexAttrib.size, (const deUint8*)vertexAttrib.pointer + byteOff… in readVertexAttrib()
547 dst = vertexAttrib.generic.get<deUint32>(); in readVertexAttrib()