Commit 5a00c805 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: Get rid of two dead render target lock mode options.

parent 5b1992b4
...@@ -1515,13 +1515,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { ...@@ -1515,13 +1515,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
switch(wined3d_settings.rendertargetlock_mode) { switch(wined3d_settings.rendertargetlock_mode) {
case RTL_READTEX: case RTL_READTEX:
case RTL_TEXTEX:
IWineD3DSurface_LoadLocation(iface, SFLAG_INTEXTURE, NULL /* partial texture loading not supported yet */); IWineD3DSurface_LoadLocation(iface, SFLAG_INTEXTURE, NULL /* partial texture loading not supported yet */);
/* drop through */ /* drop through */
case RTL_AUTO: case RTL_AUTO:
case RTL_READDRAW: case RTL_READDRAW:
case RTL_TEXDRAW:
IWineD3DSurface_LoadLocation(iface, SFLAG_INDRAWABLE, fullsurface ? NULL : &This->dirtyRect); IWineD3DSurface_LoadLocation(iface, SFLAG_INDRAWABLE, fullsurface ? NULL : &This->dirtyRect);
break; break;
} }
...@@ -4058,7 +4056,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) ...@@ -4058,7 +4056,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface)
CONVERT_TYPES convert; CONVERT_TYPES convert;
/* Check if we are using a RTL mode which uses texturing for uploads */ /* Check if we are using a RTL mode which uses texturing for uploads */
BOOL use_texture = (wined3d_settings.rendertargetlock_mode == RTL_READTEX || wined3d_settings.rendertargetlock_mode == RTL_TEXTEX); BOOL use_texture = (wined3d_settings.rendertargetlock_mode == RTL_READTEX);
/* Check if we have hardware palette conversion if we have convert is set to NO_CONVERSION */ /* Check if we have hardware palette conversion if we have convert is set to NO_CONVERSION */
d3dfmt_get_conv(This, TRUE, use_texture, &format, &internal, &type, &convert, &bpp, FALSE); d3dfmt_get_conv(This, TRUE, use_texture, &format, &internal, &type, &convert, &bpp, FALSE);
...@@ -4165,8 +4163,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { ...@@ -4165,8 +4163,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
*/ */
if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE) if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE)
&& !((This->resource.format_desc->format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE) && !((This->resource.format_desc->format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE)
&& (wined3d_settings.rendertargetlock_mode == RTL_READTEX && (wined3d_settings.rendertargetlock_mode == RTL_READTEX)))
|| wined3d_settings.rendertargetlock_mode == RTL_TEXTEX)))
{ {
This->texture_target = GL_TEXTURE_RECTANGLE_ARB; This->texture_target = GL_TEXTURE_RECTANGLE_ARB;
This->pow2Width = This->currentDesc.Width; This->pow2Width = This->currentDesc.Width;
......
...@@ -199,7 +199,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT ...@@ -199,7 +199,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
/* Precalculated scaling for 'faked' non power of two texture coords. /* Precalculated scaling for 'faked' non power of two texture coords.
* Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE * 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 * is used in combination with texture uploads (RTL_READTEX). The reason is that EXT_PALETTED_TEXTURE
* doesn't work in combination with ARB_TEXTURE_RECTANGLE. */ * doesn't work in combination with ARB_TEXTURE_RECTANGLE. */
if (GL_SUPPORT(WINE_NORMALIZED_TEXRECT) && (width != pow2_width || height != pow2_height)) if (GL_SUPPORT(WINE_NORMALIZED_TEXRECT) && (width != pow2_width || height != pow2_height))
{ {
...@@ -213,8 +213,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT ...@@ -213,8 +213,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
} }
else if (GL_SUPPORT(ARB_TEXTURE_RECTANGLE) && (width != pow2_width || height != pow2_height) else if (GL_SUPPORT(ARB_TEXTURE_RECTANGLE) && (width != pow2_width || height != pow2_height)
&& !((format_desc->format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE) && !((format_desc->format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE)
&& (wined3d_settings.rendertargetlock_mode == RTL_READTEX && (wined3d_settings.rendertargetlock_mode == RTL_READTEX)))
|| wined3d_settings.rendertargetlock_mode == RTL_TEXTEX)))
{ {
if ((width != 1) || (height != 1)) texture->baseTexture.pow2Matrix_identity = FALSE; if ((width != 1) || (height != 1)) texture->baseTexture.pow2Matrix_identity = FALSE;
......
...@@ -252,16 +252,6 @@ static BOOL wined3d_init(HINSTANCE hInstDLL) ...@@ -252,16 +252,6 @@ static BOOL wined3d_init(HINSTANCE hInstDLL)
TRACE("Using glReadPixels for render target reading and textures for writing\n"); TRACE("Using glReadPixels for render target reading and textures for writing\n");
wined3d_settings.rendertargetlock_mode = RTL_READTEX; wined3d_settings.rendertargetlock_mode = RTL_READTEX;
} }
else if (!strcmp(buffer,"texdraw"))
{
TRACE("Using textures for render target reading and glDrawPixels for writing\n");
wined3d_settings.rendertargetlock_mode = RTL_TEXDRAW;
}
else if (!strcmp(buffer,"textex"))
{
TRACE("Reading render targets via textures and writing via textures\n");
wined3d_settings.rendertargetlock_mode = RTL_TEXTEX;
}
} }
if ( !get_config_key_dword( hkey, appkey, "VideoPciDeviceID", &tmpvalue) ) if ( !get_config_key_dword( hkey, appkey, "VideoPciDeviceID", &tmpvalue) )
{ {
......
...@@ -270,8 +270,6 @@ static inline float float_24_to_32(DWORD in) ...@@ -270,8 +270,6 @@ static inline float float_24_to_32(DWORD in)
#define RTL_AUTO 0 #define RTL_AUTO 0
#define RTL_READDRAW 1 #define RTL_READDRAW 1
#define RTL_READTEX 2 #define RTL_READTEX 2
#define RTL_TEXDRAW 3
#define RTL_TEXTEX 4
#define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */ #define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */
#define PCI_DEVICE_NONE 0xffff /* e.g. 0x14f for a Geforce6200 */ #define PCI_DEVICE_NONE 0xffff /* e.g. 0x14f for a Geforce6200 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment