[Mesa-dev] [PATCH 2/3] st/mesa: use PIPE_FORMAT_A1B5G5R5_UNORM when requested
Nicolai Hähnle
nhaehnle at gmail.com
Fri Oct 6 20:41:14 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
This affects dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8,
which implicitly tests that GLES really creates a 5551 texture when
GL_UNSIGNED_SHORT_5_5_5_1 is passed as type parameter to glTexImage*()
functions.
---
src/mesa/state_tracker/st_format.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 5e38fe56890..08a2908b1f0 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -402,20 +402,22 @@ st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaForma
return PIPE_FORMAT_R11G11B10_FLOAT;
case MESA_FORMAT_B10G10R10A2_UINT:
return PIPE_FORMAT_B10G10R10A2_UINT;
case MESA_FORMAT_R10G10B10A2_UINT:
return PIPE_FORMAT_R10G10B10A2_UINT;
case MESA_FORMAT_B4G4R4X4_UNORM:
return PIPE_FORMAT_B4G4R4X4_UNORM;
case MESA_FORMAT_B5G5R5X1_UNORM:
return PIPE_FORMAT_B5G5R5X1_UNORM;
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ return PIPE_FORMAT_A1B5G5R5_UNORM;
case MESA_FORMAT_R8G8B8X8_SNORM:
return PIPE_FORMAT_RGBX8888_SNORM;
case MESA_FORMAT_X8B8G8R8_SNORM:
return PIPE_FORMAT_XBGR8888_SNORM;
case MESA_FORMAT_R8G8B8X8_SRGB:
return PIPE_FORMAT_RGBX8888_SRGB;
case MESA_FORMAT_X8B8G8R8_SRGB:
return PIPE_FORMAT_XBGR8888_SRGB;
case MESA_FORMAT_RGBX_UINT8:
return PIPE_FORMAT_R8G8B8X8_UINT;
@@ -883,20 +885,22 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_B10G10R10A2_UINT:
return MESA_FORMAT_B10G10R10A2_UINT;
case PIPE_FORMAT_R10G10B10A2_UINT:
return MESA_FORMAT_R10G10B10A2_UINT;
case PIPE_FORMAT_B4G4R4X4_UNORM:
return MESA_FORMAT_B4G4R4X4_UNORM;
case PIPE_FORMAT_B5G5R5X1_UNORM:
return MESA_FORMAT_B5G5R5X1_UNORM;
+ case PIPE_FORMAT_A1B5G5R5_UNORM:
+ return MESA_FORMAT_A1B5G5R5_UNORM;
case PIPE_FORMAT_RGBX8888_SNORM:
return MESA_FORMAT_R8G8B8X8_SNORM;
case PIPE_FORMAT_XBGR8888_SNORM:
return MESA_FORMAT_X8B8G8R8_SNORM;
case PIPE_FORMAT_RGBX8888_SRGB:
return MESA_FORMAT_R8G8B8X8_SRGB;
case PIPE_FORMAT_XBGR8888_SRGB:
return MESA_FORMAT_X8B8G8R8_SRGB;
case PIPE_FORMAT_R8G8B8X8_UINT:
return MESA_FORMAT_RGBX_UINT8;
--
2.11.0
More information about the mesa-dev
mailing list