[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33320] trunk/blender/source/blender/gpu/ intern/gpu_extensions.c: ATI X1xxx gfx cards (R500 chipset) lack full support for npot textures although they report the GLEW_ARB_texture_non_power_of_two extension .

Janne Karhu jhkarh at gmail.com
Thu Nov 25 23:15:04 CET 2010


Revision: 33320
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33320
Author:   jhk
Date:     2010-11-25 23:15:04 +0100 (Thu, 25 Nov 2010)

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

Modified Paths:
--------------
    trunk/blender/source/blender/gpu/intern/gpu_extensions.c

Modified: trunk/blender/source/blender/gpu/intern/gpu_extensions.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_extensions.c	2010-11-25 22:13:40 UTC (rev 33319)
+++ trunk/blender/source/blender/gpu/intern/gpu_extensions.c	2010-11-25 22:15:04 UTC (rev 33320)
@@ -67,10 +67,11 @@
 	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 @@
 	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 @@
 	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;
 }
 





More information about the Bf-blender-cvs mailing list