summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2019-02-12 22:34:25 -0500
committerIlia Mirkin <[email protected]>2019-02-18 12:13:54 -0500
commit9fec6530930c95a7a36f24e3097a87cb8407340d (patch)
tree9e91da711072946b29853ba5cc56030886bd5015 /src/mesa/state_tracker/st_extensions.c
parent070a5e5d9248a77aa84375f74fe48c5067362ea8 (diff)
st/mesa: enable GL_EXT_float_blend when possible
If the driver supports PIPE_BIND_BLENABLE on RGBA32F, flip EXT_float_blend on (which will affect ES3 contexts). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d2660099fc1..528e6b74a54 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -820,6 +820,12 @@ void st_init_extensions(struct pipe_screen *screen,
PIPE_FORMAT_R16G16B16A16_SNORM } },
};
+ /* 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) },
@@ -1025,6 +1031,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);