#include <stdbool.h>
#include "dri_util.h"
#include "utils.h"
+#include "util/u_endian.h"
#include "util/xmlpool.h"
#include "main/mtypes.h"
#include "main/framebuffer.h"
.image_format = __DRI_IMAGE_FORMAT_GR1616,
.mesa_format = MESA_FORMAT_R16G16_UNORM,
},
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
{
.image_format = __DRI_IMAGE_FORMAT_GR1616,
- .mesa_format = MESA_FORMAT_L16A16_UNORM,
+ .mesa_format = MESA_FORMAT_LA_UNORM16,
},
+#endif
};
uint32_t
[MESA_FORMAT_B4G4R4A4_UNORM] = ISL_FORMAT_B4G4R4A4_UNORM,
[MESA_FORMAT_B5G5R5A1_UNORM] = ISL_FORMAT_B5G5R5A1_UNORM,
[MESA_FORMAT_L8A8_UNORM] = ISL_FORMAT_L8A8_UNORM,
- [MESA_FORMAT_L16A16_UNORM] = ISL_FORMAT_L16A16_UNORM,
+ [MESA_FORMAT_LA_UNORM16] = ISL_FORMAT_L16A16_UNORM,
[MESA_FORMAT_A_UNORM8] = ISL_FORMAT_A8_UNORM,
[MESA_FORMAT_A_UNORM16] = ISL_FORMAT_A16_UNORM,
[MESA_FORMAT_L_UNORM8] = ISL_FORMAT_L8_UNORM,
*comps = 2;
return;
- case MESA_FORMAT_L16A16_UNORM:
- case MESA_FORMAT_A16L16_UNORM:
+ case MESA_FORMAT_LA_UNORM16:
case MESA_FORMAT_R16G16_UNORM:
case MESA_FORMAT_G16R16_UNORM:
*datatype = GL_UNSIGNED_SHORT;
MESA_FORMAT_B8G8R8X8_UNORM , packed, 1, 1, 1, un8 , un8 , un8 , x8 , zyx1, rgb
MESA_FORMAT_A8R8G8B8_UNORM , packed, 1, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
MESA_FORMAT_X8R8G8B8_UNORM , packed, 1, 1, 1, x8 , un8 , un8 , un8 , yzw1, rgb
-MESA_FORMAT_L16A16_UNORM , packed, 1, 1, 1, un16, un16, , , xxxy, rgb
-MESA_FORMAT_A16L16_UNORM , packed, 1, 1, 1, un16, un16, , , yyyx, rgb
MESA_FORMAT_B5G6R5_UNORM , packed, 1, 1, 1, un5 , un6 , un5 , , zyx1, rgb
MESA_FORMAT_R5G6B5_UNORM , packed, 1, 1, 1, un5 , un6 , un5 , , xyz1, rgb
MESA_FORMAT_B4G4R4A4_UNORM , packed, 1, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
MESA_FORMAT_A_UNORM16 , array , 1, 1, 1, un16, , , , 000x, rgb
MESA_FORMAT_L_UNORM8 , array , 1, 1, 1, un8 , , , , xxx1, rgb
MESA_FORMAT_L_UNORM16 , array , 1, 1, 1, un16, , , , xxx1, rgb
+MESA_FORMAT_LA_UNORM16 , array , 1, 1, 1, un16, un16, , , xxxy, rgb
MESA_FORMAT_I_UNORM8 , array , 1, 1, 1, un8 , , , , xxxx, rgb
MESA_FORMAT_I_UNORM16 , array , 1, 1, 1, un16, , , , xxxx, rgb
MESA_FORMAT_R_UNORM8 , array , 1, 1, 1, un8 , , , , x001, rgb
MESA_FORMAT_B8G8R8X8_UNORM, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
MESA_FORMAT_A8R8G8B8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
MESA_FORMAT_X8R8G8B8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
- MESA_FORMAT_L16A16_UNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
- MESA_FORMAT_A16L16_UNORM, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
MESA_FORMAT_B5G6R5_UNORM, /* RRRR RGGG GGGB BBBB */
MESA_FORMAT_R5G6B5_UNORM, /* BBBB BGGG GGGR RRRR */
MESA_FORMAT_B4G4R4A4_UNORM, /* AAAA RRRR GGGG BBBB */
MESA_FORMAT_A_UNORM16, /* ushort[i] = A */
MESA_FORMAT_L_UNORM8, /* ubyte[i] = L */
MESA_FORMAT_L_UNORM16, /* ushort[i] = L */
+ MESA_FORMAT_LA_UNORM16, /* ushort[i * 2] = L, ushort[i*2+1] = A */
MESA_FORMAT_I_UNORM8, /* ubyte[i] = I */
MESA_FORMAT_I_UNORM16, /* ushort[i] = I */
MESA_FORMAT_R_UNORM8, /* ubyte[i] = R */
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L16A16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LA_UNORM16);
RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_LUMINANCE8_ALPHA8:
return MESA_FORMAT_L8A8_UNORM;
case GL_LUMINANCE16_ALPHA16:
- return MESA_FORMAT_L16A16_UNORM;
+ return MESA_FORMAT_LA_UNORM16;
case GL_LUMINANCE_ALPHA16F_ARB:
return MESA_FORMAT_LA_FLOAT16;
case GL_LUMINANCE_ALPHA32F_ARB:
return PIPE_FORMAT_LA88_UNORM;
case MESA_FORMAT_A8L8_UNORM:
return PIPE_FORMAT_AL88_UNORM;
- case MESA_FORMAT_L16A16_UNORM:
- return PIPE_FORMAT_LA1616_UNORM;
- case MESA_FORMAT_A16L16_UNORM:
- return PIPE_FORMAT_AL1616_UNORM;
case MESA_FORMAT_A_UNORM8:
return PIPE_FORMAT_A8_UNORM;
case MESA_FORMAT_A_UNORM16:
return PIPE_FORMAT_L8_UNORM;
case MESA_FORMAT_L_UNORM16:
return PIPE_FORMAT_L16_UNORM;
+ case MESA_FORMAT_LA_UNORM16:
+ return PIPE_FORMAT_L16A16_UNORM;
case MESA_FORMAT_I_UNORM8:
return PIPE_FORMAT_I8_UNORM;
case MESA_FORMAT_I_UNORM16:
return MESA_FORMAT_L8A8_UNORM;
case PIPE_FORMAT_AL88_UNORM:
return MESA_FORMAT_A8L8_UNORM;
- case PIPE_FORMAT_LA1616_UNORM:
- return MESA_FORMAT_L16A16_UNORM;
- case PIPE_FORMAT_AL1616_UNORM:
- return MESA_FORMAT_A16L16_UNORM;
+ case PIPE_FORMAT_L16A16_UNORM:
+ return MESA_FORMAT_LA_UNORM16;
case PIPE_FORMAT_A8_UNORM:
return MESA_FORMAT_A_UNORM8;
case PIPE_FORMAT_A16_UNORM:
FETCH_FUNCS(B8G8R8X8_UNORM),
FETCH_FUNCS(A8R8G8B8_UNORM),
FETCH_FUNCS(X8R8G8B8_UNORM),
- FETCH_FUNCS(L16A16_UNORM),
- FETCH_FUNCS(A16L16_UNORM),
FETCH_FUNCS(B5G6R5_UNORM),
FETCH_FUNCS(R5G6B5_UNORM),
FETCH_FUNCS(B4G4R4A4_UNORM),
FETCH_FUNCS(A_UNORM16),
FETCH_FUNCS(L_UNORM8),
FETCH_FUNCS(L_UNORM16),
+ FETCH_FUNCS(LA_UNORM16),
FETCH_FUNCS(I_UNORM8),
FETCH_FUNCS(I_UNORM16),
FETCH_FUNCS(R_UNORM8),
FETCH_RGBA(A8L8_UNORM, GLushort, 1)
FETCH_RGBA(R16G16_UNORM, GLuint, 1)
FETCH_RGBA(G16R16_UNORM, GLuint, 1)
-FETCH_RGBA(L16A16_UNORM, GLuint, 1)
-FETCH_RGBA(A16L16_UNORM, GLuint, 1)
FETCH_RGBA(B2G3R3_UNORM, GLubyte, 1)
FETCH_RGBA(A_UNORM8, GLubyte, 1)
FETCH_RGBA(A_UNORM16, GLushort, 1)
FETCH_RGBA(L_UNORM8, GLubyte, 1)
FETCH_RGBA(L_UNORM16, GLushort, 1)
+FETCH_RGBA(LA_UNORM16, GLushort, 2)
FETCH_RGBA(I_UNORM8, GLubyte, 1)
FETCH_RGBA(I_UNORM16, GLushort, 1)
FETCH_RGBA(BGR_SRGB8, GLubyte, 3)