From 0ba5f7dd983986f40e702f5f775611fbfd6ad088 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 8 Nov 2011 20:48:56 +0100 Subject: [PATCH] wined3d: Get rid of RTL_DISABLE. --- dlls/wined3d/surface.c | 26 +------------------------- dlls/wined3d/wined3d_main.c | 7 +------ dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 06a36b3170f..f354c115c76 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -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; diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 282f52db07d..053359554cd 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -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; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 14fbd2bf7f9..48a302a1aa9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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