summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-03 11:46:31 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-03 11:46:31 +0000
commit9b8170ca5453ab008f08a1b6c6a08ae61c9283d5 (patch)
treecdf5e9ac0ea9f5a204fc07e48b916536a871ec31 /libvo
parent0fcb10126775c40a9cba9c2cb43cd57ef13bbaa6 (diff)
downloadmpv-9b8170ca5453ab008f08a1b6c6a08ae61c9283d5.tar.bz2
mpv-9b8170ca5453ab008f08a1b6c6a08ae61c9283d5.tar.xz
Latest 9.1 ATI drivers finally fixed PBOs, thus do not need ati-hack and are much
faster without it. Change autodetection accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28458 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 30402233af..a692d1573d 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -404,13 +404,22 @@ static void uninitGl(void) {
static void autodetectGlExtensions(void) {
const char *extensions = glGetString(GL_EXTENSIONS);
const char *vendor = glGetString(GL_VENDOR);
+ const char *version = glGetString(GL_VERSION);
int is_ati = strstr(vendor, "ATI") != NULL;
- if (ati_hack == -1) ati_hack = is_ati;
+ int ati_broken_pbo = 0;
+ if (is_ati && strncmp(version, "2.1.", 4) == 0) {
+ int ver = atoi(version + 4);
+ mp_msg(MSGT_VO, MSGL_V, "[gl] Detected ATI driver version: %i\n", ver);
+ ati_broken_pbo = ver && ver < 8395;
+ }
+ if (ati_hack == -1) ati_hack = ati_broken_pbo;
if (force_pbo == -1) force_pbo = strstr(extensions, "_pixel_buffer_object") ? is_ati : 0;
if (use_rectangle == -1) use_rectangle = strstr(extensions, "_texture_non_power_of_two") ? 0 : 0;
if (is_ati && (lscale == 1 || lscale == 2 || cscale == 1 || cscale == 2))
mp_msg(MSGT_VO, MSGL_WARN, "Selected scaling mode may be broken on ATI cards.\n"
"Tell _them_ to fix GL_REPEAT if you have issues.\n");
+ mp_msg(MSGT_VO, MSGL_V, "[gl] Settings after autodetection: ati-hack = %i, force-pbo = %i, rectangle = %i\n",
+ ati_hack, force_pbo, use_rectangle);
}
/**