wined3d: Get rid of RTL_DISABLE.

This commit is contained in:
Henri Verbeet 2011-11-08 20:48:56 +01:00 committed by Alexandre Julliard
parent b6c7a3dbc8
commit 0ba5f7dd98
3 changed files with 2 additions and 32 deletions

View File

@ -868,11 +868,7 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD
&& rect->right == surface->resource.width
&& rect->bottom == surface->resource.height)
pass_rect = NULL;
if (!(wined3d_settings.rendertargetlock_mode == RTL_DISABLE
&& ((surface->container.type == WINED3D_CONTAINER_SWAPCHAIN)
|| surface == device->fb.render_targets[0])))
surface_load_location(surface, SFLAG_INSYSMEM, pass_rect);
surface_load_location(surface, SFLAG_INSYSMEM, pass_rect);
}
if (surface->flags & SFLAG_PBO)
@ -964,17 +960,6 @@ static void surface_unmap(struct wined3d_surface *surface)
if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN
|| (device->fb.render_targets && surface == device->fb.render_targets[0]))
{
if (wined3d_settings.rendertargetlock_mode == RTL_DISABLE)
{
static BOOL warned = FALSE;
if (!warned)
{
ERR("The application tries to write to the render target, but render target locking is disabled.\n");
warned = TRUE;
}
goto done;
}
if (!surface->dirtyRect.left && !surface->dirtyRect.top
&& surface->dirtyRect.right == surface->resource.width
&& surface->dirtyRect.bottom == surface->resource.height)
@ -4013,15 +3998,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, const RECT *r
GLint skipPix = 0;
GLint skipRow = 0;
if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) {
static BOOL warned = FALSE;
if(!warned) {
ERR("The application tries to lock the render target, but render target locking is disabled\n");
warned = TRUE;
}
return;
}
context = context_acquire(device, surface);
context_apply_blit_state(context, device);
gl_info = context->gl_info;

View File

@ -260,12 +260,7 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
}
if ( !get_config_key( hkey, appkey, "RenderTargetLockMode", buffer, size) )
{
if (!strcmp(buffer,"disabled"))
{
TRACE("Disabling render target locking\n");
wined3d_settings.rendertargetlock_mode = RTL_DISABLE;
}
else if (!strcmp(buffer,"readdraw"))
if (!strcmp(buffer,"readdraw"))
{
TRACE("Using glReadPixels for render target reading and glDrawPixels for writing\n");
wined3d_settings.rendertargetlock_mode = RTL_READDRAW;

View File

@ -246,7 +246,6 @@ static inline float float_24_to_32(DWORD in)
#define SHADER_ATI 3
#define SHADER_NONE 4
#define RTL_DISABLE -1
#define RTL_READDRAW 1
#define RTL_READTEX 2