Skip to content

Commit

Permalink
AMD: Detect 13399 drivers in classic renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
meag committed Jul 16, 2021
1 parent b13edd9 commit 2843371
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions release-notes-latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Leaving these here as bugs between dev versions of 3.6 aren't in the release not

- On startup (after `autoexec.cfg` executed), a `vid_restart`/`s_restart` will be issued if any latched variables were changed (#458)
- Fixed bug causing off-by-one error when drawing rectangle outlines (3.5 bug, reported by Matrix, #536)
- Detection of AMD drivers .13399 wasn't being working in classic renderer (#416)

### Changes from alpha7=>alpha8 (Feb 9th => July 13th)

Expand Down
17 changes: 16 additions & 1 deletion vid_common_gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,21 @@ static void OnChange_gl_ext_texture_compression(cvar_t *var, char *string, qbool

/************************************** GL INIT **************************************/

static qbool GL_BrokenAmdVersion(void)
{
if (COM_CheckParm(cmdline_param_client_no_amd_fix)) {
// user has asked for driver detection to be turned off
return false;
}

if (!strstr(glConfig.vendor_string, "ATI")) {
return false;
}

// <anything>.13399 <anything>, might get different version number depending on what we asked for previously
return strstr(glConfig.version_string, ".13399 ") != NULL;
}

static void GL_PopulateConfig(void)
{
int r, g, b, a;
Expand Down Expand Up @@ -244,7 +259,7 @@ static void GL_PopulateConfig(void)
R_TraceAPI("Texture units: %d", glConfig.texture_units);
R_TraceAPI("Alignments: ubo(%d) ssb(%d)", glConfig.uniformBufferOffsetAlignment, glConfig.shaderStorageBufferOffsetAlignment);

glConfig.amd_issues = !COM_CheckParm(cmdline_param_client_no_amd_fix) && !strncmp(glConfig.version_string, "4.5.13399", sizeof("4.5.13399") - 1) && strstr(glConfig.vendor_string, "ATI");
glConfig.amd_issues = GL_BrokenAmdVersion();
}

// meag: EXT => ARB didn't change value of constants, so still using _EXT versions
Expand Down

0 comments on commit 2843371

Please sign in to comment.