Bug 8042

Summary: The force_s3tc_enable value is ignored by the i915 driver.
Product: Mesa Reporter: Loic Dachary <loic>
Component: Drivers/DRI/i915Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Loic Dachary 2006-08-28 07:27:43 UTC
Prevents all applications that send s3tc compressed textures to run although
they could.

When ~/.drirc contains

<driconf>
    <device screen="0" driver="i915">
        <application name="Default">
            <option name="force_s3tc_enable" value="true" />
        </application>
    </device>
</driconf>

glxinfo does not display the GL_EXT_texture_compression_s3tc extention
as it should. &intel should be used instead of &intelScreen in intel_context.c,
as shown in the following patch against the CVS located at
:pserver:anonymous@dri.freedesktop.org:/cvs/mesa

*** intel_context.c	18 Aug 2006 11:04:48 +0200	1.27
--- intel_context.c	28 Aug 2006 16:10:53 +0200	
***************
*** 399,405 ****
       _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" );
       _mesa_enable_extension( ctx, "GL_S3_s3tc" );
     }
!    else if (driQueryOptionb (&intelScreen->optionCache, "force_s3tc_enable")) {
       _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" );
     }
  
--- 399,405 ----
       _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" );
       _mesa_enable_extension( ctx, "GL_S3_s3tc" );
     }
!    else if (driQueryOptionb (&intel->optionCache, "force_s3tc_enable")) {
       _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" );
     }
Comment 1 Brian Paul 2006-08-28 08:17:29 UTC
Patch applied to CVS.  Is that all that's needed?  If so, please close this bug.
Comment 2 Loic Dachary 2006-08-28 09:43:58 UTC
That's all, thanks.
Comment 3 Roland Scheidegger 2006-08-28 10:20:07 UTC
At a quick glance, it looks to me like the vblank_mode and allow_large_textures
option (in both i830 and i915 contexts) would be broken just as well? The i965
driver also looks suspicious, though this one doesn't seem to initialize the
context option cache in the first place.
Comment 4 Adam Jackson 2009-08-24 12:24:14 UTC
Mass version move, cvs -> git

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.