Comment 16 for bug 146298

Revision history for this message
ajonat (ajonat) wrote : Re: intel gm965 compiz dual head issues

Travis, you were right, the drivers were the problem.
Here's what I did to make compiz work with larger resolutions (beyond 2048):
First, I did apt-get source xserver-xorg-video-intel and applied the following patch:
http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-intel.git;a=blobdiff;h=ada3919adf33179ab72aecfdc2e9e48c439f8888;hp=7f798e6c8dfb0a5775cae5d4e6595d8d09b2a251;hb=4f5500abe209b92b39ae1f2d7a1118362ac95034;f=src/i965_render.c
What this does is to enable support for larger resolutions (up to 8192x8192) in the i965 driver, as you can see in the diff:
- if ((w > 0x7ff) || (h > 0x7ff))
+ if ((w > 8192) || (h > 8192))

Then, I applied the following patch in mesa7.0-rc3 (latest in ubuntu hardy):
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_c!
index 1601f6d..c06f5da 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -138,10 +138,10 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
    /* Advertise the full hardware capabilities. The new memory
     * manager should cope much better with overload situations:
     */
- ctx->Const.MaxTextureLevels = 12;
+ ctx->Const.MaxTextureLevels = 13;
    ctx->Const.Max3DTextureLevels = 9;
    ctx->Const.MaxCubeTextureLevels = 12;
- ctx->Const.MaxTextureRectSize = (1<<11);
+ ctx->Const.MaxTextureRectSize = (1<<12);
    ctx->Const.MaxTextureUnits = BRW_MAX_TEX_UNIT;

 /* ctx->Const.MaxNativeVertexProgramTemps = 32; */

Then, I dpkg-buildpackage xserver-xorg-video-intel and mesa7.0rc3 with both patches applied and installed them, and voila! Problem solved.

ajonat@daphne:~$ glxinfo -l | grep GL_MAX_TEXTURE_SIZE
    GL_MAX_TEXTURE_SIZE = 4096

This limit is because mesa can't handle resoutions larger than 4096 but that isn't problem for me as I wanted 2960x1050.
You also have to put the according virtual resolution in xorg.conf for this to work.

References:
http://lists.freedesktop.org/archives/xorg/2008-April/034960.html

Thank you everyone!
Alex.

P.S. any chance to see this patches applied to hardy's latest packages?