Don't specify the texture target explicitly with r300g.
This is reported to cause a performance regression. FIXED-IN: 4.6.0 BUG: 256654 svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1215519icc-effect-5.14.5
parent
35dcccb847
commit
e7d37dfbb3
|
@ -66,6 +66,7 @@ Sources and other compositing managers:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "scene_opengl.h"
|
#include "scene_opengl.h"
|
||||||
|
#include "kwinglplatform.h"
|
||||||
|
|
||||||
#include <kxerrorhandler.h>
|
#include <kxerrorhandler.h>
|
||||||
|
|
||||||
|
@ -1136,17 +1137,22 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
|
||||||
GLX_MIPMAP_TEXTURE_EXT, fbcdrawableinfo[ depth ].mipmap,
|
GLX_MIPMAP_TEXTURE_EXT, fbcdrawableinfo[ depth ].mipmap,
|
||||||
None, None, None
|
None, None, None
|
||||||
};
|
};
|
||||||
if ( ( fbcdrawableinfo[ depth ].texture_targets & GLX_TEXTURE_2D_BIT_EXT ) &&
|
// Specifying the texture target explicitly is reported to cause a performance
|
||||||
( GLTexture::NPOTTextureSupported() ||
|
// regression with R300G (see bug #256654).
|
||||||
( isPowerOfTwo(size.width()) && isPowerOfTwo(size.height()) )))
|
if ( GLPlatform::instance()->driver() != Driver_R300G )
|
||||||
{
|
{
|
||||||
attrs[ 4 ] = GLX_TEXTURE_TARGET_EXT;
|
if ( ( fbcdrawableinfo[ depth ].texture_targets & GLX_TEXTURE_2D_BIT_EXT ) &&
|
||||||
attrs[ 5 ] = GLX_TEXTURE_2D_EXT;
|
( GLTexture::NPOTTextureSupported() ||
|
||||||
}
|
( isPowerOfTwo(size.width()) && isPowerOfTwo(size.height()) )))
|
||||||
else if ( fbcdrawableinfo[ depth ].texture_targets & GLX_TEXTURE_RECTANGLE_BIT_EXT )
|
{
|
||||||
{
|
attrs[ 4 ] = GLX_TEXTURE_TARGET_EXT;
|
||||||
attrs[ 4 ] = GLX_TEXTURE_TARGET_EXT;
|
attrs[ 5 ] = GLX_TEXTURE_2D_EXT;
|
||||||
attrs[ 5 ] = GLX_TEXTURE_RECTANGLE_EXT;
|
}
|
||||||
|
else if ( fbcdrawableinfo[ depth ].texture_targets & GLX_TEXTURE_RECTANGLE_BIT_EXT )
|
||||||
|
{
|
||||||
|
attrs[ 4 ] = GLX_TEXTURE_TARGET_EXT;
|
||||||
|
attrs[ 5 ] = GLX_TEXTURE_RECTANGLE_EXT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glxpixmap = glXCreatePixmap( display(), fbcdrawableinfo[ depth ].fbconfig, pix, attrs );
|
glxpixmap = glXCreatePixmap( display(), fbcdrawableinfo[ depth ].fbconfig, pix, attrs );
|
||||||
#ifdef CHECK_GL_ERROR
|
#ifdef CHECK_GL_ERROR
|
||||||
|
|
Loading…
Reference in New Issue