Mesa (master): mesa/main: select the R10G10B10X2_UNORM internal format based on data type

Nicolai Hähnle nh at kemper.freedesktop.org
Mon Oct 2 13:07:58 UTC 2017


Module: Mesa
Branch: master
Commit: f38b94285db7c0630b16cf6b8abc80e973e2e09f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f38b94285db7c0630b16cf6b8abc80e973e2e09f

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Wed Sep 27 15:24:31 2017 +0200

mesa/main: select the R10G10B10X2_UNORM internal format based on data type

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

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 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 5c29d37bb4..ecdfd56103 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -2005,7 +2005,6 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
    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:
@@ -2016,6 +2015,9 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
    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;




More information about the mesa-commit mailing list