Lines Matching refs:dst

87 typedef void (*unpack_rgba_func)(const void *src, GLfloat dst[][4], GLuint n);
91 unpack_RGBA8888(const void *src, GLfloat dst[][4], GLuint n)
96 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
97 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
98 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
99 dst[i][ACOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
104 unpack_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n)
109 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
110 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
111 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
112 dst[i][ACOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
117 unpack_ARGB8888(const void *src, GLfloat dst[][4], GLuint n)
122 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
123 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
124 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
125 dst[i][ACOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
130 unpack_ARGB8888_REV(const void *src, GLfloat dst[][4], GLuint n)
135 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
136 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
137 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
138 dst[i][ACOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
143 unpack_RGBX8888(const void *src, GLfloat dst[][4], GLuint n)
148 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
149 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
150 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
151 dst[i][ACOMP] = 1.0f;
156 unpack_RGBX8888_REV(const void *src, GLfloat dst[][4], GLuint n)
161 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
162 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
163 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
164 dst[i][ACOMP] = 1.0f;
169 unpack_XRGB8888(const void *src, GLfloat dst[][4], GLuint n)
174 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
175 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
176 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
177 dst[i][ACOMP] = 1.0f;
182 unpack_XRGB8888_REV(const void *src, GLfloat dst[][4], GLuint n)
187 dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
188 dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
189 dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
190 dst[i][ACOMP] = 1.0f;
195 unpack_RGB888(const void *src, GLfloat dst[][4], GLuint n)
200 dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i*3+2] );
201 dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i*3+1] );
202 dst[i][BCOMP] = UBYTE_TO_FLOAT( s[i*3+0] );
203 dst[i][ACOMP] = 1.0F;
208 unpack_BGR888(const void *src, GLfloat dst[][4], GLuint n)
213 dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i*3+0] );
214 dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i*3+1] );
215 dst[i][BCOMP] = UBYTE_TO_FLOAT( s[i*3+2] );
216 dst[i][ACOMP] = 1.0F;
221 unpack_RGB565(const void *src, GLfloat dst[][4], GLuint n)
226 dst[i][RCOMP] = ((s[i] >> 11) & 0x1f) * (1.0F / 31.0F);
227 dst[i][GCOMP] = ((s[i] >> 5 ) & 0x3f) * (1.0F / 63.0F);
228 dst[i][BCOMP] = ((s[i] ) & 0x1f) * (1.0F / 31.0F);
229 dst[i][ACOMP] = 1.0F;
234 unpack_RGB565_REV(const void *src, GLfloat dst[][4], GLuint n)
240 dst[i][RCOMP] = UBYTE_TO_FLOAT( ((t >> 8) & 0xf8) | ((t >> 13) & 0x7) );
241 dst[i][GCOMP] = UBYTE_TO_FLOAT( ((t >> 3) & 0xfc) | ((t >> 9) & 0x3) );
242 dst[i][BCOMP] = UBYTE_TO_FLOAT( ((t << 3) & 0xf8) | ((t >> 2) & 0x7) );
243 dst[i][ACOMP] = 1.0F;
248 unpack_ARGB4444(const void *src, GLfloat dst[][4], GLuint n)
253 dst[i][RCOMP] = ((s[i] >> 8) & 0xf) * (1.0F / 15.0F);
254 dst[i][GCOMP] = ((s[i] >> 4) & 0xf) * (1.0F / 15.0F);
255 dst[i][BCOMP] = ((s[i] ) & 0xf) * (1.0F / 15.0F);
256 dst[i][ACOMP] = ((s[i] >> 12) & 0xf) * (1.0F / 15.0F);
261 unpack_ARGB4444_REV(const void *src, GLfloat dst[][4], GLuint n)
266 dst[i][RCOMP] = ((s[i] ) & 0xf) * (1.0F / 15.0F);
267 dst[i][GCOMP] = ((s[i] >> 12) & 0xf) * (1.0F / 15.0F);
268 dst[i][BCOMP] = ((s[i] >> 8) & 0xf) * (1.0F / 15.0F);
269 dst[i][ACOMP] = ((s[i] >> 4) & 0xf) * (1.0F / 15.0F);
274 unpack_RGBA5551(const void *src, GLfloat dst[][4], GLuint n)
279 dst[i][RCOMP] = ((s[i] >> 11) & 0x1f) * (1.0F / 31.0F);
280 dst[i][GCOMP] = ((s[i] >> 6) & 0x1f) * (1.0F / 31.0F);
281 dst[i][BCOMP] = ((s[i] >> 1) & 0x1f) * (1.0F / 31.0F);
282 dst[i][ACOMP] = ((s[i] ) & 0x01) * 1.0F;
287 unpack_ARGB1555(const void *src, GLfloat dst[][4], GLuint n)
292 dst[i][RCOMP] = ((s[i] >> 10) & 0x1f) * (1.0F / 31.0F);
293 dst[i][GCOMP] = ((s[i] >> 5) & 0x1f) * (1.0F / 31.0F);
294 dst[i][BCOMP] = ((s[i] >> 0) & 0x1f) * (1.0F / 31.0F);
295 dst[i][ACOMP] = ((s[i] >> 15) & 0x01) * 1.0F;
300 unpack_ARGB1555_REV(const void *src, GLfloat dst[][4], GLuint n)
306 dst[i][RCOMP] = ((tmp >> 10) & 0x1f) * (1.0F / 31.0F);
307 dst[i][GCOMP] = ((tmp >> 5) & 0x1f) * (1.0F / 31.0F);
308 dst[i][BCOMP] = ((tmp >> 0) & 0x1f) * (1.0F / 31.0F);
309 dst[i][ACOMP] = ((tmp >> 15) & 0x01) * 1.0F;
314 unpack_AL44(const void *src, GLfloat dst[][4], GLuint n)
319 dst[i][RCOMP] =
320 dst[i][GCOMP] =
321 dst[i][BCOMP] = (s[i] & 0xf) * (1.0F / 15.0F);
322 dst[i][ACOMP] = ((s[i] >> 4) & 0xf) * (1.0F / 15.0F);
327 unpack_AL88(const void *src, GLfloat dst[][4], GLuint n)
332 dst[i][RCOMP] =
333 dst[i][GCOMP] =
334 dst[i][BCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff );
335 dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] >> 8 );
340 unpack_AL88_REV(const void *src, GLfloat dst[][4], GLuint n)
345 dst[i][RCOMP] =
346 dst[i][GCOMP] =
347 dst[i][BCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 );
348 dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] & 0xff );
353 unpack_AL1616(const void *src, GLfloat dst[][4], GLuint n)
358 dst[i][RCOMP] =
359 dst[i][GCOMP] =
360 dst[i][BCOMP] = USHORT_TO_FLOAT( s[i] & 0xffff );
361 dst[i][ACOMP] = USHORT_TO_FLOAT( s[i] >> 16 );
366 unpack_AL1616_REV(const void *src, GLfloat dst[][4], GLuint n)
371 dst[i][RCOMP] =
372 dst[i][GCOMP] =
373 dst[i][BCOMP] = USHORT_TO_FLOAT( s[i] >> 16 );
374 dst[i][ACOMP] = USHORT_TO_FLOAT( s[i] & 0xffff );
379 unpack_RGB332(const void *src, GLfloat dst[][4], GLuint n)
384 dst[i][RCOMP] = ((s[i] >> 5) & 0x7) * (1.0F / 7.0F);
385 dst[i][GCOMP] = ((s[i] >> 2) & 0x7) * (1.0F / 7.0F);
386 dst[i][BCOMP] = ((s[i] ) & 0x3) * (1.0F / 3.0F);
387 dst[i][ACOMP] = 1.0F;
393 unpack_A8(const void *src, GLfloat dst[][4], GLuint n)
398 dst[i][RCOMP] =
399 dst[i][GCOMP] =
400 dst[i][BCOMP] = 0.0F;
401 dst[i][ACOMP] = UBYTE_TO_FLOAT(s[i]);
406 unpack_A16(const void *src, GLfloat dst[][4], GLuint n)
411 dst[i][RCOMP] =
412 dst[i][GCOMP] =
413 dst[i][BCOMP] = 0.0F;
414 dst[i][ACOMP] = USHORT_TO_FLOAT(s[i]);
419 unpack_L8(const void *src, GLfloat dst[][4], GLuint n)
424 dst[i][RCOMP] =
425 dst[i][GCOMP] =
426 dst[i][BCOMP] = UBYTE_TO_FLOAT(s[i]);
427 dst[i][ACOMP] = 1.0F;
432 unpack_L16(const void *src, GLfloat dst[][4], GLuint n)
437 dst[i][RCOMP] =
438 dst[i][GCOMP] =
439 dst[i][BCOMP] = USHORT_TO_FLOAT(s[i]);
440 dst[i][ACOMP] = 1.0F;
445 unpack_I8(const void *src, GLfloat dst[][4], GLuint n)
450 dst[i][RCOMP] =
451 dst[i][GCOMP] =
452 dst[i][BCOMP] =
453 dst[i][ACOMP] = UBYTE_TO_FLOAT(s[i]);
458 unpack_I16(const void *src, GLfloat dst[][4], GLuint n)
463 dst[i][RCOMP] =
464 dst[i][GCOMP] =
465 dst[i][BCOMP] =
466 dst[i][ACOMP] = USHORT_TO_FLOAT(s[i]);
471 unpack_YCBCR(const void *src, GLfloat dst[][4], GLuint n)
488 dst[i][RCOMP] = CLAMP(r, 0.0F, 1.0F);
489 dst[i][GCOMP] = CLAMP(g, 0.0F, 1.0F);
490 dst[i][BCOMP] = CLAMP(b, 0.0F, 1.0F);
491 dst[i][ACOMP] = 1.0F;
496 unpack_YCBCR_REV(const void *src, GLfloat dst[][4], GLuint n)
513 dst[i][RCOMP] = CLAMP(r, 0.0F, 1.0F);
514 dst[i][GCOMP] = CLAMP(g, 0.0F, 1.0F);
515 dst[i][BCOMP] = CLAMP(b, 0.0F, 1.0F);
516 dst[i][ACOMP] = 1.0F;
521 unpack_R8(const void *src, GLfloat dst[][4], GLuint n)
526 dst[i][0] = UBYTE_TO_FLOAT(s[i]);
527 dst[i][1] =
528 dst[i][2] = 0.0F;
529 dst[i][3] = 1.0F;
534 unpack_GR88(const void *src, GLfloat dst[][4], GLuint n)
539 dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff );
540 dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 );
541 dst[i][BCOMP] = 0.0;
542 dst[i][ACOMP] = 1.0;
547 unpack_RG88(const void *src, GLfloat dst[][4], GLuint n)
552 dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 );
553 dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff );
554 dst[i][BCOMP] = 0.0;
555 dst[i][ACOMP] = 1.0;
560 unpack_R16(const void *src, GLfloat dst[][4], GLuint n)
565 dst[i][RCOMP] = USHORT_TO_FLOAT(s[i]);
566 dst[i][GCOMP] = 0.0;
567 dst[i][BCOMP] = 0.0;
568 dst[i][ACOMP] = 1.0;
573 unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n)
578 dst[i][RCOMP] = USHORT_TO_FLOAT( s[i] & 0xffff );
579 dst[i][GCOMP] = USHORT_TO_FLOAT( s[i] >> 16 );
580 dst[i][BCOMP] = 0.0;
581 dst[i][ACOMP] = 1.0;
586 unpack_RG1616_REV(const void *src, GLfloat dst[][4], GLuint n)
591 dst[i][RCOMP] = USHORT_TO_FLOAT( s[i] >> 16 );
592 dst[i][GCOMP] = USHORT_TO_FLOAT( s[i] & 0xffff );
593 dst[i][BCOMP] = 0.0;
594 dst[i][ACOMP] = 1.0;
599 unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n)
604 dst[i][RCOMP] = ((s[i] >> 20) & 0x3ff) * (1.0F / 1023.0F);
605 dst[i][GCOMP] = ((s[i] >> 10) & 0x3ff) * (1.0F / 1023.0F);
606 dst[i][BCOMP] = ((s[i] >> 0) & 0x3ff) * (1.0F / 1023.0F);
607 dst[i][ACOMP] = ((s[i] >> 30) & 0x03) * (1.0F / 3.0F);
613 unpack_ABGR2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
618 dst[i][RCOMP] = (GLfloat)((s[i] >> 0) & 0x3ff);
619 dst[i][GCOMP] = (GLfloat)((s[i] >> 10) & 0x3ff);
620 dst[i][BCOMP] = (GLfloat)((s[i] >> 20) & 0x3ff);
621 dst[i][ACOMP] = (GLfloat)((s[i] >> 30) & 0x03);
627 unpack_Z24_S8(const void *src, GLfloat dst[][4], GLuint n)
634 dst[i][0] =
635 dst[i][1] =
636 dst[i][2] = (s[i] >> 8) * scale;
637 dst[i][3] = 1.0F;
638 ASSERT(dst[i][0] >= 0.0F);
639 ASSERT(dst[i][0] <= 1.0F);
644 unpack_S8_Z24(const void *src, GLfloat dst[][4], GLuint n)
651 dst[i][0] =
652 dst[i][1] =
653 dst[i][2] = (s[i] & 0x00ffffff) * scale;
654 dst[i][3] = 1.0F;
655 ASSERT(dst[i][0] >= 0.0F);
656 ASSERT(dst[i][0] <= 1.0F);
661 unpack_Z16(const void *src, GLfloat dst[][4], GLuint n)
666 dst[i][0] =
667 dst[i][1] =
668 dst[i][2] = s[i] * (1.0F / 65535.0F);
669 dst[i][3] = 1.0F;
674 unpack_X8_Z24(const void *src, GLfloat dst[][4], GLuint n)
676 unpack_S8_Z24(src, dst, n);
680 unpack_Z24_X8(const void *src, GLfloat dst[][4], GLuint n)
682 unpack_Z24_S8(src, dst, n);
686 unpack_Z32(const void *src, GLfloat dst[][4], GLuint n)
691 dst[i][0] =
692 dst[i][1] =
693 dst[i][2] = s[i] * (1.0F / 0xffffffff);
694 dst[i][3] = 1.0F;
699 unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
704 dst[i][0] =
705 dst[i][1] =
706 dst[i][2] = s[i * 2];
707 dst[i][3] = 1.0F;
712 unpack_Z32_FLOAT_X24S8(const void *src, GLfloat dst[][4], GLuint n)
717 dst[i][0] =
718 dst[i][1] =
719 dst[i][2] = s[i];
720 dst[i][3] = 1.0F;
726 unpack_S8(const void *src, GLfloat dst[][4], GLuint n)
731 dst[i][0] =
732 dst[i][1] =
733 dst[i][2] = 0.0F;
734 dst[i][3] = 1.0F;
740 unpack_SRGB8(const void *src, GLfloat dst[][4], GLuint n)
745 dst[i][RCOMP] = nonlinear_to_linear(s[i*3+2]);
746 dst[i][GCOMP] = nonlinear_to_linear(s[i*3+1]);
747 dst[i][BCOMP] = nonlinear_to_linear(s[i*3+0]);
748 dst[i][ACOMP] = 1.0F;
753 unpack_SRGBA8(const void *src, GLfloat dst[][4], GLuint n)
758 dst[i][RCOMP] = nonlinear_to_linear( (s[i] >> 24) );
759 dst[i][GCOMP] = nonlinear_to_linear( (s[i] >> 16) & 0xff );
760 dst[i][BCOMP] = nonlinear_to_linear( (s[i] >> 8) & 0xff );
761 dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] & 0xff ); /* linear! */
766 unpack_SARGB8(const void *src, GLfloat dst[][4], GLuint n)
771 dst[i][RCOMP] = nonlinear_to_linear( (s[i] >> 16) & 0xff );
772 dst[i][GCOMP] = nonlinear_to_linear( (s[i] >> 8) & 0xff );
773 dst[i][BCOMP] = nonlinear_to_linear( (s[i] ) & 0xff );
774 dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] >> 24 ); /* linear! */
779 unpack_SL8(const void *src, GLfloat dst[][4], GLuint n)
784 dst[i][RCOMP] =
785 dst[i][GCOMP] =
786 dst[i][BCOMP] = nonlinear_to_linear(s[i]);
787 dst[i][ACOMP] = 1.0F;
792 unpack_SLA8(const void *src, GLfloat dst[][4], GLuint n)
797 dst[i][RCOMP] =
798 dst[i][GCOMP] =
799 dst[i][BCOMP] = nonlinear_to_linear(s[i] & 0xff);
800 dst[i][ACOMP] = UBYTE_TO_FLOAT(s[i] >> 8); /* linear! */
805 unpack_SRGB_DXT1(const void *src, GLfloat dst[][4], GLuint n)
810 unpack_SRGBA_DXT1(const void *src, GLfloat dst[][4], GLuint n)
815 unpack_SRGBA_DXT3(const void *src, GLfloat dst[][4], GLuint n)
820 unpack_SRGBA_DXT5(const void *src, GLfloat dst[][4], GLuint n)
825 unpack_RGB_FXT1(const void *src, GLfloat dst[][4], GLuint n)
830 unpack_RGBA_FXT1(const void *src, GLfloat dst[][4], GLuint n)
835 unpack_RGB_DXT1(const void *src, GLfloat dst[][4], GLuint n)
840 unpack_RGBA_DXT1(const void *src, GLfloat dst[][4], GLuint n)
845 unpack_RGBA_DXT3(const void *src, GLfloat dst[][4], GLuint n)
850 unpack_RGBA_DXT5(const void *src, GLfloat dst[][4], GLuint n)
856 unpack_RGBA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
861 dst[i][RCOMP] = s[i*4+0];
862 dst[i][GCOMP] = s[i*4+1];
863 dst[i][BCOMP] = s[i*4+2];
864 dst[i][ACOMP] = s[i*4+3];
869 unpack_RGBA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
874 dst[i][RCOMP] = _mesa_half_to_float(s[i*4+0]);
875 dst[i][GCOMP] = _mesa_half_to_float(s[i*4+1]);
876 dst[i][BCOMP] = _mesa_half_to_float(s[i*4+2]);
877 dst[i][ACOMP] = _mesa_half_to_float(s[i*4+3]);
882 unpack_RGB_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
887 dst[i][RCOMP] = s[i*3+0];
888 dst[i][GCOMP] = s[i*3+1];
889 dst[i][BCOMP] = s[i*3+2];
890 dst[i][ACOMP] = 1.0F;
895 unpack_RGB_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
900 dst[i][RCOMP] = _mesa_half_to_float(s[i*3+0]);
901 dst[i][GCOMP] = _mesa_half_to_float(s[i*3+1]);
902 dst[i][BCOMP] = _mesa_half_to_float(s[i*3+2]);
903 dst[i][ACOMP] = 1.0F;
908 unpack_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
913 dst[i][RCOMP] =
914 dst[i][GCOMP] =
915 dst[i][BCOMP] = 0.0F;
916 dst[i][ACOMP] = s[i];
921 unpack_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
926 dst[i][RCOMP] =
927 dst[i][GCOMP] =
928 dst[i][BCOMP] = 0.0F;
929 dst[i][ACOMP] = _mesa_half_to_float(s[i]);
934 unpack_LUMINANCE_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
939 dst[i][RCOMP] =
940 dst[i][GCOMP] =
941 dst[i][BCOMP] = s[i];
942 dst[i][ACOMP] = 1.0F;
947 unpack_LUMINANCE_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
952 dst[i][RCOMP] =
953 dst[i][GCOMP] =
954 dst[i][BCOMP] = _mesa_half_to_float(s[i]);
955 dst[i][ACOMP] = 1.0F;
960 unpack_LUMINANCE_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
965 dst[i][RCOMP] =
966 dst[i][GCOMP] =
967 dst[i][BCOMP] = s[i*2+0];
968 dst[i][ACOMP] = s[i*2+1];
973 unpack_LUMINANCE_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
978 dst[i][RCOMP] =
979 dst[i][GCOMP] =
980 dst[i][BCOMP] = _mesa_half_to_float(s[i*2+0]);
981 dst[i][ACOMP] = _mesa_half_to_float(s[i*2+1]);
986 unpack_INTENSITY_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
991 dst[i][RCOMP] =
992 dst[i][GCOMP] =
993 dst[i][BCOMP] =
994 dst[i][ACOMP] = s[i];
999 unpack_INTENSITY_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
1004 dst[i][RCOMP] =
1005 dst[i][GCOMP] =
1006 dst[i][BCOMP] =
1007 dst[i][ACOMP] = _mesa_half_to_float(s[i]);
1012 unpack_R_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
1017 dst[i][RCOMP] = s[i];
1018 dst[i][GCOMP] = 0.0F;
1019 dst[i][BCOMP] = 0.0F;
1020 dst[i][ACOMP] = 1.0F;
1025 unpack_R_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
1030 dst[i][RCOMP] = _mesa_half_to_float(s[i]);
1031 dst[i][GCOMP] = 0.0F;
1032 dst[i][BCOMP] = 0.0F;
1033 dst[i][ACOMP] = 1.0F;
1038 unpack_RG_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
1043 dst[i][RCOMP] = s[i*2+0];
1044 dst[i][GCOMP] = s[i*2+1];
1045 dst[i][BCOMP] = 0.0F;
1046 dst[i][ACOMP] = 1.0F;
1051 unpack_RG_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
1056 dst[i][RCOMP] = _mesa_half_to_float(s[i*2+0]);
1057 dst[i][GCOMP] = _mesa_half_to_float(s[i*2+1]);
1058 dst[i][BCOMP] = 0.0F;
1059 dst[i][ACOMP] = 1.0F;
1065 unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n)
1070 dst[i][RCOMP] = (GLfloat) s[i*4+0];
1071 dst[i][GCOMP] = (GLfloat) s[i*4+1];
1072 dst[i][BCOMP] = (GLfloat) s[i*4+2];
1073 dst[i][ACOMP] = (GLfloat) s[i*4+3];
1078 unpack_RGBA_INT16(const void *src, GLfloat dst[][4], GLuint n)
1083 dst[i][RCOMP] = (GLfloat) s[i*4+0];
1084 dst[i][GCOMP] = (GLfloat) s[i*4+1];
1085 dst[i][BCOMP] = (GLfloat) s[i*4+2];
1086 dst[i][ACOMP] = (GLfloat) s[i*4+3];
1091 unpack_RGBA_INT32(const void *src, GLfloat dst[][4], GLuint n)
1096 dst[i][RCOMP] = (GLfloat) s[i*4+0];
1097 dst[i][GCOMP] = (GLfloat) s[i*4+1];
1098 dst[i][BCOMP] = (GLfloat) s[i*4+2];
1099 dst[i][ACOMP] = (GLfloat) s[i*4+3];
1104 unpack_RGBA_UINT8(const void *src, GLfloat dst[][4], GLuint n)
1109 dst[i][RCOMP] = (GLfloat) s[i*4+0];
1110 dst[i][GCOMP] = (GLfloat) s[i*4+1];
1111 dst[i][BCOMP] = (GLfloat) s[i*4+2];
1112 dst[i][ACOMP] = (GLfloat) s[i*4+3];
1117 unpack_RGBA_UINT16(const void *src, GLfloat dst[][4], GLuint n)
1122 dst[i][RCOMP] = (GLfloat) s[i*4+0];
1123 dst[i][GCOMP] = (GLfloat) s[i*4+1];
1124 dst[i][BCOMP] = (GLfloat) s[i*4+2];
1125 dst[i][ACOMP] = (GLfloat) s[i*4+3];
1130 unpack_RGBA_UINT32(const void *src, GLfloat dst[][4], GLuint n)
1135 dst[i][RCOMP] = (GLfloat) s[i*4+0];
1136 dst[i][GCOMP] = (GLfloat) s[i*4+1];
1137 dst[i][BCOMP] = (GLfloat) s[i*4+2];
1138 dst[i][ACOMP] = (GLfloat) s[i*4+3];
1143 unpack_DUDV8(const void *src, GLfloat dst[][4], GLuint n)
1148 dst[i][RCOMP] = BYTE_TO_FLOAT(s[i*2+0]);
1149 dst[i][GCOMP] = BYTE_TO_FLOAT(s[i*2+1]);
1150 dst[i][BCOMP] = 0;
1151 dst[i][ACOMP] = 0;
1156 unpack_SIGNED_R8(const void *src, GLfloat dst[][4], GLuint n)
1161 dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( s[i] );
1162 dst[i][GCOMP] = 0.0F;
1163 dst[i][BCOMP] = 0.0F;
1164 dst[i][ACOMP] = 1.0F;
1169 unpack_SIGNED_RG88_REV(const void *src, GLfloat dst[][4], GLuint n)
1174 dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] & 0xff) );
1175 dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) );
1176 dst[i][BCOMP] = 0.0F;
1177 dst[i][ACOMP] = 1.0F;
1182 unpack_SIGNED_RGBX8888(const void *src, GLfloat dst[][4], GLuint n)
1187 dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) );
1188 dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) );
1189 dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) );
1190 dst[i][ACOMP] = 1.0f;
1195 unpack_SIGNED_RGBA8888(const void *src, GLfloat dst[][4], GLuint n)
1200 dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) );
1201 dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) );
1202 dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) );
1203 dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] ) );
1208 unpack_SIGNED_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n)
1213 dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] ) );
1214 dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) );
1215 dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) );
1216 dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) );
1221 unpack_SIGNED_R16(const void *src, GLfloat dst[][4], GLuint n)
1226 dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( s[i] );
1227 dst[i][GCOMP] = 0.0F;
1228 dst[i][BCOMP] = 0.0F;
1229 dst[i][ACOMP] = 1.0F;
1234 unpack_SIGNED_GR1616(const void *src, GLfloat dst[][4], GLuint n)
1239 dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( (GLshort) (s[i] & 0xffff) );
1240 dst[i][GCOMP] = SHORT_TO_FLOAT_TEX( (GLshort) (s[i] >> 16) );
1241 dst[i][BCOMP] = 0.0F;
1242 dst[i][ACOMP] = 1.0F;
1247 unpack_SIGNED_RGB_16(const void *src, GLfloat dst[][4], GLuint n)
1252 dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( s[i*3+0] );
1253 dst[i][GCOMP] = SHORT_TO_FLOAT_TEX( s[i*3+1] );
1254 dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i*3+2] );
1255 dst[i][ACOMP] = 1.0F;
1260 unpack_SIGNED_RGBA_16(const void *src, GLfloat dst[][4], GLuint n)
1265 dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( s[i*4+0] );
1266 dst[i][GCOMP] = SHORT_TO_FLOAT_TEX( s[i*4+1] );
1267 dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i*4+2] );
1268 dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i*4+3] );
1273 unpack_RGBA_16(const void *src, GLfloat dst[][4], GLuint n)
1278 dst[i][RCOMP] = USHORT_TO_FLOAT( s[i*4+0] );
1279 dst[i][GCOMP] = USHORT_TO_FLOAT( s[i*4+1] );
1280 dst[i][BCOMP] = USHORT_TO_FLOAT( s[i*4+2] );
1281 dst[i][ACOMP] = USHORT_TO_FLOAT( s[i*4+3] );
1286 unpack_RED_RGTC1(const void *src, GLfloat dst[][4], GLuint n)
1292 unpack_SIGNED_RED_RGTC1(const void *src, GLfloat dst[][4], GLuint n)
1298 unpack_RG_RGTC2(const void *src, GLfloat dst[][4], GLuint n)
1304 unpack_SIGNED_RG_RGTC2(const void *src, GLfloat dst[][4], GLuint n)
1310 unpack_L_LATC1(const void *src, GLfloat dst[][4], GLuint n)
1316 unpack_SIGNED_L_LATC1(const void *src, GLfloat dst[][4], GLuint n)
1322 unpack_LA_LATC2(const void *src, GLfloat dst[][4], GLuint n)
1328 unpack_SIGNED_LA_LATC2(const void *src, GLfloat dst[][4], GLuint n)
1334 unpack_ETC1_RGB8(const void *src, GLfloat dst[][4], GLuint n)
1340 unpack_SIGNED_A8(const void *src, GLfloat dst[][4], GLuint n)
1345 dst[i][RCOMP] = 0.0F;
1346 dst[i][GCOMP] = 0.0F;
1347 dst[i][BCOMP] = 0.0F;
1348 dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( s[i] );
1353 unpack_SIGNED_L8(const void *src, GLfloat dst[][4], GLuint n)
1358 dst[i][RCOMP] =
1359 dst[i][GCOMP] =
1360 dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( s[i] );
1361 dst[i][ACOMP] = 1.0F;
1366 unpack_SIGNED_AL88(const void *src, GLfloat dst[][4], GLuint n)
1371 dst[i][RCOMP] =
1372 dst[i][GCOMP] =
1373 dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] & 0xff) );
1374 dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) );
1379 unpack_SIGNED_I8(const void *src, GLfloat dst[][4], GLuint n)
1384 dst[i][RCOMP] =
1385 dst[i][GCOMP] =
1386 dst[i][BCOMP] =
1387 dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( s[i] );
1392 unpack_SIGNED_A16(const void *src, GLfloat dst[][4], GLuint n)
1397 dst[i][RCOMP] = 0.0F;
1398 dst[i][GCOMP] = 0.0F;
1399 dst[i][BCOMP] = 0.0F;
1400 dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i] );
1405 unpack_SIGNED_L16(const void *src, GLfloat dst[][4], GLuint n)
1410 dst[i][RCOMP] =
1411 dst[i][GCOMP] =
1412 dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i] );
1413 dst[i][ACOMP] = 1.0F;
1418 unpack_SIGNED_AL1616(const void *src, GLfloat dst[][4], GLuint n)
1423 dst[i][RCOMP] =
1424 dst[i][GCOMP] =
1425 dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i*2+0] );
1426 dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i*2+1] );
1431 unpack_SIGNED_I16(const void *src, GLfloat dst[][4], GLuint n)
1436 dst[i][RCOMP] =
1437 dst[i][GCOMP] =
1438 dst[i][BCOMP] =
1439 dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i] );
1444 unpack_RGB9_E5_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
1449 rgb9e5_to_float3(s[i], dst[i]);
1450 dst[i][ACOMP] = 1.0F;
1455 unpack_R11_G11_B10_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
1460 r11g11b10f_to_float3(s[i], dst[i]);
1461 dst[i][ACOMP] = 1.0F;
1621 const void *src, GLfloat dst[][4])
1624 unpack(src, dst, n);
1634 unpack_ubyte_RGBA8888(const void *src, GLubyte dst[][4], GLuint n)
1639 dst[i][RCOMP] = (s[i] >> 24);
1640 dst[i][GCOMP] = (s[i] >> 16) & 0xff;
1641 dst[i][BCOMP] = (s[i] >> 8) & 0xff;
1642 dst[i][ACOMP] = (s[i] ) & 0xff;
1647 unpack_ubyte_RGBA8888_REV(const void *src, GLubyte dst[][4], GLuint n)
1652 dst[i][RCOMP] = (s[i] ) & 0xff;
1653 dst[i][GCOMP] = (s[i] >> 8) & 0xff;
1654 dst[i][BCOMP] = (s[i] >> 16) & 0xff;
1655 dst[i][ACOMP] = (s[i] >> 24);
1660 unpack_ubyte_ARGB8888(const void *src, GLubyte dst[][4], GLuint n)
1665 dst[i][RCOMP] = (s[i] >> 16) & 0xff;
1666 dst[i][GCOMP] = (s[i] >> 8) & 0xff;
1667 dst[i][BCOMP] = (s[i] ) & 0xff;
1668 dst[i][ACOMP] = (s[i] >> 24);
1673 unpack_ubyte_ARGB8888_REV(const void *src, GLubyte dst[][4], GLuint n)
1678 dst[i][RCOMP] = (s[i] >> 8) & 0xff;
1679 dst[i][GCOMP] = (s[i] >> 16) & 0xff;
1680 dst[i][BCOMP] = (s[i] >> 24);
1681 dst[i][ACOMP] = (s[i] ) & 0xff;
1686 unpack_ubyte_RGBX8888(const void *src, GLubyte dst[][4], GLuint n)
1691 dst[i][RCOMP] = (s[i] >> 24);
1692 dst[i][GCOMP] = (s[i] >> 16) & 0xff;
1693 dst[i][BCOMP] = (s[i] >> 8) & 0xff;
1694 dst[i][ACOMP] = 0xff;
1699 unpack_ubyte_RGBX8888_REV(const void *src, GLubyte dst[][4], GLuint n)
1704 dst[i][RCOMP] = (s[i] ) & 0xff;
1705 dst[i][GCOMP] = (s[i] >> 8) & 0xff;
1706 dst[i][BCOMP] = (s[i] >> 16) & 0xff;
1707 dst[i][ACOMP] = 0xff;
1712 unpack_ubyte_XRGB8888(const void *src, GLubyte dst[][4], GLuint n)
1717 dst[i][RCOMP] = (s[i] >> 16) & 0xff;
1718 dst[i][GCOMP] = (s[i] >> 8) & 0xff;
1719 dst[i][BCOMP] = (s[i] ) & 0xff;
1720 dst[i][ACOMP] = 0xff;
1725 unpack_ubyte_XRGB8888_REV(const void *src, GLubyte dst[][4], GLuint n)
1730 dst[i][RCOMP] = (s[i] >> 8) & 0xff;
1731 dst[i][GCOMP] = (s[i] >> 16) & 0xff;
1732 dst[i][BCOMP] = (s[i] >> 24);
1733 dst[i][ACOMP] = 0xff;
1738 unpack_ubyte_RGB888(const void *src, GLubyte dst[][4], GLuint n)
1743 dst[i][RCOMP] = s[i*3+2];
1744 dst[i][GCOMP] = s[i*3+1];
1745 dst[i][BCOMP] = s[i*3+0];
1746 dst[i][ACOMP] = 0xff;
1751 unpack_ubyte_BGR888(const void *src, GLubyte dst[][4], GLuint n)
1756 dst[i][RCOMP] = s[i*3+0];
1757 dst[i][GCOMP] = s[i*3+1];
1758 dst[i][BCOMP] = s[i*3+2];
1759 dst[i][ACOMP] = 0xff;
1764 unpack_ubyte_RGB565(const void *src, GLubyte dst[][4], GLuint n)
1769 dst[i][RCOMP] = EXPAND_5_8((s[i] >> 11) & 0x1f);
1770 dst[i][GCOMP] = EXPAND_6_8((s[i] >> 5 ) & 0x3f);
1771 dst[i][BCOMP] = EXPAND_5_8( s[i] & 0x1f);
1772 dst[i][ACOMP] = 0xff;
1777 unpack_ubyte_RGB565_REV(const void *src, GLubyte dst[][4], GLuint n)
1783 dst[i][RCOMP] = EXPAND_5_8((t >> 11) & 0x1f);
1784 dst[i][GCOMP] = EXPAND_6_8((t >> 5 ) & 0x3f);
1785 dst[i][BCOMP] = EXPAND_5_8( t & 0x1f);
1786 dst[i][ACOMP] = 0xff;
1791 unpack_ubyte_ARGB4444(const void *src, GLubyte dst[][4], GLuint n)
1796 dst[i][RCOMP] = EXPAND_4_8((s[i] >> 8) & 0xf);
1797 dst[i][GCOMP] = EXPAND_4_8((s[i] >> 4) & 0xf);
1798 dst[i][BCOMP] = EXPAND_4_8((s[i] ) & 0xf);
1799 dst[i][ACOMP] = EXPAND_4_8((s[i] >> 12) & 0xf);
1804 unpack_ubyte_ARGB4444_REV(const void *src, GLubyte dst[][4], GLuint n)
1809 dst[i][RCOMP] = EXPAND_4_8((s[i] ) & 0xf);
1810 dst[i][GCOMP] = EXPAND_4_8((s[i] >> 12) & 0xf);
1811 dst[i][BCOMP] = EXPAND_4_8((s[i] >> 8) & 0xf);
1812 dst[i][ACOMP] = EXPAND_4_8((s[i] >> 4) & 0xf);
1817 unpack_ubyte_RGBA5551(const void *src, GLubyte dst[][4], GLuint n)
1822 dst[i][RCOMP] = EXPAND_5_8((s[i] >> 11) & 0x1f);
1823 dst[i][GCOMP] = EXPAND_5_8((s[i] >> 6) & 0x1f);
1824 dst[i][BCOMP] = EXPAND_5_8((s[i] >> 1) & 0x1f);
1825 dst[i][ACOMP] = EXPAND_1_8((s[i] ) & 0x01);
1830 unpack_ubyte_ARGB1555(const void *src, GLubyte dst[][4], GLuint n)
1835 dst[i][RCOMP] = EXPAND_5_8((s[i] >> 10) & 0x1f);
1836 dst[i][GCOMP] = EXPAND_5_8((s[i] >> 5) & 0x1f);
1837 dst[i][BCOMP] = EXPAND_5_8((s[i] >> 0) & 0x1f);
1838 dst[i][ACOMP] = EXPAND_1_8((s[i] >> 15) & 0x01);
1843 unpack_ubyte_ARGB1555_REV(const void *src, GLubyte dst[][4], GLuint n)
1849 dst[i][RCOMP] = EXPAND_5_8((tmp >> 10) & 0x1f);
1850 dst[i][GCOMP] = EXPAND_5_8((tmp >> 5) & 0x1f);
1851 dst[i][BCOMP] = EXPAND_5_8((tmp >> 0) & 0x1f);
1852 dst[i][ACOMP] = EXPAND_1_8((tmp >> 15) & 0x01);
1857 unpack_ubyte_AL44(const void *src, GLubyte dst[][4], GLuint n)
1862 dst[i][RCOMP] =
1863 dst[i][GCOMP] =
1864 dst[i][BCOMP] = EXPAND_4_8(s[i] & 0xf);
1865 dst[i][ACOMP] = EXPAND_4_8(s[i] >> 4);
1870 unpack_ubyte_AL88(const void *src, GLubyte dst[][4], GLuint n)
1875 dst[i][RCOMP] =
1876 dst[i][GCOMP] =
1877 dst[i][BCOMP] = EXPAND_4_8(s[i] & 0xff);
1878 dst[i][ACOMP] = EXPAND_4_8(s[i] >> 8);
1883 unpack_ubyte_AL88_REV(const void *src, GLubyte dst[][4], GLuint n)
1888 dst[i][RCOMP] =
1889 dst[i][GCOMP] =
1890 dst[i][BCOMP] = EXPAND_4_8(s[i] >> 8);
1891 dst[i][ACOMP] = EXPAND_4_8(s[i] & 0xff);
1896 unpack_ubyte_RGB332(const void *src, GLubyte dst[][4], GLuint n)
1901 dst[i][RCOMP] = EXPAND_3_8((s[i] >> 5) & 0x7);
1902 dst[i][GCOMP] = EXPAND_3_8((s[i] >> 2) & 0x7);
1903 dst[i][BCOMP] = EXPAND_2_8((s[i] ) & 0x3);
1904 dst[i][ACOMP] = 0xff;
1909 unpack_ubyte_A8(const void *src, GLubyte dst[][4], GLuint n)
1914 dst[i][RCOMP] =
1915 dst[i][GCOMP] =
1916 dst[i][BCOMP] = 0;
1917 dst[i][ACOMP] = s[i];
1922 unpack_ubyte_L8(const void *src, GLubyte dst[][4], GLuint n)
1927 dst[i][RCOMP] =
1928 dst[i][GCOMP] =
1929 dst[i][BCOMP] = s[i];
1930 dst[i][ACOMP] = 0xff;
1936 unpack_ubyte_I8(const void *src, GLubyte dst[][4], GLuint n)
1941 dst[i][RCOMP] =
1942 dst[i][GCOMP] =
1943 dst[i][BCOMP] =
1944 dst[i][ACOMP] = s[i];
1949 unpack_ubyte_R8(const void *src, GLubyte dst[][4], GLuint n)
1954 dst[i][0] = s[i];
1955 dst[i][1] =
1956 dst[i][2] = 0;
1957 dst[i][3] = 0xff;
1962 unpack_ubyte_GR88(const void *src, GLubyte dst[][4], GLuint n)
1967 dst[i][RCOMP] = s[i] & 0xff;
1968 dst[i][GCOMP] = s[i] >> 8;
1969 dst[i][BCOMP] = 0;
1970 dst[i][ACOMP] = 0xff;
1975 unpack_ubyte_RG88(const void *src, GLubyte dst[][4], GLuint n)
1980 dst[i][RCOMP] = s[i] >> 8;
1981 dst[i][GCOMP] = s[i] & 0xff;
1982 dst[i][BCOMP] = 0;
1983 dst[i][ACOMP] = 0xff;
1994 const void *src, GLubyte dst[][4])
1998 unpack_ubyte_RGBA8888(src, dst, n);
2001 unpack_ubyte_RGBA8888_REV(src, dst, n);
2004 unpack_ubyte_ARGB8888(src, dst, n);
2007 unpack_ubyte_ARGB8888_REV(src, dst, n);
2010 unpack_ubyte_RGBX8888(src, dst, n);
2013 unpack_ubyte_RGBX8888_REV(src, dst, n);
2016 unpack_ubyte_XRGB8888(src, dst, n);
2019 unpack_ubyte_XRGB8888_REV(src, dst, n);
2022 unpack_ubyte_RGB888(src, dst, n);
2025 unpack_ubyte_BGR888(src, dst, n);
2028 unpack_ubyte_RGB565(src, dst, n);
2031 unpack_ubyte_RGB565_REV(src, dst, n);
2034 unpack_ubyte_ARGB4444(src, dst, n);
2037 unpack_ubyte_ARGB4444_REV(src, dst, n);
2040 unpack_ubyte_RGBA5551(src, dst, n);
2043 unpack_ubyte_ARGB1555(src, dst, n);
2046 unpack_ubyte_ARGB1555_REV(src, dst, n);
2049 unpack_ubyte_AL44(src, dst, n);
2052 unpack_ubyte_AL88(src, dst, n);
2055 unpack_ubyte_AL88_REV(src, dst, n);
2058 unpack_ubyte_RGB332(src, dst, n);
2061 unpack_ubyte_A8(src, dst, n);
2064 unpack_ubyte_L8(src, dst, n);
2067 unpack_ubyte_I8(src, dst, n);
2070 unpack_ubyte_R8(src, dst, n);
2073 unpack_ubyte_GR88(src, dst, n);
2076 unpack_ubyte_RG88(src, dst, n);
2086 UNCLAMPED_FLOAT_TO_UBYTE(dst[i][0], tmp[i*4+0]);
2087 UNCLAMPED_FLOAT_TO_UBYTE(dst[i][1], tmp[i*4+1]);
2088 UNCLAMPED_FLOAT_TO_UBYTE(dst[i][2], tmp[i*4+2]);
2089 UNCLAMPED_FLOAT_TO_UBYTE(dst[i][3], tmp[i*4+3]);
2104 unpack_int_rgba_RGBA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2106 memcpy(dst, src, n * 4 * sizeof(GLuint));
2110 unpack_int_rgba_RGBA_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2115 dst[i][0] = src[i * 4 + 0];
2116 dst[i][1] = src[i * 4 + 1];
2117 dst[i][2] = src[i * 4 + 2];
2118 dst[i][3] = src[i * 4 + 3];
2123 unpack_int_rgba_RGBA_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2128 dst[i][0] = src[i * 4 + 0];
2129 dst[i][1] = src[i * 4 + 1];
2130 dst[i][2] = src[i * 4 + 2];
2131 dst[i][3] = src[i * 4 + 3];
2136 unpack_int_rgba_RGBA_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2141 dst[i][0] = src[i * 4 + 0];
2142 dst[i][1] = src[i * 4 + 1];
2143 dst[i][2] = src[i * 4 + 2];
2144 dst[i][3] = src[i * 4 + 3];
2149 unpack_int_rgba_RGBA_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2154 dst[i][0] = src[i * 4 + 0];
2155 dst[i][1] = src[i * 4 + 1];
2156 dst[i][2] = src[i * 4 + 2];
2157 dst[i][3] = src[i * 4 + 3];
2162 unpack_int_rgba_ARGB8888(const GLbyte *src, GLuint dst[][4], GLuint n)
2167 dst[i][RCOMP] = (GLubyte) src[i * 4 + 2];
2168 dst[i][GCOMP] = (GLubyte) src[i * 4 + 1];
2169 dst[i][BCOMP] = (GLubyte) src[i * 4 + 0];
2170 dst[i][ACOMP] = (GLubyte) src[i * 4 + 3];
2175 unpack_int_rgba_XRGB8888(const GLbyte *src, GLuint dst[][4], GLuint n)
2180 dst[i][RCOMP] = (GLubyte) src[i * 4 + 2];
2181 dst[i][GCOMP] = (GLubyte) src[i * 4 + 1];
2182 dst[i][BCOMP] = (GLubyte) src[i * 4 + 0];
2183 dst[i][ACOMP] = (GLubyte) 0xff;
2188 unpack_int_rgba_RGB_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2193 dst[i][0] = src[i * 3 + 0];
2194 dst[i][1] = src[i * 3 + 1];
2195 dst[i][2] = src[i * 3 + 2];
2196 dst[i][3] = 1;
2201 unpack_int_rgba_RGB_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2206 dst[i][0] = src[i * 3 + 0];
2207 dst[i][1] = src[i * 3 + 1];
2208 dst[i][2] = src[i * 3 + 2];
2209 dst[i][3] = 1;
2214 unpack_int_rgba_RGB_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2219 dst[i][0] = src[i * 3 + 0];
2220 dst[i][1] = src[i * 3 + 1];
2221 dst[i][2] = src[i * 3 + 2];
2222 dst[i][3] = 1;
2227 unpack_int_rgba_RGB_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2232 dst[i][0] = src[i * 3 + 0];
2233 dst[i][1] = src[i * 3 + 1];
2234 dst[i][2] = src[i * 3 + 2];
2235 dst[i][3] = 1;
2240 unpack_int_rgba_RGB_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2245 dst[i][0] = src[i * 3 + 0];
2246 dst[i][1] = src[i * 3 + 1];
2247 dst[i][2] = src[i * 3 + 2];
2248 dst[i][3] = 1;
2253 unpack_int_rgba_RG_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2258 dst[i][0] = src[i * 2 + 0];
2259 dst[i][1] = src[i * 2 + 1];
2260 dst[i][2] = 0;
2261 dst[i][3] = 1;
2266 unpack_int_rgba_RG_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2271 dst[i][0] = src[i * 2 + 0];
2272 dst[i][1] = src[i * 2 + 1];
2273 dst[i][2] = 0;
2274 dst[i][3] = 1;
2279 unpack_int_rgba_RG_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2284 dst[i][0] = src[i * 2 + 0];
2285 dst[i][1] = src[i * 2 + 1];
2286 dst[i][2] = 0;
2287 dst[i][3] = 1;
2292 unpack_int_rgba_RG_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2297 dst[i][0] = src[i * 2 + 0];
2298 dst[i][1] = src[i * 2 + 1];
2299 dst[i][2] = 0;
2300 dst[i][3] = 1;
2305 unpack_int_rgba_RG_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2310 dst[i][0] = src[i * 2 + 0];
2311 dst[i][1] = src[i * 2 + 1];
2312 dst[i][2] = 0;
2313 dst[i][3] = 1;
2318 unpack_int_rgba_R_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2323 dst[i][0] = src[i];
2324 dst[i][1] = 0;
2325 dst[i][2] = 0;
2326 dst[i][3] = 1;
2331 unpack_int_rgba_R_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2336 dst[i][0] = src[i];
2337 dst[i][1] = 0;
2338 dst[i][2] = 0;
2339 dst[i][3] = 1;
2344 unpack_int_rgba_R_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2349 dst[i][0] = src[i];
2350 dst[i][1] = 0;
2351 dst[i][2] = 0;
2352 dst[i][3] = 1;
2357 unpack_int_rgba_R_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2362 dst[i][0] = src[i];
2363 dst[i][1] = 0;
2364 dst[i][2] = 0;
2365 dst[i][3] = 1;
2370 unpack_int_rgba_R_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2375 dst[i][0] = src[i];
2376 dst[i][1] = 0;
2377 dst[i][2] = 0;
2378 dst[i][3] = 1;
2383 unpack_int_rgba_ALPHA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2388 dst[i][0] = dst[i][1] = dst[i][2] = 0;
2389 dst[i][3] = src[i];
2394 unpack_int_rgba_ALPHA_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2399 dst[i][0] = dst[i][1] = dst[i][2] = 0;
2400 dst[i][3] = src[i];
2405 unpack_int_rgba_ALPHA_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2410 dst[i][0] = dst[i][1] = dst[i][2] = 0;
2411 dst[i][3] = src[i];
2416 unpack_int_rgba_ALPHA_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2421 dst[i][0] = dst[i][1] = dst[i][2] = 0;
2422 dst[i][3] = src[i];
2427 unpack_int_rgba_ALPHA_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2432 dst[i][0] = dst[i][1] = dst[i][2] = 0;
2433 dst[i][3] = src[i];
2438 unpack_int_rgba_LUMINANCE_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2443 dst[i][0] = dst[i][1] = dst[i][2] = src[i];
2444 dst[i][3] = 1;
2449 unpack_int_rgba_LUMINANCE_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2454 dst[i][0] = dst[i][1] = dst[i][2] = src[i];
2455 dst[i][3] = 1;
2460 unpack_int_rgba_LUMINANCE_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2465 dst[i][0] = dst[i][1] = dst[i][2] = src[i];
2466 dst[i][3] = 1;
2471 unpack_int_rgba_LUMINANCE_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2476 dst[i][0] = dst[i][1] = dst[i][2] = src[i];
2477 dst[i][3] = 1;
2482 unpack_int_rgba_LUMINANCE_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2487 dst[i][0] = dst[i][1] = dst[i][2] = src[i];
2488 dst[i][3] = 1;
2494 unpack_int_rgba_LUMINANCE_ALPHA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2499 dst[i][0] = dst[i][1] = dst[i][2] = src[i * 2 + 0];
2500 dst[i][3] = src[i * 2 + 1];
2505 unpack_int_rgba_LUMINANCE_ALPHA_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2510 dst[i][0] = dst[i][1] = dst[i][2] = src[i * 2 + 0];
2511 dst[i][3] = src[i * 2 + 1];
2516 unpack_int_rgba_LUMINANCE_ALPHA_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2521 dst[i][0] = dst[i][1] = dst[i][2] = src[i * 2 + 0];
2522 dst[i][3] = src[i * 2 + 1];
2527 unpack_int_rgba_LUMINANCE_ALPHA_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2532 dst[i][0] = dst[i][1] = dst[i][2] = src[i * 2 + 0];
2533 dst[i][3] = src[i * 2 + 1];
2538 unpack_int_rgba_LUMINANCE_ALPHA_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2543 dst[i][0] = dst[i][1] = dst[i][2] = src[i * 2 + 0];
2544 dst[i][3] = src[i * 2 + 1];
2549 unpack_int_rgba_INTENSITY_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
2554 dst[i][0] = dst[i][1] = dst[i][2] = dst[i][3] = src[i];
2559 unpack_int_rgba_INTENSITY_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
2564 dst[i][0] = dst[i][1] = dst[i][2] = dst[i][3] = src[i];
2569 unpack_int_rgba_INTENSITY_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
2574 dst[i][0] = dst[i][1] = dst[i][2] = dst[i][3] = src[i];
2579 unpack_int_rgba_INTENSITY_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
2584 dst[i][0] = dst[i][1] = dst[i][2] = dst[i][3] = src[i];
2589 unpack_int_rgba_INTENSITY_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
2594 dst[i][0] = dst[i][1] = dst[i][2] = dst[i][3] = src[i];
2599 unpack_int_rgba_ARGB2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
2605 dst[i][0] = (tmp >> 20) & 0x3ff;
2606 dst[i][1] = (tmp >> 10) & 0x3ff;
2607 dst[i][2] = (tmp >> 0) & 0x3ff;
2608 dst[i][3] = (tmp >> 30) & 0x3;
2613 unpack_int_rgba_ABGR2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
2619 dst[i][0] = (tmp >> 0) & 0x3ff;
2620 dst[i][1] = (tmp >> 10) & 0x3ff;
2621 dst[i][2] = (tmp >> 20) & 0x3ff;
2622 dst[i][3] = (tmp >> 30) & 0x3;
2627 unpack_int_rgba_ARGB2101010(const GLuint *src, GLuint dst[][4], GLuint n)
2633 dst[i][0] = (tmp >> 20) & 0x3ff;
2634 dst[i][1] = (tmp >> 10) & 0x3ff;
2635 dst[i][2] = (tmp >> 0) & 0x3ff;
2636 dst[i][3] = (tmp >> 30) & 0x3;
2642 const void *src, GLuint dst[][4])
2650 unpack_int_rgba_RGBA_UINT32(src, dst, n);
2654 unpack_int_rgba_RGBA_UINT16(src, dst, n);
2657 unpack_int_rgba_RGBA_INT16(src, dst, n);
2661 unpack_int_rgba_RGBA_UINT8(src, dst, n);
2664 unpack_int_rgba_RGBA_INT8(src, dst, n);
2668 unpack_int_rgba_ARGB8888(src, dst, n);
2672 unpack_int_rgba_XRGB8888(src, dst, n);
2677 unpack_int_rgba_RGB_UINT32(src, dst, n);
2681 unpack_int_rgba_RGB_UINT16(src, dst, n);
2684 unpack_int_rgba_RGB_INT16(src, dst, n);
2688 unpack_int_rgba_RGB_UINT8(src, dst, n);
2691 unpack_int_rgba_RGB_INT8(src, dst, n);
2696 unpack_int_rgba_RG_UINT32(src, dst, n);
2700 unpack_int_rgba_RG_UINT16(src, dst, n);
2703 unpack_int_rgba_RG_INT16(src, dst, n);
2707 unpack_int_rgba_RG_UINT8(src, dst, n);
2710 unpack_int_rgba_RG_INT8(src, dst, n);
2715 unpack_int_rgba_R_UINT32(src, dst, n);
2719 unpack_int_rgba_R_UINT16(src, dst, n);
2722 unpack_int_rgba_R_INT16(src, dst, n);
2726 unpack_int_rgba_R_UINT8(src, dst, n);
2729 unpack_int_rgba_R_INT8(src, dst, n);
2734 unpack_int_rgba_ALPHA_UINT32(src, dst, n);
2738 unpack_int_rgba_ALPHA_UINT16(src, dst, n);
2741 unpack_int_rgba_ALPHA_INT16(src, dst, n);
2745 unpack_int_rgba_ALPHA_UINT8(src, dst, n);
2748 unpack_int_rgba_ALPHA_INT8(src, dst, n);
2753 unpack_int_rgba_LUMINANCE_UINT32(src, dst, n);
2756 unpack_int_rgba_LUMINANCE_UINT16(src, dst, n);
2759 unpack_int_rgba_LUMINANCE_INT16(src, dst, n);
2763 unpack_int_rgba_LUMINANCE_UINT8(src, dst, n);
2766 unpack_int_rgba_LUMINANCE_INT8(src, dst, n);
2771 unpack_int_rgba_LUMINANCE_ALPHA_UINT32(src, dst, n);
2775 unpack_int_rgba_LUMINANCE_ALPHA_UINT16(src, dst, n);
2778 unpack_int_rgba_LUMINANCE_ALPHA_INT16(src, dst, n);
2782 unpack_int_rgba_LUMINANCE_ALPHA_UINT8(src, dst, n);
2785 unpack_int_rgba_LUMINANCE_ALPHA_INT8(src, dst, n);
2790 unpack_int_rgba_INTENSITY_UINT32(src, dst, n);
2794 unpack_int_rgba_INTENSITY_UINT16(src, dst, n);
2797 unpack_int_rgba_INTENSITY_INT16(src, dst, n);
2801 unpack_int_rgba_INTENSITY_UINT8(src, dst, n);
2804 unpack_int_rgba_INTENSITY_INT8(src, dst, n);
2808 unpack_int_rgba_ARGB2101010_UINT(src, dst, n);
2812 unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
2816 unpack_int_rgba_ARGB2101010(src, dst, n);
2831 * \param dst start address of the dest image
2841 GLfloat dst[][4], GLint dstRowStride,
2854 dstRow = ((GLubyte *) dst) + dstRowStride * y + dstPixStride * x;
2867 typedef void (*unpack_float_z_func)(GLuint n, const void *src, GLfloat *dst);
2870 unpack_float_z_Z24_X8(GLuint n, const void *src, GLfloat *dst)
2877 dst[i] = (s[i] >> 8) * scale;
2878 ASSERT(dst[i] >= 0.0F);
2879 ASSERT(dst[i] <= 1.0F);
2884 unpack_float_z_X8_Z24(GLuint n, const void *src, GLfloat *dst)
2891 dst[i] = (s[i] & 0x00ffffff) * scale;
2892 ASSERT(dst[i] >= 0.0F);
2893 ASSERT(dst[i] <= 1.0F);
2898 unpack_float_z_Z16(GLuint n, const void *src, GLfloat *dst)
2903 dst[i] = s[i] * (1.0F / 65535.0F);
2908 unpack_float_z_Z32(GLuint n, const void *src, GLfloat *dst)
2913 dst[i] = s[i] * (1.0F / 0xffffffff);
2918 unpack_float_z_Z32F(GLuint n, const void *src, GLfloat *dst)
2920 memcpy(dst, src, n * sizeof(float));
2924 unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst)
2929 dst[i] = s[i].z;
2941 const void *src, GLfloat *dst)
2972 unpack(n, src, dst);
2977 typedef void (*unpack_uint_z_func)(const void *src, GLuint *dst, GLuint n);
2980 unpack_uint_z_Z24_X8(const void *src, GLuint *dst, GLuint n)
2986 dst[i] = (s[i] & 0xffffff00) | (s[i] >> 24);
2991 unpack_uint_z_X8_Z24(const void *src, GLuint *dst, GLuint n)
2997 dst[i] = (s[i] << 8) | ((s[i] >> 16) & 0xff);
3002 unpack_uint_z_Z16(const void *src, GLuint *dst, GLuint n)
3007 dst[i] = (s[i] << 16) | s[i];
3012 unpack_uint_z_Z32(const void *src, GLuint *dst, GLuint n)
3014 memcpy(dst, src, n * sizeof(GLuint));
3018 unpack_uint_z_Z32_FLOAT(const void *src, GLuint *dst, GLuint n)
3023 dst[i] = FLOAT_TO_UINT(CLAMP(s[i], 0.0F, 1.0F));
3028 unpack_uint_z_Z32_FLOAT_X24S8(const void *src, GLuint *dst, GLuint n)
3034 dst[i] = FLOAT_TO_UINT(CLAMP(s[i].z, 0.0F, 1.0F));
3045 const void *src, GLuint *dst)
3077 unpack(srcPtr, dst, n);
3082 unpack_ubyte_s_S8(const void *src, GLubyte *dst, GLuint n)
3084 memcpy(dst, src, n);
3088 unpack_ubyte_s_Z24_S8(const void *src, GLubyte *dst, GLuint n)
3094 dst[i] = src32[i] & 0xff;
3098 unpack_ubyte_s_S8_Z24(const void *src, GLubyte *dst, GLuint n)
3104 dst[i] = src32[i] >> 24;
3108 unpack_ubyte_s_Z32_FLOAT_X24S8(const void *src, GLubyte *dst, GLuint n)
3114 dst[i] = s[i].x24s8 & 0xff;
3119 const void *src, GLubyte *dst)
3123 unpack_ubyte_s_S8(src, dst, n);
3126 unpack_ubyte_s_Z24_S8(src, dst, n);
3129 unpack_ubyte_s_S8_Z24(src, dst, n);
3132 unpack_ubyte_s_Z32_FLOAT_X24S8(src, dst, n);
3142 unpack_uint_24_8_depth_stencil_S8_Z24(const GLuint *src, GLuint *dst, GLuint n)
3148 dst[i] = val >> 24 | val << 8;
3153 unpack_uint_24_8_depth_stencil_Z24_S8(const GLuint *src, GLuint *dst, GLuint n)
3155 memcpy(dst, src, n * 4);
3160 const void *src, GLuint *dst)
3164 unpack_uint_24_8_depth_stencil_Z24_S8(src, dst, n);
3167 unpack_uint_24_8_depth_stencil_S8_Z24(src, dst, n);