mesa/st: expose ARB_texture_rgb10_a2ui if R10G10B10A2_UINT is supported v2
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 26 Dec 2013 18:06:25 +0000 (19:06 +0100)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 27 Jan 2014 15:40:43 +0000 (16:40 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_format.c

index e7d5d7413859aec36de537d67e650e74f28541f7..4ef7b289c4adf00a18a11657f90276d841ca89f3 100644 (file)
@@ -419,7 +419,9 @@ void st_init_extensions(struct st_context *st)
           PIPE_FORMAT_R16G16B16A16_FLOAT } },
 
       { { o(ARB_texture_rgb10_a2ui) },
-        { PIPE_FORMAT_B10G10R10A2_UINT } },
+        { PIPE_FORMAT_R10G10B10A2_UINT,
+          PIPE_FORMAT_B10G10R10A2_UINT },
+         GL_TRUE }, /* at least one format must be supported */
 
       { { o(EXT_framebuffer_sRGB) },
         { PIPE_FORMAT_A8B8G8R8_SRGB,
index b0158f300248918377a375daf395858e29564085..50d78804b141eae383ff3ecc54a023b1c9af6b81 100644 (file)
@@ -359,6 +359,8 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
       return PIPE_FORMAT_R11G11B10_FLOAT;
    case MESA_FORMAT_ARGB2101010_UINT:
       return PIPE_FORMAT_B10G10R10A2_UINT;
+   case MESA_FORMAT_ABGR2101010_UINT:
+      return PIPE_FORMAT_R10G10B10A2_UINT;
 
    case MESA_FORMAT_XRGB4444_UNORM:
       return PIPE_FORMAT_B4G4R4X4_UNORM;
@@ -712,6 +714,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
 
    case PIPE_FORMAT_B10G10R10A2_UINT:
       return MESA_FORMAT_ARGB2101010_UINT;
+   case PIPE_FORMAT_R10G10B10A2_UINT:
+      return MESA_FORMAT_ABGR2101010_UINT;
 
    case PIPE_FORMAT_B4G4R4X4_UNORM:
       return MESA_FORMAT_XRGB4444_UNORM;
@@ -1483,7 +1487,7 @@ static const struct format_mapping format_map[] = {
    },
    {
       { GL_RGB10_A2UI, 0 },
-      { PIPE_FORMAT_B10G10R10A2_UINT, 0 }
+      { PIPE_FORMAT_R10G10B10A2_UINT, PIPE_FORMAT_B10G10R10A2_UINT, 0 }
    },
 };