Module: wine Branch: master Commit: cd1812b4737da9caa92a1c83fc35e63610019f96 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cd1812b4737da9caa92a1c83fc...
Author: Stefan Dösinger stefan@codeweavers.com Date: Tue Nov 6 12:39:57 2007 +0100
wined3d: Hide NP2 textures support on R500 and earlier cards.
---
dlls/wined3d/directx.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index dc2462e..aff5bee 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2760,6 +2760,20 @@ static void fixup_extensions(WineD3D_GL_Info *gl_info) { gl_info->vs_glsl_constantsF, gl_info->vs_arb_constantsF); gl_info->vs_glsl_constantsF = gl_info->vs_arb_constantsF; } + + /* MacOS advertises GL_ARB_texture_non_power_of_two on ATI r500 and earlier cards, although + * these cards only support GL_ARB_texture_rectangle(D3DPTEXTURECAPS_NONPOW2CONDITIONAL). + * If real NP2 textures are used, the driver falls back to software. So remove the supported + * flag for this extension + */ + if(gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] && gl_info->gl_vendor == VENDOR_ATI) { + if(gl_info->gl_card == CARD_ATI_RADEON_X700 || gl_info->gl_card == CARD_ATI_RADEON_X1600 || + gl_info->gl_card == CARD_ATI_RADEON_9500 || gl_info->gl_card == CARD_ATI_RADEON_8500 || + gl_info->gl_card == CARD_ATI_RADEON_7200 || gl_info->gl_card == CARD_ATI_RAGE_128PRO) { + TRACE("GL_ARB_texture_non_power_of_two advertised on R500 or earlier card, removing\n"); + gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE; + } + } } }