Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d11/utils.c | 2 -- dlls/ddraw/surface.c | 5 ----- dlls/wined3d/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, 5 insertions(+), 17 deletions(-)
diff --git a/dlls/d3d11/utils.c b/dlls/d3d11/utils.c index 2a1a8c699e5..1a619717587 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_DEPTH_STENCIL) - wined3d_usage |= WINED3DUSAGE_DEPTHSTENCIL; if (bind_flags & ~handled) FIXME("Unhandled bind flags %#x.\n", bind_flags & ~handled);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 6bb92d5d399..fb0cc85e7b0 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -6175,14 +6175,9 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ wined3d_desc.bind_flags |= WINED3D_BIND_SHADER_RESOURCE; } if (desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) - { - wined3d_desc.usage |= WINED3DUSAGE_DEPTHSTENCIL; wined3d_desc.bind_flags |= WINED3D_BIND_DEPTH_STENCIL; - } else if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) - { wined3d_desc.bind_flags |= WINED3D_BIND_RENDER_TARGET; - } }
if (desc->ddsCaps.dwCaps2 & (DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE)) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1af76f235c8..893ce55c9aa 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4898,7 +4898,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, texture_desc.format = swapchain->desc.auto_depth_stencil_format; texture_desc.multisample_type = swapchain->desc.multisample_type; texture_desc.multisample_quality = swapchain->desc.multisample_quality; - texture_desc.usage = WINED3DUSAGE_DEPTHSTENCIL; + texture_desc.usage = 0; texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL; texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU; texture_desc.width = swapchain->desc.backbuffer_width; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index a79e9247267..dab10cbf116 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1541,11 +1541,9 @@ 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_DEPTHSTENCIL) - bind_flags |= WINED3D_BIND_DEPTH_STENCIL; if (usage & WINED3DUSAGE_TEXTURE) bind_flags |= WINED3D_BIND_SHADER_RESOURCE; - usage &= ~(WINED3DUSAGE_DEPTHSTENCIL | WINED3DUSAGE_TEXTURE); + usage &= ~WINED3DUSAGE_TEXTURE;
switch (resource_type) { diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 58caccc7305..61143556e73 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_DEPTHSTENCIL - | WINED3DUSAGE_WRITEONLY + static const DWORD handled = WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_STATICDECL | WINED3DUSAGE_OVERLAY diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 36e7b2e8318..ba7c817adf5 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -947,7 +947,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 struct wined3d_texture *ds;
texture_desc.format = swapchain->desc.auto_depth_stencil_format; - texture_desc.usage = WINED3DUSAGE_DEPTHSTENCIL; + texture_desc.usage = 0; texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL;
if (FAILED(hr = device->device_parent->ops->create_swapchain_texture(device->device_parent, diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index a7b1b10f9ac..4e5d36c7bd6 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_DEPTHSTENCIL); WINED3DUSAGE_TO_STR(WINED3DUSAGE_WRITEONLY); WINED3DUSAGE_TO_STR(WINED3DUSAGE_SOFTWAREPROCESSING); WINED3DUSAGE_TO_STR(WINED3DUSAGE_DONOTCLIP); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index fd907578c2d..0d98dfae890 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_DEPTHSTENCIL 0x00000002 #define WINED3DUSAGE_WRITEONLY 0x00000008 #define WINED3DUSAGE_SOFTWAREPROCESSING 0x00000010 #define WINED3DUSAGE_DONOTCLIP 0x00000020 @@ -927,7 +926,7 @@ enum wined3d_shader_type #define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE 0x00002000 #define WINED3DUSAGE_DMAP 0x00004000 #define WINED3DUSAGE_TEXTAPI 0x10000000 -#define WINED3DUSAGE_MASK 0x10007bfa +#define WINED3DUSAGE_MASK 0x10007bf8
#define WINED3DUSAGE_SCRATCH 0x00200000 #define WINED3DUSAGE_PRIVATE 0x00400000