Rebase against b071d37b8017ff34a29f1555ab6630d4b88d1838

This commit is contained in:
Alistair Leslie-Hughes 2020-05-12 08:21:46 +10:00
parent 7d92cd315b
commit 3e3661298c
2 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
From a6f14f05fefc9510f673b47092cbc62a2366ccf9 Mon Sep 17 00:00:00 2001
From 17363db79c4a12613236ef88386b2294920cc9bc Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Thu, 4 Apr 2019 02:25:00 +0300
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
@ -11,10 +11,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
2 files changed, 141 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 11e60f80c..324475303 100644
index 5bd5b2c70911..010fed303969 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -4798,7 +4798,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
@@ -4776,7 +4776,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
struct wined3d_texture *wined3d_texture = NULL;
@ -24,7 +24,7 @@ index 11e60f80c..324475303 100644
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
wined3d_texture = surf->wined3d_texture;
@@ -4834,19 +4835,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
@@ -4812,19 +4813,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
{
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
@ -59,10 +59,10 @@ index 11e60f80c..324475303 100644
static const struct tss_lookup
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index e1d5bac18..e18f3c638 100644
index 5dc2b4e7e527..d0a1f59c0a59 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -330,7 +330,7 @@ static IDirectDraw4 *create_ddraw(void)
@@ -359,7 +359,7 @@ static IDirectDraw4 *create_ddraw(void)
return ddraw4;
}
@ -71,7 +71,7 @@ index e1d5bac18..e18f3c638 100644
{
IDirectDrawSurface4 *surface, *ds;
IDirect3DDevice3 *device = NULL;
@@ -350,6 +350,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -379,6 +379,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
@ -80,7 +80,7 @@ index e1d5bac18..e18f3c638 100644
surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480;
@@ -378,7 +380,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -407,7 +409,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
}
memset(&z_fmt, 0, sizeof(z_fmt));
@ -90,7 +90,7 @@ index e1d5bac18..e18f3c638 100644
if (FAILED(hr) || !z_fmt.dwSize)
{
IDirect3D3_Release(d3d3);
@@ -390,6 +393,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -419,6 +422,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
@ -99,7 +99,7 @@ index e1d5bac18..e18f3c638 100644
U4(surface_desc).ddpfPixelFormat = z_fmt;
surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480;
@@ -412,7 +417,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -441,7 +446,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
return NULL;
}
@ -109,7 +109,7 @@ index e1d5bac18..e18f3c638 100644
IDirect3D3_Release(d3d3);
IDirectDrawSurface4_Release(surface);
if (FAILED(hr))
@@ -421,6 +427,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -450,6 +456,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
return device;
}
@ -121,8 +121,8 @@ index e1d5bac18..e18f3c638 100644
static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h)
{
IDirect3DViewport3 *viewport;
@@ -16980,6 +16991,116 @@ static void test_surface_format_conversion_alpha(void)
DestroyWindow(window);
@@ -17530,6 +17541,116 @@ static void test_get_display_mode(void)
EnumDisplayMonitors(NULL, NULL, test_get_display_mode_cb, 0);
}
+static void test_texture_wrong_caps_(BOOL software)
@ -238,7 +238,7 @@ index e1d5bac18..e18f3c638 100644
START_TEST(ddraw4)
{
DDDEVICEIDENTIFIER identifier;
@@ -17112,6 +17233,7 @@ START_TEST(ddraw4)
@@ -17662,6 +17783,7 @@ START_TEST(ddraw4)
test_gdi_surface();
test_alphatest();
test_clipper_refcount();
@ -247,5 +247,5 @@ index e1d5bac18..e18f3c638 100644
test_d32_support();
test_surface_format_conversion_alpha();
--
2.25.1
2.26.2

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "bf1abbac0c93e46b6b037dbd7f975c8b2f951b2e"
echo "b071d37b8017ff34a29f1555ab6630d4b88d1838"
}
# Show version information