summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-04 19:56:26 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-04 19:56:26 +0000
commite6455d7161ebc8245cec46492b6aca0773170312 (patch)
tree8bea4662ee440347549380232dcb9d6d38300295 /libvo
parent3107620451ec44231137bd0ee75e9dc17d1f54b6 (diff)
downloadmpv-e6455d7161ebc8245cec46492b6aca0773170312.tar.bz2
mpv-e6455d7161ebc8245cec46492b6aca0773170312.tar.xz
Check texture dimensions instead of internal format in max texture
size check to work around OS X ATI driver bugs: - does not keep format but use an equivalent one (1 becomes 0x8040). - does not set to 0 on failure but to 0x8018 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31013 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 22281bb999..a1d0506a99 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -172,7 +172,6 @@ static int initTextures(void)
GLfloat texpercx, texpercy;
int s;
int x=0, y=0;
- GLint format=0;
// textures smaller than 64x64 might not be supported
s=64;
@@ -190,15 +189,16 @@ static int initTextures(void)
/* Test the max texture size */
do {
+ GLint w;
glTexImage2D (GL_PROXY_TEXTURE_2D, 0,
gl_internal_format,
texture_width, texture_height,
0, gl_bitmap_format, gl_bitmap_type, NULL);
glGetTexLevelParameteriv
- (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
+ (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
- if (format == gl_internal_format)
+ if (w >= texture_width)
break;
mp_msg (MSGT_VO, MSGL_V, "[gl2] Needed texture [%dx%d] too big, trying ",