[Mesa-dev] [PATCH 1/2] intel: Enable S3TC extensions always

Kenneth Graunke kenneth at whitecape.org
Sat Oct 20 22:14:24 PDT 2012


On 10/18/2012 02:02 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Always enable the use of pre- compressed texture data, and always advertise
> the ability to do on-line compression.  The ability to perform on-line
> compression still requires the presence of libtxc_dxtn, so sometimes the
> driver incorrectly over-advertises functionality.  This should not impact many
> (if any) real applications.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>

I feel compelled to mention one further fact: requesting online 
compression without having libtxc_dxtn installed will cause Mesa to fall 
back to a generic compressed format, which (on our driver) will fall 
back to RGBA.  So textures will still get uploaded and generally work; 
they just won't be in the S3TC format.  Only applications that request 
online compression, read back the textures, and expect S3TC data should 
be affected.  This is an even smaller niche.

For both patches:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

I'll gladly defer to your judgment on backporting.

> ---
>   src/mesa/drivers/dri/intel/intel_extensions.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
> index ec99c3e..40fdd23 100755
> --- a/src/mesa/drivers/dri/intel/intel_extensions.c
> +++ b/src/mesa/drivers/dri/intel/intel_extensions.c
> @@ -179,14 +179,9 @@ intelInitExtensions(struct gl_context *ctx)
>   	 ctx->Extensions.ARB_occlusion_query = true;
>      }
>
> -   if (intel->ctx.Mesa_DXTn) {
> -      ctx->Extensions.ANGLE_texture_compression_dxt = true;
> -      ctx->Extensions.EXT_texture_compression_s3tc = true;
> -      ctx->Extensions.S3_s3tc = true;
> -   }
> -   else if (driQueryOptionb(&intel->optionCache, "force_s3tc_enable")) {
> -      ctx->Extensions.EXT_texture_compression_s3tc = true;
> -   }
> +   ctx->Extensions.ANGLE_texture_compression_dxt = true;
> +   ctx->Extensions.EXT_texture_compression_s3tc = true;
> +   ctx->Extensions.S3_s3tc = true;
>
>      if (intel->gen >= 4) {
>         ctx->Extensions.NV_primitive_restart = true;
>



More information about the mesa-dev mailing list