Henri Verbeet : wined3d: Get rid of WINED3DUSAGE_RENDERTARGET.

Alexandre Julliard julliard at winehq.org
Mon Nov 5 15:51:52 CST 2018


Module: wine
Branch: master
Commit: 3adf4b8415731395e722b724aecc5fb713d55aa5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3adf4b8415731395e722b724aecc5fb713d55aa5

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Nov  5 15:31:57 2018 +0330

wined3d: Get rid of WINED3DUSAGE_RENDERTARGET.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/utils.c       | 2 --
 dlls/ddraw/surface.c     | 1 -
 dlls/dxgi/device.c       | 2 --
 dlls/wined3d/directx.c   | 4 +---
 dlls/wined3d/resource.c  | 3 +--
 dlls/wined3d/swapchain.c | 2 --
 dlls/wined3d/utils.c     | 1 -
 include/wine/wined3d.h   | 3 +--
 8 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/dlls/d3d11/utils.c b/dlls/d3d11/utils.c
index c7c682b..2a1a8c6 100644
--- a/dlls/d3d11/utils.c
+++ b/dlls/d3d11/utils.c
@@ -450,8 +450,6 @@ DWORD wined3d_usage_from_d3d11(UINT bind_flags, enum D3D11_USAGE usage)
 
     if (bind_flags & D3D11_BIND_SHADER_RESOURCE)
         wined3d_usage |= WINED3DUSAGE_TEXTURE;
-    if (bind_flags & D3D11_BIND_RENDER_TARGET)
-        wined3d_usage |= WINED3DUSAGE_RENDERTARGET;
     if (bind_flags & D3D11_BIND_DEPTH_STENCIL)
         wined3d_usage |= WINED3DUSAGE_DEPTHSTENCIL;
     if (bind_flags & ~handled)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 5ce1d85..6bb92d5 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -6181,7 +6181,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
             }
             else if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
             {
-                wined3d_desc.usage |= WINED3DUSAGE_RENDERTARGET;
                 wined3d_desc.bind_flags |= WINED3D_BIND_RENDER_TARGET;
             }
         }
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c
index 26f2488..9b57b46 100644
--- a/dlls/dxgi/device.c
+++ b/dlls/dxgi/device.c
@@ -190,8 +190,6 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
     surface_desc.usage = 0;
     if (surface_desc.bind_flags & WINED3D_BIND_SHADER_RESOURCE)
         surface_desc.usage |= WINED3DUSAGE_TEXTURE;
-    if (surface_desc.bind_flags & WINED3D_BIND_RENDER_TARGET)
-        surface_desc.usage |= WINED3DUSAGE_RENDERTARGET;
     surface_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
     surface_desc.width = desc->Width;
     surface_desc.height = desc->Height;
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index a03465f..a79e924 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1541,13 +1541,11 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
     adapter_format = wined3d_get_format(adapter, adapter_format_id, WINED3D_BIND_RENDER_TARGET);
     format = wined3d_get_format(adapter, check_format_id, bind_flags);
 
-    if (usage & WINED3DUSAGE_RENDERTARGET)
-        bind_flags |= WINED3D_BIND_RENDER_TARGET;
     if (usage & WINED3DUSAGE_DEPTHSTENCIL)
         bind_flags |= WINED3D_BIND_DEPTH_STENCIL;
     if (usage & WINED3DUSAGE_TEXTURE)
         bind_flags |= WINED3D_BIND_SHADER_RESOURCE;
-    usage &= ~(WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL | WINED3DUSAGE_TEXTURE);
+    usage &= ~(WINED3DUSAGE_DEPTHSTENCIL | WINED3DUSAGE_TEXTURE);
 
     switch (resource_type)
     {
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index ff58456..58caccc 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -30,8 +30,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
 
 static void resource_check_usage(DWORD usage)
 {
-    static const DWORD handled = WINED3DUSAGE_RENDERTARGET
-            | WINED3DUSAGE_DEPTHSTENCIL
+    static const DWORD handled = WINED3DUSAGE_DEPTHSTENCIL
             | WINED3DUSAGE_WRITEONLY
             | WINED3DUSAGE_DYNAMIC
             | WINED3DUSAGE_STATICDECL
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 4ab1594..36e7b2e 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -921,8 +921,6 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
         texture_desc.usage = 0;
         if (device->wined3d->flags & WINED3D_NO3D)
             texture_desc.usage |= WINED3DUSAGE_OWNDC;
-        if (texture_desc.bind_flags & WINED3D_BIND_RENDER_TARGET)
-            texture_desc.usage |= WINED3DUSAGE_RENDERTARGET;
         if (texture_desc.bind_flags & WINED3D_BIND_SHADER_RESOURCE)
             texture_desc.usage |= WINED3DUSAGE_TEXTURE;
         for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 73e8cf2..a7b1b10 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4511,7 +4511,6 @@ const char *debug_d3dusage(DWORD usage)
 
     init_debug_buffer(&buffer, "0");
 #define WINED3DUSAGE_TO_STR(x) if (usage & x) { debug_append(&buffer, #x, " | "); usage &= ~x; }
-    WINED3DUSAGE_TO_STR(WINED3DUSAGE_RENDERTARGET);
     WINED3DUSAGE_TO_STR(WINED3DUSAGE_DEPTHSTENCIL);
     WINED3DUSAGE_TO_STR(WINED3DUSAGE_WRITEONLY);
     WINED3DUSAGE_TO_STR(WINED3DUSAGE_SOFTWAREPROCESSING);
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 3575f7e..fd90757 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -914,7 +914,6 @@ enum wined3d_shader_type
 #define WINED3D_BIND_DEPTH_STENCIL                              0x00000040
 #define WINED3D_BIND_UNORDERED_ACCESS                           0x00000080
 
-#define WINED3DUSAGE_RENDERTARGET                               0x00000001
 #define WINED3DUSAGE_DEPTHSTENCIL                               0x00000002
 #define WINED3DUSAGE_WRITEONLY                                  0x00000008
 #define WINED3DUSAGE_SOFTWAREPROCESSING                         0x00000010
@@ -928,7 +927,7 @@ enum wined3d_shader_type
 #define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE                   0x00002000
 #define WINED3DUSAGE_DMAP                                       0x00004000
 #define WINED3DUSAGE_TEXTAPI                                    0x10000000
-#define WINED3DUSAGE_MASK                                       0x10007bff
+#define WINED3DUSAGE_MASK                                       0x10007bfa
 
 #define WINED3DUSAGE_SCRATCH                                    0x00200000
 #define WINED3DUSAGE_PRIVATE                                    0x00400000




More information about the wine-cvs mailing list