st/mesa: convert Mesa float formats to Gallium

Squashed commit of the following:

Author: Marek Olšák <maraeo@gmail.com>

    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 <luca@luca-barbieri.com>
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 <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:00:46 2010 +0200

    mesa/st: support ARB_texture_float internal formats

commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:00:33 2010 +0200

    mesa/st: convert L/A/I floating point formats
This commit is contained in:
Marek Olšák
2011-02-16 00:40:37 +01:00
parent 33128310b0
commit 8e28d842d1
2 changed files with 249 additions and 0 deletions

View File

@@ -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,