Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>2010-11-27 22:59:00 +0300
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>2010-11-27 22:59:00 +0300
commit9d3a17922cad62f1f73ba60eef669a091a2b8687 (patch)
tree6577dd6691f23ced67d432f24af7f969aeb6c6a6 /source/blender/gpu
parentf973be9fe4977ebec1a4fc4ddeef9a502ed23195 (diff)
Detect Gallium driver. Extend NPoT workaround to opensource drivers.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c17
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;