*/
if (osmesa->format == OSMESA_RGBA) {
if (osmesa->DataType == GL_UNSIGNED_BYTE) {
- if (_mesa_little_endian())
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
- else
+#else
rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
+#endif
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
rb->Format = MESA_FORMAT_RGBA_UNORM16;
}
else if (osmesa->format == OSMESA_BGRA) {
if (osmesa->DataType == GL_UNSIGNED_BYTE) {
- if (_mesa_little_endian())
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
- else
+#else
rb->Format = MESA_FORMAT_A8R8G8B8_UNORM;
+#endif
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort");
}
else if (osmesa->format == OSMESA_ARGB) {
if (osmesa->DataType == GL_UNSIGNED_BYTE) {
- if (_mesa_little_endian())
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
rb->Format = MESA_FORMAT_A8R8G8B8_UNORM;
- else
+#else
rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
+#endif
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort");