#include "format_pack.h"
#include "format_unpack.h"
-const mesa_array_format RGBA8888_FLOAT =
+const mesa_array_format RGBA32_FLOAT =
MESA_ARRAY_FORMAT(4, 1, 1, 1, 4, 0, 1, 2, 3);
-const mesa_array_format RGBA8888_UBYTE =
+const mesa_array_format RGBA8_UBYTE =
MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 0, 1, 2, 3);
-const mesa_array_format RGBA8888_UINT =
+const mesa_array_format RGBA32_UINT =
MESA_ARRAY_FORMAT(4, 0, 0, 0, 4, 0, 1, 2, 3);
-const mesa_array_format RGBA8888_INT =
+const mesa_array_format RGBA32_INT =
MESA_ARRAY_FORMAT(4, 1, 0, 0, 4, 0, 1, 2, 3);
static void
if (!rebase_swizzle) {
/* Handle the cases where we can directly unpack */
if (!src_format_is_mesa_array_format) {
- if (dst_array_format == RGBA8888_FLOAT) {
+ if (dst_array_format == RGBA32_FLOAT) {
for (row = 0; row < height; ++row) {
_mesa_unpack_rgba_row(src_format, width,
src, (float (*)[4])dst);
dst += dst_stride;
}
return;
- } else if (dst_array_format == RGBA8888_UBYTE) {
+ } else if (dst_array_format == RGBA8_UBYTE) {
assert(!_mesa_is_format_integer_color(src_format));
for (row = 0; row < height; ++row) {
_mesa_unpack_ubyte_rgba_row(src_format, width,
dst += dst_stride;
}
return;
- } else if (dst_array_format == RGBA8888_UINT &&
+ } else if (dst_array_format == RGBA32_UINT &&
_mesa_is_format_unsigned(src_format)) {
assert(_mesa_is_format_integer_color(src_format));
for (row = 0; row < height; ++row) {
/* Handle the cases where we can directly pack */
if (!dst_format_is_mesa_array_format) {
- if (src_array_format == RGBA8888_FLOAT) {
+ if (src_array_format == RGBA32_FLOAT) {
for (row = 0; row < height; ++row) {
_mesa_pack_float_rgba_row(dst_format, width,
(const float (*)[4])src, dst);
dst += dst_stride;
}
return;
- } else if (src_array_format == RGBA8888_UBYTE) {
+ } else if (src_array_format == RGBA8_UBYTE) {
assert(!_mesa_is_format_integer_color(dst_format));
for (row = 0; row < height; ++row) {
_mesa_pack_ubyte_rgba_row(dst_format, width,
dst += dst_stride;
}
return;
- } else if (src_array_format == RGBA8888_UINT &&
+ } else if (src_array_format == RGBA32_UINT &&
_mesa_is_format_unsigned(dst_format)) {
assert(_mesa_is_format_integer_color(dst_format));
for (row = 0; row < height; ++row) {
width, height, format, type,
slice, 0, 0);
_mesa_format_convert(dest, dstFormat, dstStride,
- tempSlice, RGBA8888_FLOAT, srcStride,
+ tempSlice, RGBA32_FLOAT, srcStride,
width, height,
needsRebase ? rebaseSwizzle : NULL);
tempSlice += 4 * width * height;
bool need_convert;
/* We will convert to RGBA float */
- rgba_format = RGBA8888_FLOAT;
+ rgba_format = RGBA32_FLOAT;
rgba_stride = width * 4 * sizeof(GLfloat);
/* If we are lucky and the dst format matches the RGBA format we need