~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/mesa/main/format_unpack.c

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2013-03-14 12:18:29 UTC
  • mfrom: (1.7.14)
  • Revision ID: package-import@ubuntu.com-20130314121829-bv7c0z6t1pob5ket
Tags: 9.0.3-0ubuntu1
New upstream release. (LP: #1134466)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2623
2623
   }
2624
2624
}
2625
2625
 
 
2626
static void
 
2627
unpack_int_rgba_ARGB2101010(const GLuint *src, GLuint dst[][4], GLuint n)
 
2628
{
 
2629
   unsigned int i;
 
2630
 
 
2631
   for (i = 0; i < n; i++) {
 
2632
      GLuint tmp = src[i];
 
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;
 
2637
   }
 
2638
}
 
2639
 
2626
2640
void
2627
2641
_mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
2628
2642
                           const void *src, GLuint dst[][4])
2798
2812
      unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
2799
2813
      break;
2800
2814
 
 
2815
   case MESA_FORMAT_ARGB2101010:
 
2816
      unpack_int_rgba_ARGB2101010(src, dst, n);
 
2817
      break;
 
2818
 
2801
2819
   default:
2802
2820
      _mesa_problem(NULL, "%s: bad format %s", __FUNCTION__,
2803
2821
                    _mesa_get_format_name(format));