2 * Mesa 3-D graphics library
4 * Copyright (c) 2011 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
33 /** Pack a uint8_t rgba[4] color to dest address */
34 typedef void (*mesa_pack_ubyte_rgba_func
)(const uint8_t src
[4], void *dst
);
36 /** Pack a float rgba[4] color to dest address */
37 typedef void (*mesa_pack_float_rgba_func
)(const float src
[4], void *dst
);
39 /** Pack a float Z value to dest address */
40 typedef void (*mesa_pack_float_z_func
)(const float *src
, void *dst
);
42 /** Pack a uint32_t Z value to dest address */
43 typedef void (*mesa_pack_uint_z_func
)(const uint32_t *src
, void *dst
);
45 /** Pack a uint8_t stencil value to dest address */
46 typedef void (*mesa_pack_ubyte_stencil_func
)(const uint8_t *src
, void *dst
);
51 extern mesa_pack_ubyte_rgba_func
52 _mesa_get_pack_ubyte_rgba_function(mesa_format format
);
55 extern mesa_pack_float_rgba_func
56 _mesa_get_pack_float_rgba_function(mesa_format format
);
59 extern mesa_pack_float_z_func
60 _mesa_get_pack_float_z_func(mesa_format format
);
63 extern mesa_pack_uint_z_func
64 _mesa_get_pack_uint_z_func(mesa_format format
);
67 extern mesa_pack_ubyte_stencil_func
68 _mesa_get_pack_ubyte_stencil_func(mesa_format format
);
72 _mesa_pack_float_rgba_row(mesa_format format
, uint32_t n
,
73 const float src
[][4], void *dst
);
76 _mesa_pack_ubyte_rgba_row(mesa_format format
, uint32_t n
,
77 const uint8_t src
[][4], void *dst
);
80 _mesa_pack_uint_rgba_row(mesa_format format
, uint32_t n
,
81 const uint32_t src
[][4], void *dst
);
84 _mesa_pack_ubyte_rgba_rect(mesa_format format
, uint32_t width
, uint32_t height
,
85 const uint8_t *src
, int32_t srcRowStride
,
86 void *dst
, int32_t dstRowStride
);
89 _mesa_pack_float_z_row(mesa_format format
, uint32_t n
,
90 const float *src
, void *dst
);
93 _mesa_pack_uint_z_row(mesa_format format
, uint32_t n
,
94 const uint32_t *src
, void *dst
);
97 _mesa_pack_ubyte_stencil_row(mesa_format format
, uint32_t n
,
98 const uint8_t *src
, void *dst
);
101 _mesa_pack_uint_24_8_depth_stencil_row(mesa_format format
, uint32_t n
,
102 const uint32_t *src
, void *dst
);