wined3d: Improved ATI Radeon HD 4xxx detection.

This commit is contained in:
Yann Droneaud 2009-06-16 17:16:42 +02:00 committed by Alexandre Julliard
parent c9ef1ed28c
commit a203876cc7
2 changed files with 48 additions and 7 deletions

View File

@ -1272,16 +1272,43 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
}
break;
case VENDOR_ATI:
/* See http://developer.amd.com/drivers/pc_vendor_id/Pages/default.aspx
*
* beware: renderer string do not match exact card model,
* eg HD 4800 is returned for multiple card, even for RV790 based one
*/
if(WINE_D3D9_CAPABLE(gl_info)) {
/* Radeon R7xx HD4800 - highend */
if (strstr(gl_info->gl_renderer, "HD 4800") ||
strstr(gl_info->gl_renderer, "HD 4830") ||
strstr(gl_info->gl_renderer, "HD 4850") ||
strstr(gl_info->gl_renderer, "HD 4870") ||
strstr(gl_info->gl_renderer, "HD 4890"))
if (strstr(gl_info->gl_renderer, "HD 4800") || /* Radeon RV7xx HD48xx generic renderer string */
strstr(gl_info->gl_renderer, "HD 4830") || /* Radeon RV770 */
strstr(gl_info->gl_renderer, "HD 4850") || /* Radeon RV770 */
strstr(gl_info->gl_renderer, "HD 4870") || /* Radeon RV770 */
strstr(gl_info->gl_renderer, "HD 4890")) /* Radeon RV790 */
{
gl_info->gl_card = CARD_ATI_RADEON_HD4800;
vidmem = 512; /* HD4800 cards use 512-1024MB */
vidmem = 512; /* note: HD4890 cards use 1024MB */
}
/* Radeon R740 HD4700 - midend */
else if (strstr(gl_info->gl_renderer, "HD 4700") || /* Radeon RV770 */
strstr(gl_info->gl_renderer, "HD 4770")) /* Radeon RV740 */
{
gl_info->gl_card = CARD_ATI_RADEON_HD4700;
vidmem = 512;
}
/* Radeon R730 HD4600 - midend */
else if (strstr(gl_info->gl_renderer, "HD 4600") || /* Radeon RV730 */
strstr(gl_info->gl_renderer, "HD 4650") || /* Radeon RV730 */
strstr(gl_info->gl_renderer, "HD 4670")) /* Radeon RV730 */
{
gl_info->gl_card = CARD_ATI_RADEON_HD4600;
vidmem = 512;
}
/* Radeon R710 HD4500/HD4350 - lowend */
else if (strstr(gl_info->gl_renderer, "HD 4350") || /* Radeon RV710 */
strstr(gl_info->gl_renderer, "HD 4550")) /* Radeon RV710 */
{
gl_info->gl_card = CARD_ATI_RADEON_HD4350;
vidmem = 256;
}
/* Radeon R6xx HD2900/HD3800 - highend */
else if (strstr(gl_info->gl_renderer, "HD 2900") ||
@ -4023,6 +4050,9 @@ static const struct driver_version_information driver_version_table[] = {
{VENDOR_ATI, CARD_ATI_RADEON_HD2300, "ATI Mobility Radeon HD 2300", 6, 14, 10, 6764 },
{VENDOR_ATI, CARD_ATI_RADEON_HD2600, "ATI Mobility Radeon HD 2600", 6, 14, 10, 6764 },
{VENDOR_ATI, CARD_ATI_RADEON_HD2900, "ATI Radeon HD 2900 XT", 6, 14, 10, 6764 },
{VENDOR_ATI, CARD_ATI_RADEON_HD4350, "ATI Radeon HD 4350", 6, 14, 10, 6764 },
{VENDOR_ATI, CARD_ATI_RADEON_HD4600, "ATI Radeon HD 4600 Series", 6, 14, 10, 6764 },
{VENDOR_ATI, CARD_ATI_RADEON_HD4700, "ATI Radeon HD 4700 Series", 6, 14, 10, 6764 },
{VENDOR_ATI, CARD_ATI_RADEON_HD4800, "ATI Radeon HD 4800 Series", 6, 14, 10, 6764 },
/* TODO: Add information about legacy ATI hardware, Intel and other cards */

View File

@ -3326,7 +3326,18 @@ typedef enum _GL_Cards {
CARD_ATI_RADEON_HD2600 = 0x9581,
CARD_ATI_RADEON_HD2900 = 0x9400,
CARD_ATI_RADEON_HD3200 = 0x9620,
CARD_ATI_RADEON_HD4800 = 0x944c,
CARD_ATI_RADEON_HD4350 = 0x954f,
CARD_ATI_RADEON_HD4550 = 0x9540,
CARD_ATI_RADEON_HD4600 = 0x9495,
CARD_ATI_RADEON_HD4650 = 0x9498,
CARD_ATI_RADEON_HD4670 = 0x9490,
CARD_ATI_RADEON_HD4700 = 0x944e,
CARD_ATI_RADEON_HD4770 = 0x94b3,
CARD_ATI_RADEON_HD4800 = 0x944c, /* picked one value between 9440,944c,9442,9460 */
CARD_ATI_RADEON_HD4830 = 0x944c,
CARD_ATI_RADEON_HD4850 = 0x9442,
CARD_ATI_RADEON_HD4870 = 0x9440,
CARD_ATI_RADEON_HD4890 = 0x9460,
CARD_NVIDIA_RIVA_128 = 0x0018,
CARD_NVIDIA_RIVA_TNT = 0x0020,