Rebase against ddec23013e39b563a3a50c0fe42c2ae8b518d538

This commit is contained in:
Alistair Leslie-Hughes
2019-11-26 11:52:26 +11:00
parent 3fe9b83fa4
commit f62913bfc3
7 changed files with 50 additions and 70 deletions

View File

@@ -1,4 +1,4 @@
From 2dbc476ab7a1edb75f07108a6a44ea2700513797 Mon Sep 17 00:00:00 2001
From cdf51c18aa92ddfc4df67216ebeaea0c393d8cbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 29 Jul 2015 17:09:50 +0200
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
@@ -64,7 +64,7 @@ index 4ecd83d006b..c11f4f0aa80 100644
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 3702454bde0..cc43cdc8840 100644
index ffa029321c1..31f76bdcbd3 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1854,7 +1854,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
@@ -94,8 +94,8 @@ index 3702454bde0..cc43cdc8840 100644
{
WARN("Surface %p is not in video memory.\n", target_impl);
IDirectDrawSurface_AddRef(target);
@@ -6947,7 +6947,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
return WINED3D_ZB_TRUE;
@@ -6972,7 +6972,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
wined3d_stateblock_set_scissor_rect(ddraw->state, &rect);
}
-static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -103,7 +103,7 @@ index 3702454bde0..cc43cdc8840 100644
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
{
static const D3DMATRIX ident =
@@ -6970,6 +6970,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -6995,6 +6995,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
device->ref = 1;
device->version = version;
@@ -111,7 +111,7 @@ index 3702454bde0..cc43cdc8840 100644
if (outer_unknown)
device->outer_unknown = outer_unknown;
@@ -7026,14 +7027,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -7054,14 +7055,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
return D3D_OK;
}
@@ -133,7 +133,7 @@ index 3702454bde0..cc43cdc8840 100644
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
@@ -7056,7 +7061,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
@@ -7084,7 +7089,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_OUTOFMEMORY;
}
@@ -142,7 +142,7 @@ index 3702454bde0..cc43cdc8840 100644
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
@@ -7074,7 +7079,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
@@ -7102,7 +7107,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_OUTOFMEMORY;
}
@@ -152,7 +152,7 @@ index 3702454bde0..cc43cdc8840 100644
WARN("Failed to initialize device, hr %#x.\n", hr);
heap_free(object);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 0c03120662b..3e0d6d66573 100644
index 1f24c49634b..dc017d87467 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
@@ -164,7 +164,7 @@ index 0c03120662b..3e0d6d66573 100644
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
{
This->device1 = NULL;
@@ -6198,7 +6198,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
@@ -6201,7 +6201,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
{