2 * Copyright © 2012 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25 FN_NAME(DST_TYPE *dst,
33 case GL_RED_INTEGER_EXT:
35 dst[i] = SRC_CONVERT(rgba[i][RCOMP]);
39 case GL_GREEN_INTEGER_EXT:
41 dst[i] = SRC_CONVERT(rgba[i][GCOMP]);
45 case GL_BLUE_INTEGER_EXT:
47 dst[i] = SRC_CONVERT(rgba[i][BCOMP]);
51 case GL_ALPHA_INTEGER_EXT:
53 dst[i] = SRC_CONVERT(rgba[i][ACOMP]);
59 dst[i*2+0] = SRC_CONVERT(rgba[i][RCOMP]);
60 dst[i*2+1] = SRC_CONVERT(rgba[i][GCOMP]);
64 case GL_RGB_INTEGER_EXT:
66 dst[i*3+0] = SRC_CONVERT(rgba[i][RCOMP]);
67 dst[i*3+1] = SRC_CONVERT(rgba[i][GCOMP]);
68 dst[i*3+2] = SRC_CONVERT(rgba[i][BCOMP]);
72 case GL_RGBA_INTEGER_EXT:
74 dst[i*4+0] = SRC_CONVERT(rgba[i][RCOMP]);
75 dst[i*4+1] = SRC_CONVERT(rgba[i][GCOMP]);
76 dst[i*4+2] = SRC_CONVERT(rgba[i][BCOMP]);
77 dst[i*4+3] = SRC_CONVERT(rgba[i][ACOMP]);
81 case GL_BGR_INTEGER_EXT:
83 dst[i*3+0] = SRC_CONVERT(rgba[i][BCOMP]);
84 dst[i*3+1] = SRC_CONVERT(rgba[i][GCOMP]);
85 dst[i*3+2] = SRC_CONVERT(rgba[i][RCOMP]);
89 case GL_BGRA_INTEGER_EXT:
91 dst[i*4+0] = SRC_CONVERT(rgba[i][BCOMP]);
92 dst[i*4+1] = SRC_CONVERT(rgba[i][GCOMP]);
93 dst[i*4+2] = SRC_CONVERT(rgba[i][RCOMP]);
94 dst[i*4+3] = SRC_CONVERT(rgba[i][ACOMP]);
98 case GL_LUMINANCE_INTEGER_EXT:
100 dst[i] = SRC_CONVERT(rgba[i][RCOMP] +
106 case GL_LUMINANCE_ALPHA_INTEGER_EXT:
108 dst[i*2+0] = SRC_CONVERT(rgba[i][RCOMP] +
111 dst[i*2+1] = SRC_CONVERT(rgba[i][ACOMP]);