mesa/st: toggle EXT_texture_norm16 based on format support
authorTapani Pälli <tapani.palli@intel.com>
Wed, 26 Feb 2020 08:30:42 +0000 (10:30 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 26 Feb 2020 11:12:59 +0000 (11:12 +0000)
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2556
Fixes: 7f467d4f738 ("mesa: GL_EXT_texture_norm16 extension plumbing")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3941>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3941>

src/mesa/state_tracker/st_extensions.c

index 446c9b5a618b069cbca5a3c6284f395a332c341c..3fdfe745793ee1695098570486e56a334a36933b 100644 (file)
@@ -826,6 +826,11 @@ void st_init_extensions(struct pipe_screen *screen,
         { PIPE_FORMAT_R8_UNORM,
           PIPE_FORMAT_R8G8_UNORM } },
 
+      { { o(EXT_texture_norm16) },
+        { PIPE_FORMAT_R16_UNORM,
+          PIPE_FORMAT_R16G16_UNORM,
+          PIPE_FORMAT_R16G16B16A16_UNORM } },
+
       { { o(EXT_render_snorm) },
         { PIPE_FORMAT_R8_SNORM,
           PIPE_FORMAT_R8G8_SNORM,
@@ -968,6 +973,13 @@ void st_init_extensions(struct pipe_screen *screen,
         { PIPE_FORMAT_ATC_RGB,
           PIPE_FORMAT_ATC_RGBA_EXPLICIT,
           PIPE_FORMAT_ATC_RGBA_INTERPOLATED } },
+
+      { { o(EXT_texture_norm16) },
+        { PIPE_FORMAT_R16G16B16_UNORM,
+          PIPE_FORMAT_R16_SNORM,
+          PIPE_FORMAT_R16G16_SNORM,
+          PIPE_FORMAT_R16G16B16_SNORM,
+          PIPE_FORMAT_R16G16B16A16_SNORM } },
    };
 
    /* Required: vertex fetch support. */