ATI X1xxx gfx cards (R500 chipset) lack full support for npot textures although they report the GLEW_ARB_texture_non_power_of_two extension.

This commit is contained in:
Janne Karhu
2010-11-25 22:15:04 +00:00
parent 5d0b3a5230
commit b0df3a29f2

View File

@@ -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;
}