diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index d823eddcc83..d147dd277e2 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -67,7 +67,7 @@ static struct GPUGlobal { int glslsupport; int extdisabled; int colordepth; - int npotdisabled; /* Special case for Ati R500 chipset cards that only support npot with severe restrictions */ + int npotdisabled; /* ATI 3xx-5xx (and more) chipsets support NPoT partially (== not enough) */ GPUDeviceType device; GPUOSType os; GPUDriverType driver; @@ -92,7 +92,7 @@ void GPU_extensions_init() GLint r, g, b; const char *vendor, *renderer; - /* can't avoid calling this multiple times, see wm_window_add_ghostwindow */ + /* can't avoid calling this multiple times, see wm_window_add_ghostwindow */ static char init= 0; if(init) return; init= 1; @@ -138,9 +138,20 @@ void GPU_extensions_init() GG.device = GPU_DEVICE_INTEL; GG.driver = GPU_DRIVER_OFFICIAL; } - else if(strstr(renderer, "Mesa DRI R")) { + else if(strstr(renderer, "Mesa DRI R") || (strstr(renderer, "Gallium ") && strstr(renderer, " on ATI "))) { GG.device = GPU_DEVICE_ATI; GG.driver = GPU_DRIVER_OPENSOURCE; + /* ATI 9500 to X2300 cards support NPoT textures poorly + * Incomplete list http://dri.freedesktop.org/wiki/ATIRadeon + * New IDs from MESA's src/gallium/drivers/r300/r300_screen.c + */ + if(strstr(renderer, "R3") || strstr(renderer, "RV3") || + strstr(renderer, "R4") || strstr(renderer, "RV4") || + strstr(renderer, "RS4") || strstr(renderer, "RC4") || + strstr(renderer, "R5") || strstr(renderer, "RV5") || + strstr(renderer, "RS600") || strstr(renderer, "RS690") || + strstr(renderer, "RS740")) + GG.npotdisabled = 1; } else if(strstr(renderer, "Nouveau") || strstr(vendor, "nouveau")) { GG.device = GPU_DEVICE_NVIDIA; |