mesa/st: do not probe for the same texture-formats twice
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 16 Nov 2018 09:28:06 +0000 (10:28 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 3 Dec 2018 17:16:44 +0000 (18:16 +0100)
This should be equalent of what we did before.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_extensions.c

index 16889074f66337eb495f512e69b1f26e94c7f8c7..b0fc824e30ccd1d675c988c2c3e2819955da1e5b 100644 (file)
@@ -771,10 +771,6 @@ void st_init_extensions(struct pipe_screen *screen,
 
    /* Required: render target and sampler support */
    static const struct st_extension_format_mapping rendertarget_mapping[] = {
-      { { o(ARB_texture_float) },
-        { PIPE_FORMAT_R32G32B32A32_FLOAT,
-          PIPE_FORMAT_R16G16B16A16_FLOAT } },
-
       { { o(OES_texture_float) },
         { PIPE_FORMAT_R32G32B32A32_FLOAT } },
 
@@ -1461,6 +1457,10 @@ void st_init_extensions(struct pipe_screen *screen,
       }
    }
 
+   extensions->ARB_texture_float =
+      extensions->OES_texture_half_float &&
+      extensions->OES_texture_float;
+
    if (extensions->EXT_texture_filter_anisotropic &&
        screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_ANISOTROPY) >= 16.0)
       extensions->ARB_texture_filter_anisotropic = GL_TRUE;