diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-02-04 00:28:17 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-02-04 00:28:17 +0200 |
commit | 9790f4e6e72cdc8093be966d3d6e007c8f44a035 (patch) | |
tree | 3d4a19a910d34be6ee7cd4841876a4318d5c243d /libvo/vo_gl.c | |
parent | ccf4d9e96cd7aa8506e6632d2a7352ec89b2b9e3 (diff) | |
parent | 09bf506c34a73d587c999ce161a0714159e1e5b6 (diff) | |
download | mpv-9790f4e6e72cdc8093be966d3d6e007c8f44a035.tar.bz2 mpv-9790f4e6e72cdc8093be966d3d6e007c8f44a035.tar.xz |
Merge svn changes up to r28461
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 6d9c173f68..618b13e5f7 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" + mp_msg(MSGT_VO, MSGL_WARN, "[gl] 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); } /** |