diff options
6 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 8dd28601d34..1db424b514d 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -61,6 +61,7 @@ int GPU_print_error(const char *str); int GPU_glsl_support(void); int GPU_non_power_of_two_support(void); +int GPU_display_list_support(void); int GPU_color_depth(void); void GPU_code_generate_glsl_lib(void); int GPU_bicubic_bump_support(void); diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index ea7b169a882..1d08f1f6ea9 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -86,6 +86,7 @@ static struct GPUGlobal { int extdisabled; int colordepth; int npotdisabled; /* ATI 3xx-5xx (and more) chipsets support NPoT partially (== not enough) */ + int dlistsdisabled; /* Legacy ATI driver does not support display lists well */ GPUDeviceType device; GPUOSType os; GPUDriverType driver; @@ -190,6 +191,9 @@ void GPU_extensions_init(void) * Incomplete list http://dri.freedesktop.org/wiki/ATIRadeon * New IDs from MESA's src/gallium/drivers/r300/r300_screen.c */ + /* This list is close enough to those using the legacy driver which + * has a bug with display lists and glVertexAttrib + */ if (strstr(renderer, "R3") || strstr(renderer, "RV3") || strstr(renderer, "R4") || strstr(renderer, "RV4") || strstr(renderer, "RS4") || strstr(renderer, "RC4") || @@ -200,6 +204,7 @@ void GPU_extensions_init(void) strstr(renderer, "RADEON 9")) { GG.npotdisabled = 1; + GG.dlistsdisabled = 1; } } @@ -238,6 +243,11 @@ int GPU_non_power_of_two_support(void) return GLEW_ARB_texture_non_power_of_two; } +int GPU_display_list_support(void) +{ + return !GG.dlistsdisabled; +} + int GPU_color_depth(void) { return GG.colordepth; diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index cab1cbde94f..484e51c4ed1 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -266,7 +266,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0); bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool animation_record = (SYS_GetCommandLineInt(syshandle, "animation_record", 0) != 0); - bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0); + bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0) && GPU_display_list_support(); #ifdef WITH_PYTHON bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0); #endif diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index ad6c8a38305..c74e3daf7b2 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -566,7 +566,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) bool fixed_framerate= (SYS_GetCommandLineInt(syshandle, "fixedtime", (gm->flag & GAME_ENABLE_ALL_FRAMES)) != 0); bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); - bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0); + bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0) && GPU_display_list_support(); bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 1) != 0); bool restrictAnimFPS = gm->flag & GAME_RESTRICT_ANIM_UPDATES; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index a1c0836417a..e1dbd6f0a7f 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -127,11 +127,8 @@ bool RAS_ListSlot::End() RAS_ListRasterizer::RAS_ListRasterizer(RAS_ICanvas* canvas, bool lock, int storage) -: RAS_OpenGLRasterizer(canvas, storage), - mATI(false) +: RAS_OpenGLRasterizer(canvas, storage) { - if (!strcmp((const char*)glGetString(GL_VENDOR), "ATI Technologies Inc.")) - mATI = true; } RAS_ListRasterizer::~RAS_ListRasterizer() diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h index 558850a9173..d394c72b2a2 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h @@ -51,7 +51,6 @@ typedef std::map<DerivedMesh*, RAS_ListSlots*> RAS_DerivedMeshLists; class RAS_ListRasterizer : public RAS_OpenGLRasterizer { - bool mATI; RAS_ArrayLists mArrayLists; RAS_DerivedMeshLists mDerivedMeshLists; |