aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-09-06 15:15:13 -0700
committerDylan Baker <[email protected]>2019-11-05 16:39:55 +0000
commitf73a9c6586b631d3f6cddb923b0611f9ff7a70ba (patch)
treeb1a3cb26f59fdde667ccbde027b327d99f55ba3a /src
parent453d52acd8f9de9ed06b9e65bfba1baaf607cf96 (diff)
mesa/swrast: replace instances of _mesa_little_endian with preprocessor
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_renderbuffer.c9
-rw-r--r--src/mesa/swrast/s_triangle.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c
index 8c97e4e11b4..2960a582c27 100644
--- a/src/mesa/swrast/s_renderbuffer.c
+++ b/src/mesa/swrast/s_renderbuffer.c
@@ -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:
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index d80ab180bac..cd0897d5e5c 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -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.
*/