[Mesa-dev] [PATCH 1/4] mesa/main: select the R10G10B10X2_UNORM internal format based on data type

Nicolai Hähnle nhaehnle at gmail.com
Fri Sep 29 11:30:13 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

ES requires it. This is a partial fix for
dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb_unsigned_int_2_10_10_10_rev
---
 src/mesa/main/formats.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 5c29d37bb44..ecdfd561035 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -1998,31 +1998,33 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
              type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV && !swapBytes;
 
    case MESA_FORMAT_B4G4R4X4_UNORM:
    case MESA_FORMAT_B5G5R5X1_UNORM:
    case MESA_FORMAT_R8G8B8X8_SNORM:
    case MESA_FORMAT_R8G8B8X8_SRGB:
    case MESA_FORMAT_X8B8G8R8_SRGB:
    case MESA_FORMAT_RGBX_UINT8:
    case MESA_FORMAT_RGBX_SINT8:
    case MESA_FORMAT_B10G10R10X2_UNORM:
-   case MESA_FORMAT_R10G10B10X2_UNORM:
    case MESA_FORMAT_RGBX_UNORM16:
    case MESA_FORMAT_RGBX_SNORM16:
    case MESA_FORMAT_RGBX_FLOAT16:
    case MESA_FORMAT_RGBX_UINT16:
    case MESA_FORMAT_RGBX_SINT16:
    case MESA_FORMAT_RGBX_FLOAT32:
    case MESA_FORMAT_RGBX_UINT32:
    case MESA_FORMAT_RGBX_SINT32:
       return GL_FALSE;
 
+   case MESA_FORMAT_R10G10B10X2_UNORM:
+      return format == GL_RGB && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
+         !swapBytes;
    case MESA_FORMAT_R10G10B10A2_UNORM:
       return format == GL_RGBA && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
          !swapBytes;
 
    case MESA_FORMAT_G8R8_SNORM:
       return format == GL_RG && type == GL_BYTE && !littleEndian &&
          !swapBytes;
 
    case MESA_FORMAT_G16R16_SNORM:
       return format == GL_RG && type == GL_SHORT && !littleEndian &&
-- 
2.11.0



More information about the mesa-dev mailing list