Home | History | Annotate | Download | only in common

Lines Matching refs:TextureFormat

74 TextureChannelClass getTextureChannelClass (TextureFormat::ChannelType channelType)
78 case TextureFormat::SNORM_INT8: return TEXTURECHANNELCLASS_SIGNED_FIXED_POINT;
79 case TextureFormat::SNORM_INT16: return TEXTURECHANNELCLASS_SIGNED_FIXED_POINT;
80 case TextureFormat::UNORM_INT8: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
81 case TextureFormat::UNORM_INT16: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
82 case TextureFormat::UNORM_SHORT_565: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
83 case TextureFormat::UNORM_SHORT_555: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
84 case TextureFormat::UNORM_SHORT_4444: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
85 case TextureFormat::UNORM_SHORT_5551: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
86 case TextureFormat::UNORM_INT_101010: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
87 case TextureFormat::UNORM_INT_1010102_REV: return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
88 case TextureFormat::UNSIGNED_INT_1010102_REV: return TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
89 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV: return TEXTURECHANNELCLASS_FLOATING_POINT;
90 case TextureFormat::UNSIGNED_INT_999_E5_REV: return TEXTURECHANNELCLASS_FLOATING_POINT;
91 case TextureFormat::SIGNED_INT8: return TEXTURECHANNELCLASS_SIGNED_INTEGER;
92 case TextureFormat::SIGNED_INT16: return TEXTURECHANNELCLASS_SIGNED_INTEGER;
93 case TextureFormat::SIGNED_INT32: return TEXTURECHANNELCLASS_SIGNED_INTEGER;
94 case TextureFormat::UNSIGNED_INT8: return TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
95 case TextureFormat::UNSIGNED_INT16: return TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
96 case TextureFormat::UNSIGNED_INT32: return TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
97 case TextureFormat::HALF_FLOAT: return TEXTURECHANNELCLASS_FLOATING_POINT;
98 case TextureFormat::FLOAT: return TEXTURECHANNELCLASS_FLOATING_POINT;
199 static Vec2 getChannelValueRange (TextureFormat::ChannelType channelType)
207 case TextureFormat::SNORM_INT8:
208 case TextureFormat::SNORM_INT16: cMin = -1.0f; cMax = 1.0f; break;
211 case TextureFormat::UNORM_INT8:
212 case TextureFormat::UNORM_INT16:
213 case TextureFormat::UNORM_SHORT_565:
214 case TextureFormat::UNORM_SHORT_4444:
215 case TextureFormat::UNORM_INT_101010:
216 case TextureFormat::UNORM_INT_1010102_REV: cMin = 0.0f; cMax = 1.0f; break;
219 case TextureFormat::SIGNED_INT8: cMin = -128.0f; cMax = 127.0f; break;
220 case TextureFormat::SIGNED_INT16: cMin = -32768.0f; cMax = 32767.0f; break;
221 case TextureFormat::SIGNED_INT32: cMin = -2147483648.0f; cMax = 2147483647.0f; break;
222 case TextureFormat::UNSIGNED_INT8: cMin = 0.0f; cMax = 255.0f; break;
223 case TextureFormat::UNSIGNED_INT16: cMin = 0.0f; cMax = 65535.0f; break;
224 case TextureFormat::UNSIGNED_INT32: cMin = 0.0f; cMax = 4294967295.f; break;
225 case TextureFormat::HALF_FLOAT: cMin = -1e3f; cMax = 1e3f; break;
226 case TextureFormat::FLOAT: cMin = -1e5f; cMax = 1e5f; break;
227 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV: cMin = 0.0f; cMax = 1e4f; break;
228 case TextureFormat::UNSIGNED_INT_999_E5_REV: cMin = 0.0f; cMax = 1e5f; break;
241 * given TextureFormat. Parameters include value ranges per channel and
245 TextureFormatInfo getTextureFormatInfo (const TextureFormat& format)
248 if (format == TextureFormat(TextureFormat::RGBA, TextureFormat::UNSIGNED_INT_1010102_REV))
253 else if (format.order == TextureFormat::D || format.order == TextureFormat::DS)
258 else if (format == TextureFormat(TextureFormat::RGBA, TextureFormat::UNORM_SHORT_5551))
269 case TextureFormat::R: chnMask = BVec4(true, false, false, false); break;
270 case TextureFormat::A: chnMask = BVec4(false, false, false, true); break;
271 case TextureFormat::L: chnMask = BVec4(true, true, true, false); break;
272 case TextureFormat::LA: chnMask = BVec4(true, true, true, true); break;
273 case TextureFormat::RG: chnMask = BVec4(true, true, false, false); break;
274 case TextureFormat::RGB: chnMask = BVec4(true, true, true, false); break;
275 case TextureFormat::RGBA: chnMask = BVec4(true, true, true, true); break;
276 case TextureFormat::sRGB: chnMask = BVec4(true, true, true, false); break;
277 case TextureFormat::sRGBA: chnMask = BVec4(true, true, true, true); break;
278 case TextureFormat::D: chnMask = BVec4(true, true, true, false); break;
279 case TextureFormat::DS: chnMask = BVec4(true, true, true, true); break;
293 static IVec4 getChannelBitDepth (TextureFormat::ChannelType channelType)
297 case TextureFormat::SNORM_INT8: return IVec4(8);
298 case TextureFormat::SNORM_INT16: return IVec4(16);
299 case TextureFormat::SNORM_INT32: return IVec4(32);
300 case TextureFormat::UNORM_INT8: return IVec4(8);
301 case TextureFormat::UNORM_INT16: return IVec4(16);
302 case TextureFormat::UNORM_INT32: return IVec4(32);
303 case TextureFormat::UNORM_SHORT_565: return IVec4(5,6,5,0);
304 case TextureFormat::UNORM_SHORT_4444: return IVec4(4);
305 case TextureFormat::UNORM_SHORT_555: return IVec4(5,5,5,0);
306 case TextureFormat::UNORM_SHORT_5551: return IVec4(5,5,5,1);
307 case TextureFormat::UNORM_INT_101010: return IVec4(10,10,10,0);
308 case TextureFormat::UNORM_INT_1010102_REV: return IVec4(10,10,10,2);
309 case TextureFormat::SIGNED_INT8: return IVec4(8);
310 case TextureFormat::SIGNED_INT16: return IVec4(16);
311 case TextureFormat::SIGNED_INT32: return IVec4(32);
312 case TextureFormat::UNSIGNED_INT8: return IVec4(8);
313 case TextureFormat::UNSIGNED_INT16: return IVec4(16);
314 case TextureFormat::UNSIGNED_INT32: return IVec4(32);
315 case TextureFormat::UNSIGNED_INT_1010102_REV: return IVec4(10,10,10,2);
316 case TextureFormat::UNSIGNED_INT_24_8: return IVec4(24,0,0,8);
317 case TextureFormat::HALF_FLOAT: return IVec4(16);
318 case TextureFormat::FLOAT: return IVec4(32);
319 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV: return IVec4(11,11,10,0);
320 case TextureFormat::UNSIGNED_INT_999_E5_REV: return IVec4(9,9,9,0);
321 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV: return IVec4(32,0,0,8);
328 IVec4 getTextureFormatBitDepth (const TextureFormat& format)
336 case TextureFormat::R: chnMask = BVec4(true, false, false, false); break;
337 case TextureFormat::A: chnMask = BVec4(false, false, false, true); break;
338 case TextureFormat::RA: chnMask = BVec4(true, false, false, true); break;
339 case TextureFormat::L: chnMask = BVec4(true, true, true, false); break;
340 case TextureFormat::I: chnMask = BVec4(true, true, true, true); break;
341 case TextureFormat::LA: chnMask = BVec4(true, true, true, true); break;
342 case TextureFormat::RG: chnMask = BVec4(true, true, false, false); break;
343 case TextureFormat::RGB: chnMask = BVec4(true, true, true, false); break;
344 case TextureFormat::RGBA: chnMask = BVec4(true, true, true, true); break;
345 case TextureFormat::BGRA: chnMask = BVec4(true, true, true, true); chnSwz = IVec4(2, 1, 0, 3); break;
346 case TextureFormat::ARGB: chnMask = BVec4(true, true, true, true); chnSwz = IVec4(1, 2, 3, 0); break;
347 case TextureFormat::sRGB: chnMask = BVec4(true, true, true, false); break;
348 case TextureFormat::sRGBA: chnMask = BVec4(true, true, true, true); break;
349 case TextureFormat::D: chnMask = BVec4(true, false, false, false); break;
350 case TextureFormat::DS: chnMask = BVec4(true, false, false, true); break;
351 case TextureFormat::S: chnMask = BVec4(false, false, false, true); break;
359 static IVec4 getChannelMantissaBitDepth (TextureFormat::ChannelType channelType)
363 case TextureFormat::SNORM_INT8:
364 case TextureFormat
365 case TextureFormat::SNORM_INT32:
366 case TextureFormat::UNORM_INT8:
367 case TextureFormat::UNORM_INT16:
368 case TextureFormat::UNORM_INT32:
369 case TextureFormat::UNORM_SHORT_565:
370 case TextureFormat::UNORM_SHORT_4444:
371 case TextureFormat::UNORM_SHORT_555:
372 case TextureFormat::UNORM_SHORT_5551:
373 case TextureFormat::UNORM_INT_101010:
374 case TextureFormat::UNORM_INT_1010102_REV:
375 case TextureFormat::SIGNED_INT8:
376 case TextureFormat::SIGNED_INT16:
377 case TextureFormat::SIGNED_INT32:
378 case TextureFormat::UNSIGNED_INT8:
379 case TextureFormat::UNSIGNED_INT16:
380 case TextureFormat::UNSIGNED_INT32:
381 case TextureFormat::UNSIGNED_INT_1010102_REV:
382 case TextureFormat::UNSIGNED_INT_24_8:
383 case TextureFormat::UNSIGNED_INT_999_E5_REV:
386 case TextureFormat::HALF_FLOAT: return IVec4(10);
387 case TextureFormat::FLOAT: return IVec4(23);
388 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV: return IVec4(6,6,5,0);
389 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV: return IVec4(23,0,0,8);
396 IVec4 getTextureFormatMantissaBitDepth (const TextureFormat& format)
404 case TextureFormat::R: chnMask = BVec4(true, false, false, false); break;
405 case TextureFormat::A: chnMask = BVec4(false, false, false, true); break;
406 case TextureFormat::RA: chnMask = BVec4(true, false, false, true); break;
407 case TextureFormat::L: chnMask = BVec4(true, true, true, false); break;
408 case TextureFormat::I: chnMask = BVec4(true, true, true, true); break;
409 case TextureFormat::LA: chnMask = BVec4(true, true, true, true); break;
410 case TextureFormat::RG: chnMask = BVec4(true, true, false, false); break;
411 case TextureFormat::RGB: chnMask = BVec4(true, true, true, false); break;
412 case TextureFormat::RGBA: chnMask = BVec4(true, true, true, true); break;
413 case TextureFormat::BGRA: chnMask = BVec4(true, true, true, true); chnSwz = IVec4(2, 1, 0, 3); break;
414 case TextureFormat::ARGB: chnMask = BVec4(true, true, true, true); chnSwz = IVec4(1, 2, 3, 0); break;
415 case TextureFormat::sRGB: chnMask = BVec4(true, true, true, false); break;
416 case TextureFormat::sRGBA: chnMask = BVec4(true, true, true, true); break;
417 case TextureFormat::D: chnMask = BVec4(true, false, false, false); break;
418 case TextureFormat::DS: chnMask = BVec4(true, false, false, true); break;
419 case TextureFormat::S: chnMask = BVec4(false, false, false, true); break;
848 const TextureFormat& format = access.getFormat();
852 case TextureFormat::UNORM_INT8:
853 case TextureFormat::UNORM_INT16:
859 case TextureFormat::SNORM_INT8:
860 case TextureFormat::SNORM_INT16: