Comment 2 for bug 207770

Revision history for this message
mettle (s031877) wrote :

Short summary: I experienced this bug as well and wrote a patch for it. I submitted it to <email address hidden> - but apparantly nothing happened. I got a mail from Søren Hansen (at Ubuntu) to submit a bug in here. I stumbled over this bug report, so here's a replacement for the check_texture_size() in /usr/bin/compiz.

# Check if the max texture size is large enough compared to the resolution
check_texture_size()
{
       # Check how many screens we've got and iterate over them
       N=$(xdpyinfo | grep "number of screens" | sed 's/.*[^0-9]//g')
       for i in $(seq 1 $N); do
               TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed 's/.*=[^0-9]//g' | awk NR==$i)
               RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//' | awk NR==$i)
               VRES=$(echo $RESOLUTION | sed 's/.*x//')
               HRES=$(echo $RESOLUTION | sed 's/x.*//')
               verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): ";
               if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then
                       verbose "Failed.\n"
                       return 1;
               fi
               verbose "Passed.\n"
       done
       return 0
}