summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-01-13 15:23:48 -0800
committerEric Anholt <[email protected]>2014-02-11 14:36:43 -0800
commit1edca151a00134778b959366d5e7c0a3b63cc8f7 (patch)
tree284ae78e0cb98d6a7aa436bc145ac4b8cbbb6895 /src/mesa/main/teximage.c
parent6d6a29018119fd414973ad051fc2271c784ef0f1 (diff)
mesa: GL_ARB_half_float_pixel is not optional
Almost every driver already supported it. All current and future Gallium drivers always support it, and most existing classic drivers support it. This only changes radeon and nouveau. This extension only adds data types that can be passed to, for example, glTexImage2D. It does not add internal formats. Since you can already pass GL_FLOAT to glTexImage2D this shouldn't pose any additional issues with those drivers. Note that r200 and i915 already supported this extension, and they don't support floating-point textures either. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 07ac1e1cfcd..5938f5046e0 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -397,11 +397,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
if (ctx->Extensions.ARB_texture_rg) {
switch (internalFormat) {
case GL_R16F:
- /* R16F depends on both ARB_half_float_pixel and ARB_texture_float.
- */
- if (!ctx->Extensions.ARB_half_float_pixel)
- break;
- /* FALLTHROUGH */
case GL_R32F:
if (!ctx->Extensions.ARB_texture_float)
break;
@@ -422,11 +417,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
return GL_RED;
case GL_RG16F:
- /* RG16F depends on both ARB_half_float_pixel and ARB_texture_float.
- */
- if (!ctx->Extensions.ARB_half_float_pixel)
- break;
- /* FALLTHROUGH */
case GL_RG32F:
if (!ctx->Extensions.ARB_texture_float)
break;
@@ -4183,8 +4173,6 @@ _mesa_validate_texbuffer_format(const struct gl_context *ctx,
return MESA_FORMAT_NONE;
datatype = _mesa_get_format_datatype(format);
- if (datatype == GL_FLOAT && !ctx->Extensions.ARB_texture_float)
- return MESA_FORMAT_NONE;
/* The GL_ARB_texture_buffer_object spec says:
*
@@ -4195,9 +4183,8 @@ _mesa_validate_texbuffer_format(const struct gl_context *ctx,
* As a result, GL_HALF_FLOAT internal format depends on both
* GL_ARB_texture_float and GL_ARB_half_float_pixel.
*/
- if (datatype == GL_HALF_FLOAT &&
- !(ctx->Extensions.ARB_half_float_pixel
- && ctx->Extensions.ARB_texture_float))
+ if ((datatype == GL_FLOAT || datatype == GL_HALF_FLOAT) &&
+ !ctx->Extensions.ARB_texture_float)
return MESA_FORMAT_NONE;
if (!ctx->Extensions.ARB_texture_rg) {