[PATCH] Don't use ARB_texture_rectangle when EXT_paletted_texture is used as both can't be mixed.
Roderick Colenbrander
thunderbird2k at gmx.net
Mon Jan 21 15:29:03 CST 2008
---
dlls/wined3d/surface.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9243777..94800e3 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3462,8 +3462,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
This->glRect.right = 0;
This->glRect.bottom = 0;
} else {
- /* Check this after the oversize check - do not make an oversized surface a texture_rectangle one */
- if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE)) {
+ /* Check this after the oversize check - do not make an oversized surface a texture_rectangle one.
+ Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE
+ is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
+ doesn't work in combination with ARB_TEXTURE_RECTANGLE.
+ */
+ if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE) &&
+ !((This->resource.format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE) && (wined3d_settings.rendertargetlock_mode == RTL_READTEX || wined3d_settings.rendertargetlock_mode == RTL_TEXTEX)))
+ {
This->glDescription.target = GL_TEXTURE_RECTANGLE_ARB;
This->pow2Width = This->currentDesc.Width;
This->pow2Height = This->currentDesc.Height;
--
1.5.3.4
--========GMX30771200951197789420--
More information about the wine-patches
mailing list