[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30407] trunk/blender/source/blender: 2.5: automatic draw method now uses overlap for Intel on all platforms.
Brecht Van Lommel
brecht at blender.org
Fri Jul 16 12:13:04 CEST 2010
Revision: 30407
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30407
Author: blendix
Date: 2010-07-16 12:13:04 +0200 (Fri, 16 Jul 2010)
Log Message:
-----------
2.5: automatic draw method now uses overlap for Intel on all platforms.
Modified Paths:
--------------
trunk/blender/source/blender/gpu/GPU_extensions.h
trunk/blender/source/blender/gpu/intern/gpu_extensions.c
trunk/blender/source/blender/windowmanager/intern/wm_draw.c
Modified: trunk/blender/source/blender/gpu/GPU_extensions.h
===================================================================
--- trunk/blender/source/blender/gpu/GPU_extensions.h 2010-07-16 09:45:09 UTC (rev 30406)
+++ trunk/blender/source/blender/gpu/GPU_extensions.h 2010-07-16 10:13:04 UTC (rev 30407)
@@ -75,17 +75,17 @@
} GPUDeviceType;
typedef enum GPUOSType {
- GPU_OS_WIN = (1<<16),
- GPU_OS_MAC = (1<<17),
- GPU_OS_UNIX = (1<<18),
+ GPU_OS_WIN = (1<<8),
+ GPU_OS_MAC = (1<<9),
+ GPU_OS_UNIX = (1<<10),
GPU_OS_ANY = (0xff00)
} GPUOSType;
typedef enum GPUDriverType {
- GPU_DRIVER_OFFICIAL = (1<<24),
- GPU_DRIVER_OPENSOURCE = (1<<25),
- GPU_DRIVER_SOFTWARE = (1<<26),
- GPU_DRIVER_UNKNOWN = (0xff0000)
+ GPU_DRIVER_OFFICIAL = (1<<16),
+ GPU_DRIVER_OPENSOURCE = (1<<17),
+ GPU_DRIVER_SOFTWARE = (1<<18),
+ GPU_DRIVER_ANY = (0xff0000)
} GPUDriverType;
int GPU_type_matches(GPUDeviceType device, GPUOSType os, GPUDriverType driver);
Modified: trunk/blender/source/blender/gpu/intern/gpu_extensions.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_extensions.c 2010-07-16 09:45:09 UTC (rev 30406)
+++ trunk/blender/source/blender/gpu/intern/gpu_extensions.c 2010-07-16 10:13:04 UTC (rev 30407)
@@ -152,8 +152,8 @@
GG.driver = GPU_DRIVER_SOFTWARE;
}
else {
- GG.device = GPU_DEVICE_UNKNOWN;
- GG.driver = GPU_DRIVER_UNKNOWN;
+ GG.device = GPU_DEVICE_ANY;
+ GG.driver = GPU_DRIVER_ANY;
}
GG.os = GPU_OS_UNIX;
Modified: trunk/blender/source/blender/windowmanager/intern/wm_draw.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_draw.c 2010-07-16 09:45:09 UTC (rev 30406)
+++ trunk/blender/source/blender/windowmanager/intern/wm_draw.c 2010-07-16 10:13:04 UTC (rev 30407)
@@ -677,13 +677,22 @@
static int wm_automatic_draw_method(wmWindow *win)
{
+ /* Ideally all cards would work well with triple buffer, since if it works
+ well gives the least redraws and is considerably faster at partial redraw
+ for sculpting or drawing overlapping menus. For typically lower end cards
+ copy to texture is slow though and so we use overlap instead there. */
+
if(win->drawmethod == USER_DRAW_AUTOMATIC) {
/* ATI opensource driver is known to be very slow at this */
if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE))
return USER_DRAW_OVERLAP;
+ /* also Intel drivers don't work well with this */
+ else if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY))
+ return USER_DRAW_OVERLAP;
/* Windows software driver darkens color on each redraw */
else if(GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
return USER_DRAW_OVERLAP_FLIP;
+ /* drawing lower color depth again degrades colors each time */
else if(GPU_color_depth() < 24)
return USER_DRAW_OVERLAP;
else
More information about the Bf-blender-cvs
mailing list