mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
d3d9-DesktopWindow: Rebase and re-enable.
This commit is contained in:
parent
923358dcea
commit
de0ef226da
@ -1,8 +1,8 @@
|
||||
From 4094c085cdc00864407b844720170fd619ce8c8c Mon Sep 17 00:00:00 2001
|
||||
From 64e8c4698047a079d4a538d1774f194529570453 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 3 Jun 2015 22:57:21 +0200
|
||||
Subject: winex11.drv: Allow changing the opengl pixel format on the desktop
|
||||
window.
|
||||
Subject: [PATCH] winex11.drv: Allow changing the opengl pixel format on the
|
||||
desktop window.
|
||||
|
||||
This patch is not 100% correct because the old behavior was more similar to
|
||||
windows. However, Direct3D supports using the desktop window to create a
|
||||
@ -11,22 +11,24 @@ window will fail because of this limitation. Unless someone comes up with
|
||||
a more correct solution or finds an application that breaks because of this,
|
||||
it seems to be a suitable workaround as it fixes multiple applications.
|
||||
---
|
||||
dlls/d3d10_1/tests/d3d10_1.c | 14 ++++++++++++--
|
||||
dlls/d3d11/tests/d3d11.c | 20 ++++++++++++++++----
|
||||
dlls/d3d10_1/tests/d3d10_1.c | 16 +++++++++++++---
|
||||
dlls/d3d11/tests/d3d11.c | 22 +++++++++++++++++-----
|
||||
dlls/d3d9/tests/device.c | 16 ++++++++++++++++
|
||||
dlls/winex11.drv/opengl.c | 5 ++++-
|
||||
4 files changed, 48 insertions(+), 7 deletions(-)
|
||||
4 files changed, 50 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
|
||||
index e1d6d4c97c2..bf6a9a138dd 100644
|
||||
index 7c2b3ba..5d111d9 100644
|
||||
--- a/dlls/d3d10_1/tests/d3d10_1.c
|
||||
+++ b/dlls/d3d10_1/tests/d3d10_1.c
|
||||
@@ -226,8 +226,18 @@ static void test_create_device(void)
|
||||
@@ -252,9 +252,19 @@ static void test_create_device(void)
|
||||
swapchain_desc.OutputWindow = NULL;
|
||||
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
|
||||
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
|
||||
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
- ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
- ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ refcount = IDXGISwapChain_Release(swapchain);
|
||||
@ -43,17 +45,19 @@ index e1d6d4c97c2..bf6a9a138dd 100644
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D10Device1 *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index f39e1ad43be..7bc4e982634 100644
|
||||
index 5a36bc2..1c07775 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -1592,10 +1592,22 @@ static void test_create_device(void)
|
||||
@@ -1705,11 +1705,23 @@ static void test_create_device(void)
|
||||
swapchain_desc.OutputWindow = NULL;
|
||||
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION,
|
||||
&swapchain_desc, &swapchain, &device, &feature_level, &immediate_context);
|
||||
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
- ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
|
||||
- ok(!device, "Got unexpected device pointer %p.\n", device);
|
||||
- ok(!feature_level, "Got unexpected feature level %#x.\n", feature_level);
|
||||
- ok(!immediate_context, "Got unexpected immediate context pointer %p.\n", immediate_context);
|
||||
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ refcount = IDXGISwapChain_Release(swapchain);
|
||||
@ -74,10 +78,10 @@ index f39e1ad43be..7bc4e982634 100644
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D11Device *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index fb30636d0dd..63792e1ee05 100644
|
||||
index 6084fd2..3480de0 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -11830,6 +11830,21 @@ todo_wine
|
||||
@@ -12418,6 +12418,21 @@ static void test_stretch_rect(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@ -99,19 +103,19 @@ index fb30636d0dd..63792e1ee05 100644
|
||||
START_TEST(device)
|
||||
{
|
||||
WNDCLASSA wc = {0};
|
||||
@@ -11950,6 +11965,7 @@ START_TEST(device)
|
||||
@@ -12538,6 +12553,7 @@ START_TEST(device)
|
||||
test_format_unknown();
|
||||
test_destroyed_window();
|
||||
test_lockable_backbuffer();
|
||||
+ test_desktop_window();
|
||||
|
||||
UnregisterClassA("d3d9_test_wc", GetModuleHandleA(NULL));
|
||||
}
|
||||
test_clip_planes_limits();
|
||||
test_swapchain_multisample_reset();
|
||||
test_stretch_rect();
|
||||
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
|
||||
index 5eb70a86928..c03905d221d 100644
|
||||
index 01b92e3..0b5abb5 100644
|
||||
--- a/dlls/winex11.drv/opengl.c
|
||||
+++ b/dlls/winex11.drv/opengl.c
|
||||
@@ -1480,12 +1480,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
|
||||
@@ -1455,12 +1455,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
|
||||
|
||||
TRACE("(%p,%d)\n", hdc, format);
|
||||
|
||||
@ -129,5 +133,5 @@ index 5eb70a86928..c03905d221d 100644
|
||||
if (!fmt)
|
||||
{
|
||||
--
|
||||
2.14.1
|
||||
2.7.4
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
Fixes: Allow to set pixel format for desktop window
|
||||
Disabled: true
|
||||
Fixes: [18490] Allow to set pixel format for desktop window
|
@ -117,6 +117,7 @@ patch_enable_all ()
|
||||
enable_d3d11_ID3D11Texture1D="$1"
|
||||
enable_d3d11_Silence_FIXMEs="$1"
|
||||
enable_d3d8_ValidateShader="$1"
|
||||
enable_d3d9_DesktopWindow="$1"
|
||||
enable_d3d9_Tests="$1"
|
||||
enable_d3dx9_25_ID3DXEffect="$1"
|
||||
enable_d3dx9_36_32bpp_Alpha_Channel="$1"
|
||||
@ -593,6 +594,9 @@ patch_enable ()
|
||||
d3d8-ValidateShader)
|
||||
enable_d3d8_ValidateShader="$2"
|
||||
;;
|
||||
d3d9-DesktopWindow)
|
||||
enable_d3d9_DesktopWindow="$2"
|
||||
;;
|
||||
d3d9-Tests)
|
||||
enable_d3d9_Tests="$2"
|
||||
;;
|
||||
@ -3698,6 +3702,21 @@ if test "$enable_d3d8_ValidateShader" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-DesktopWindow
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#18490] Allow to set pixel format for desktop window
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d10_1/tests/d3d10_1.c, dlls/d3d11/tests/d3d11.c, dlls/d3d9/tests/device.c, dlls/winex11.drv/opengl.c
|
||||
# |
|
||||
if test "$enable_d3d9_DesktopWindow" -eq 1; then
|
||||
patch_apply d3d9-DesktopWindow/0001-winex11.drv-Allow-changing-the-opengl-pixel-format-o.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "winex11.drv: Allow changing the opengl pixel format on the desktop window.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-Tests
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
x
Reference in New Issue
Block a user