diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-11-26 01:15:04 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-11-26 01:15:04 +0300 |
commit | b0df3a29f2b3032bbbe1d631fa15cbdc59272402 (patch) | |
tree | 715f26bdab79a2d319aa05392225f66e5e8808eb | |
parent | 5d0b3a5230dd8ff10efcdec21931e1c6de88d700 (diff) |
ATI X1xxx gfx cards (R500 chipset) lack full support for npot textures although they report the GLEW_ARB_texture_non_power_of_two extension.
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 12 |
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; } |