2.5: automatic draw method now uses overlap for Intel on all platforms.
This commit is contained in:
@@ -75,17 +75,17 @@ typedef enum GPUDeviceType {
|
||||
} 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);
|
||||
|
||||
@@ -152,8 +152,8 @@ void GPU_extensions_init()
|
||||
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;
|
||||
|
||||
@@ -677,13 +677,22 @@ static int wm_draw_update_test_window(wmWindow *win)
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user