Commit f73a9c65 authored by Dylan Baker's avatar Dylan Baker

mesa/swrast: replace instances of _mesa_little_endian with preprocessor

Reviewed-by: Eric Engestrom's avatarEric Engestrom <eric@engestrom.ch>
parent 453d52ac
......@@ -76,14 +76,13 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
case GL_RGBA4:
case GL_RGB5_A1:
case GL_RGBA8:
#if 1
case GL_RGB10_A2:
case GL_RGBA12:
#if PIPE_ARCH_LITTLE_ENDIAN
rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
#else
rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
#endif
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
else
rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
break;
case GL_RGBA16:
case GL_RGBA16_SNORM:
......
......@@ -1108,7 +1108,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
#if CHAN_BITS != 8
USE(general_triangle);
#else
if (format == MESA_FORMAT_A8B8G8R8_UNORM && !_mesa_little_endian()) {
if (format == MESA_FORMAT_A8B8G8R8_UNORM && !PIPE_ARCH_LITTLE_ENDIAN) {
/* We only handle RGBA8888 correctly on little endian
* in the optimized code above.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment