[Mesa-dev] [PATCH 2/3] st/mesa: enable GL_EXT_blend_float

Ilia Mirkin imirkin at alum.mit.edu
Mon Nov 2 16:50:59 PST 2015


If the driver supports PIPE_BIND_BLENABLE on RGBA32F, flip
EXT_blend_float on (which will affect ES3 contexts).

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/mesa/state_tracker/st_extensions.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index bd7cbcc..e69cd3a 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -533,6 +533,12 @@ void st_init_extensions(struct pipe_screen *screen,
           PIPE_FORMAT_R8G8_UNORM } },
    };
 
+   /* Required: render target, sampler, and blending */
+   static const struct st_extension_format_mapping rt_blendable[] = {
+      { { o(EXT_float_blend) },
+        { PIPE_FORMAT_R32G32B32A32_FLOAT } },
+   };
+
    /* Required: depth stencil and sampler support */
    static const struct st_extension_format_mapping depthstencil_mapping[] = {
       { { o(ARB_depth_buffer_float) },
@@ -677,6 +683,10 @@ void st_init_extensions(struct pipe_screen *screen,
    init_format_extensions(screen, extensions, rendertarget_mapping,
                           ARRAY_SIZE(rendertarget_mapping), PIPE_TEXTURE_2D,
                           PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW);
+   init_format_extensions(screen, extensions, rt_blendable,
+                          ARRAY_SIZE(rt_blendable), PIPE_TEXTURE_2D,
+                          PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |
+                          PIPE_BIND_BLENDABLE);
    init_format_extensions(screen, extensions, depthstencil_mapping,
                           ARRAY_SIZE(depthstencil_mapping), PIPE_TEXTURE_2D,
                           PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_SAMPLER_VIEW);
-- 
2.4.10



More information about the mesa-dev mailing list