From b0df3a29f2b3032bbbe1d631fa15cbdc59272402 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Thu, 25 Nov 2010 22:15:04 +0000 Subject: ATI X1xxx gfx cards (R500 chipset) lack full support for npot textures although they report the GLEW_ARB_texture_non_power_of_two extension. --- source/blender/gpu/intern/gpu_extensions.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu') 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; } -- cgit v1.2.3