BGE: Potential fix for [#35522] Broken game engine compatibility since 2.66a on some ATI cards?

Disabling display lists for legacy ATI cards since they don't support display lists well.

Also removing an unused variable from the display list rasterizer.
This commit is contained in:
Daniel Stokes 2013-09-11 23:24:45 +00:00
parent 202109a8f5
commit 494687908c
6 changed files with 14 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -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()

View File

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