unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
{
/* XXX others? */
- if (_mesa_little_endian()) {
- switch (mesa_format) {
- case MESA_FORMAT_B8G8R8A8_UNORM:
- case MESA_FORMAT_B8G8R8X8_UNORM:
- case MESA_FORMAT_B5G6R5_UNORM:
- case MESA_FORMAT_B4G4R4A4_UNORM:
- case MESA_FORMAT_B5G5R5A1_UNORM:
- case MESA_FORMAT_A_UNORM8:
- case MESA_FORMAT_L_UNORM8:
- case MESA_FORMAT_I_UNORM8:
- break;
- default:
- return 0;
- }
- }
- else {
- switch (mesa_format) {
- case MESA_FORMAT_A8R8G8B8_UNORM:
- case MESA_FORMAT_X8R8G8B8_UNORM:
- case MESA_FORMAT_R5G6B5_UNORM:
- case MESA_FORMAT_A4R4G4B4_UNORM:
- case MESA_FORMAT_A1R5G5B5_UNORM:
- case MESA_FORMAT_A_UNORM8:
- case MESA_FORMAT_L_UNORM8:
- case MESA_FORMAT_I_UNORM8:
- break;
- default:
- return 0;
- }
+ switch (mesa_format) {
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ case MESA_FORMAT_B8G8R8A8_UNORM:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+#else
+ case MESA_FORMAT_A8R8G8B8_UNORM:
+ case MESA_FORMAT_X8R8G8B8_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+#endif
+ case MESA_FORMAT_A_UNORM8:
+ case MESA_FORMAT_L_UNORM8:
+ case MESA_FORMAT_I_UNORM8:
+ break;
+ default:
+ return 0;
}
/* Rendering to small buffer doesn't work.
_mesa_initialize_window_framebuffer(&rfb->base, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B5G6R5_UNORM : MESA_FORMAT_R5G6B5_UNORM;
+ rgbFormat =
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ MESA_FORMAT_B5G6R5_UNORM;
+#else
+ MESA_FORMAT_R5G6B5_UNORM;
+#endif
else if (mesaVis->alphaBits == 0)
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8X8_UNORM : MESA_FORMAT_X8R8G8B8_UNORM;
+ rgbFormat =
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ MESA_FORMAT_B8G8R8X8_UNORM;
+#else
+ MESA_FORMAT_X8R8G8B8_UNORM;
+#endif
else
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8A8_UNORM : MESA_FORMAT_A8R8G8B8_UNORM;
+ rgbFormat =
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ MESA_FORMAT_B8G8R8A8_UNORM;
+#else
+ MESA_FORMAT_A8R8G8B8_UNORM;
+#endif
/* front color renderbuffer */
rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
static void
radeonInitTextureFormats(void)
{
- if (_mesa_little_endian()) {
- _radeon_texformat_rgba8888 = MESA_FORMAT_A8B8G8R8_UNORM;
- _radeon_texformat_argb8888 = MESA_FORMAT_B8G8R8A8_UNORM;
- _radeon_texformat_rgb565 = MESA_FORMAT_B5G6R5_UNORM;
- _radeon_texformat_argb4444 = MESA_FORMAT_B4G4R4A4_UNORM;
- _radeon_texformat_argb1555 = MESA_FORMAT_B5G5R5A1_UNORM;
- }
- else {
- _radeon_texformat_rgba8888 = MESA_FORMAT_R8G8B8A8_UNORM;
- _radeon_texformat_argb8888 = MESA_FORMAT_A8R8G8B8_UNORM;
- _radeon_texformat_rgb565 = MESA_FORMAT_R5G6B5_UNORM;
- _radeon_texformat_argb4444 = MESA_FORMAT_A4R4G4B4_UNORM;
- _radeon_texformat_argb1555 = MESA_FORMAT_A1R5G5B5_UNORM;
- }
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ _radeon_texformat_rgba8888 = MESA_FORMAT_A8B8G8R8_UNORM;
+ _radeon_texformat_argb8888 = MESA_FORMAT_B8G8R8A8_UNORM;
+ _radeon_texformat_rgb565 = MESA_FORMAT_B5G6R5_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_B4G4R4A4_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_B5G5R5A1_UNORM;
+#else
+ _radeon_texformat_rgba8888 = MESA_FORMAT_R8G8B8A8_UNORM;
+ _radeon_texformat_argb8888 = MESA_FORMAT_A8R8G8B8_UNORM;
+ _radeon_texformat_rgb565 = MESA_FORMAT_R5G6B5_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_A4R4G4B4_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_A1R5G5B5_UNORM;
+#endif
}
void