summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-09-05 14:42:15 -0700
committerEric Anholt <[email protected]>2019-10-20 04:39:48 +0000
commit6a819cabe8d8f445ccb44dcb172e0922dbe016db (patch)
tree7f0a8a587c84f16c2333feb29a5e06c9eb3d1c32 /src/mesa/swrast
parent236b478b2ec0d65ef5dfe1165ae8ab027dde0a42 (diff)
mesa: Replace MESA_FORMAT_L8A8/A8L8 UNORM/SNORM/SRGB with an array format.
The array format is what the GL API wants (fixing texbos on big-endian), and matches directly to gallium's corresponding array format. The only driver exposing A8L8 was radeon/r200 in big-endian, where the HW's underlying format was trying to read as array and we needed to flip things around to make our packed format come out right (note that while the radeon format tables had both AL and LA, ChooseTextureFormat would only pick one of them based on endianness). v2: Don't make r200/radeon use endian swaps. v3: Rebase on dropping the r200 _be/_le format table removal patch v4: reword commit message to explain why we can drop both formats from radeon. Reviewed-by: Marek Olšák <[email protected]> (v1)
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_texfetch.c11
-rw-r--r--src/mesa/swrast/s_texfetch_tmp.h9
2 files changed, 7 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 1fe5e21162a..db5a956ab28 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -141,8 +141,6 @@ texfetch_funcs[] =
FETCH_FUNCS(A1B5G5R5_UNORM),
FETCH_FUNCS(B5G5R5A1_UNORM),
FETCH_FUNCS(A1R5G5B5_UNORM),
- FETCH_FUNCS(L8A8_UNORM),
- FETCH_FUNCS(A8L8_UNORM),
FETCH_FUNCS(R8G8_UNORM),
FETCH_FUNCS(G8R8_UNORM),
FETCH_FUNCS(L4A4_UNORM),
@@ -173,6 +171,7 @@ texfetch_funcs[] =
FETCH_FUNCS(A_UNORM16),
FETCH_FUNCS(L_UNORM8),
FETCH_FUNCS(L_UNORM16),
+ FETCH_FUNCS(LA_UNORM8),
FETCH_FUNCS(LA_UNORM16),
FETCH_FUNCS(I_UNORM8),
FETCH_FUNCS(I_UNORM16),
@@ -191,19 +190,18 @@ texfetch_funcs[] =
FETCH_FUNCS(R8G8B8A8_SNORM),
FETCH_FUNCS(R16G16_SNORM),
FETCH_FUNCS(R8G8_SNORM),
- FETCH_FUNCS(L8A8_SNORM),
- FETCH_FUNCS(A8L8_SNORM),
/* Array signed/normalized formats */
FETCH_FUNCS(A_SNORM8),
FETCH_FUNCS(A_SNORM16),
FETCH_FUNCS(L_SNORM8),
FETCH_FUNCS(L_SNORM16),
+ FETCH_FUNCS(LA_SNORM8),
+ FETCH_FUNCS(LA_SNORM16),
FETCH_FUNCS(I_SNORM8),
FETCH_FUNCS(I_SNORM16),
FETCH_FUNCS(R_SNORM8),
FETCH_FUNCS(R_SNORM16),
- FETCH_FUNCS(LA_SNORM16),
FETCH_FUNCS(RGB_SNORM16),
FETCH_FUNCS(RGBA_SNORM16),
@@ -214,12 +212,11 @@ texfetch_funcs[] =
FETCH_FUNCS(R8G8B8A8_SRGB),
FETCH_FUNCS(R8G8B8X8_SRGB),
FETCH_FUNCS(X8B8G8R8_SRGB),
- FETCH_FUNCS(L8A8_SRGB),
- FETCH_FUNCS(A8L8_SRGB),
/* Array sRGB formats */
FETCH_FUNCS(R_SRGB8),
FETCH_FUNCS(L_SRGB8),
+ FETCH_FUNCS(LA_SRGB8),
FETCH_FUNCS(BGR_SRGB8),
/* Packed float formats */
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index 72bb13498af..f31167a83e7 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -131,10 +131,9 @@ FETCH_RGBA(R10G10B10A2_UNORM, GLuint, 1)
FETCH_RGBA(R8G8_UNORM, GLushort, 1)
FETCH_RGBA(G8R8_UNORM, GLushort, 1)
FETCH_RGBA(L4A4_UNORM, GLubyte, 1)
-FETCH_RGBA(L8A8_UNORM, GLushort, 1)
FETCH_RGBA(R_UNORM8, GLubyte, 1)
FETCH_RGBA(R_UNORM16, GLushort, 1)
-FETCH_RGBA(A8L8_UNORM, GLushort, 1)
+FETCH_RGBA(LA_UNORM8, GLubyte, 2)
FETCH_RGBA(R16G16_UNORM, GLuint, 1)
FETCH_RGBA(G16R16_UNORM, GLuint, 1)
FETCH_RGBA(B2G3R3_UNORM, GLubyte, 1)
@@ -154,8 +153,7 @@ FETCH_RGBA(R8G8B8X8_SRGB, GLuint, 1)
FETCH_RGBA(X8B8G8R8_SRGB, GLuint, 1)
FETCH_RGBA(R_SRGB8, GLubyte, 1)
FETCH_RGBA(L_SRGB8, GLubyte, 1)
-FETCH_RGBA(L8A8_SRGB, GLushort, 1)
-FETCH_RGBA(A8L8_SRGB, GLushort, 2)
+FETCH_RGBA(LA_SRGB8, GLubyte, 2)
FETCH_RGBA(RGBA_SINT8, GLbyte, 4)
FETCH_RGBA(RGBA_SINT16, GLshort, 4)
FETCH_RGBA(RGBA_SINT32, GLint, 4)
@@ -167,8 +165,7 @@ FETCH_RGBA(A_SNORM8, GLbyte, 1)
FETCH_RGBA(L_SNORM8, GLbyte, 1)
FETCH_RGBA(I_SNORM8, GLbyte, 1)
FETCH_RGBA(R8G8_SNORM, GLshort, 1)
-FETCH_RGBA(L8A8_SNORM, GLshort, 1)
-FETCH_RGBA(A8L8_SNORM, GLshort, 1)
+FETCH_RGBA(LA_SNORM8, GLbyte, 2)
FETCH_RGBA(X8B8G8R8_SNORM, GLint, 1)
FETCH_RGBA(A8B8G8R8_SNORM, GLint, 1)
FETCH_RGBA(R8G8B8A8_SNORM, GLint, 1)