[Mesa-dev] [PATCH 01/10] i965: Re-disable EXT_texture_float pre-gen5.

Kenneth Graunke kenneth at whitecape.org
Tue Nov 8 12:28:20 PST 2011


On 11/04/2011 03:01 PM, Eric Anholt wrote:
> Texture filtering is not supported on floating-point textures until
> gen5, which showed up as failures in texwrap in particular.
> ---
>   src/mesa/drivers/dri/intel/intel_extensions.c |   13 +++++++------
>   1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
> index 7a5ef3e..5212168 100644
> --- a/src/mesa/drivers/dri/intel/intel_extensions.c
> +++ b/src/mesa/drivers/dri/intel/intel_extensions.c
> @@ -93,8 +93,14 @@ intelInitExtensions(struct gl_context *ctx)
>      ctx->Const.GLSLVersion = 120;
>      _mesa_override_glsl_version(ctx);
>
> -   if (intel->gen>= 5)
> +   if (intel->gen>= 5) {
>         ctx->Extensions.EXT_timer_query = true;
> +#ifdef TEXTURE_FLOAT_ENABLED
> +      ctx->Extensions.ARB_texture_float = true;
> +      ctx->Extensions.EXT_texture_shared_exponent = true;
> +      ctx->Extensions.EXT_packed_float = true;
> +#endif
> +   }
>
>      if (intel->gen>= 4) {
>         ctx->Extensions.ARB_color_buffer_float = true;
> @@ -107,11 +113,6 @@ intelInitExtensions(struct gl_context *ctx)
>         ctx->Extensions.ARB_point_sprite = true;
>         ctx->Extensions.ARB_seamless_cube_map = true;
>         ctx->Extensions.ARB_shader_texture_lod = true;
> -#ifdef TEXTURE_FLOAT_ENABLED
> -      ctx->Extensions.ARB_texture_float = true;
> -      ctx->Extensions.EXT_texture_shared_exponent = true;
> -      ctx->Extensions.EXT_packed_float = true;
> -#endif
>         ctx->Extensions.ARB_texture_compression_rgtc = true;
>         ctx->Extensions.ARB_texture_rg = true;
>         ctx->Extensions.EXT_draw_buffers2 = true;

Based on my reading of Vol_4_G45_subsystem.pdf pages 131-132, it looks 
like texture filtering is supported for R9G9B9E5_SHAREDEXP, so I think 
we ought to be able to leave EXT_texture_shared_exponent enabled.

It also looks like filtering is supported for R11G11B10_FLOAT, so we 
might be able to leave EXT_packed_float enabled as well.

I agree that we can't do ARB_texture_float---texture filtering is 
clearly not supported for R32G32B32A32_FLOAT.


More information about the mesa-dev mailing list