summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-02-16 00:40:37 +0100
committerMarek Olšák <[email protected]>2011-04-15 05:08:00 +0200
commit8e28d842d192e69ba8cae4f9754766a26ae8c739 (patch)
tree938636212c9801456414aa319fc5cc8548ae8f4f /src/mesa/state_tracker/st_extensions.c
parent33128310b0ae67cb77f9854b206bc03dd24755ea (diff)
st/mesa: convert Mesa float formats to Gallium
Squashed commit of the following: Author: Marek Olšák <[email protected]> st/mesa: require RGBA16F and RGBA32F to be renderable st/mesa: fix L32F and L16F format translation st/mesa: also convert the R/RG float formats commit 49a9948b6a81b7d813304d081139d98e95ba5d1a Author: Luca Barbieri <[email protected]> Date: Fri Aug 20 10:36:17 2010 +0200 mesa/st: enable ARB_texture_float if supported formats allow it commit 7383632f7b6f9021b65f4973b7e7c99f0e8ce9b2 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:46 2010 +0200 mesa/st: support ARB_texture_float internal formats commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:33 2010 +0200 mesa/st: convert L/A/I floating point formats
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 9bc9d7a10f5..bdc08949dd4 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -382,6 +382,18 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
+ /* float support - assume nothing exclusively supports 64-bit floats */
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_FLOAT,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW |
+ PIPE_BIND_RENDER_TARGET) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW |
+ PIPE_BIND_RENDER_TARGET)) {
+ ctx->Extensions.ARB_texture_float = GL_TRUE;
+ }
+
/* sRGB support */
if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
PIPE_TEXTURE_2D, 0,