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:
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index b3415efc447..d823eddcc83 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -67,10 +67,11 @@ 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 */
GPUDeviceType device;
GPUOSType os;
GPUDriverType driver;
-} GG = {1, 0, 0, 0};
+} GG = {1, 0, 0, 0, 0};
/* GPU Types */
@@ -119,6 +120,12 @@ void GPU_extensions_init()
if(strstr(vendor, "ATI")) {
GG.device = GPU_DEVICE_ATI;
GG.driver = GPU_DRIVER_OFFICIAL;
+
+ /* ATI X1xxx cards (R500 chipset) lack full support for npot textures
+ * although they report the GLEW_ARB_texture_non_power_of_two extension.
+ */
+ if(strstr(renderer, "X1"))
+ GG.npotdisabled = 1;
}
else if(strstr(vendor, "NVIDIA")) {
GG.device = GPU_DEVICE_NVIDIA;
@@ -177,6 +184,9 @@ int GPU_non_power_of_two_support()
if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_MAC, GPU_DRIVER_OFFICIAL))
return 0;
+ if(GG.npotdisabled)
+ return 0;
+
return GLEW_ARB_texture_non_power_of_two;
}