Various fixes.

kernelbase-PathCchCombineEx: Restore mistakenly deleted patch.
wined3d-Core_Context: Fix rebase.
wined3d-Viewports: Restore mistakenly disabled patch.
This commit is contained in:
Zebediah Figura
2018-03-03 16:20:39 -06:00
parent d854a14e64
commit 6a4c6089c4
8 changed files with 245 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
From cea7f4b70408dd2ceb7f571b3b2efac2b58a389f Mon Sep 17 00:00:00 2001
From 2ff2aaf55df96d6dade866d11f273630a2fcbf90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 17 Aug 2017 19:29:30 +0200
Subject: wined3d: Allow arbitrary viewports for d3d11.
@@ -8,15 +8,15 @@ Subject: wined3d: Allow arbitrary viewports for d3d11.
dlls/d3d8/directx.c | 2 +-
dlls/d3d9/directx.c | 2 +-
dlls/ddraw/ddraw_private.h | 2 +-
dlls/wined3d/state.c | 23 +++++++++++--------
dlls/wined3d/state.c | 11 ++++++----
include/wine/wined3d.h | 1 +
6 files changed, 73 insertions(+), 12 deletions(-)
6 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 06708b5f2b4..9795a2c68ba 100644
index f4abd51..c6b9221 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -23822,6 +23822,60 @@ static void test_fractional_viewports(vo
@@ -23392,6 +23392,60 @@ static void test_fractional_viewports(void)
release_test_context(&test_context);
}
@@ -77,7 +77,7 @@ index 06708b5f2b4..9795a2c68ba 100644
static void test_early_depth_stencil(void)
{
ID3D11DepthStencilState *depth_stencil_state;
@@ -25805,6 +25859,7 @@ START_TEST(d3d11)
@@ -25461,6 +25515,7 @@ START_TEST(d3d11)
test_gather_c();
test_depth_bias();
test_fractional_viewports();
@@ -86,10 +86,10 @@ index 06708b5f2b4..9795a2c68ba 100644
test_conservative_depth_output();
test_format_compatibility();
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 24bd8315983..491efea31e2 100644
index 68300c0..6e8f93a 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -418,7 +418,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
@@ -417,7 +417,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING
| WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART
@@ -99,10 +99,10 @@ index 24bd8315983..491efea31e2 100644
d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
d3d8->refcount = 1;
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index fe7163fa88a..c1389529588 100644
index cdce669..644766c 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -579,7 +579,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL e
@@ -579,7 +579,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
DWORD flags = WINED3D_PRESENT_CONVERSION | WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_SRGB_READ_WRITE_CONTROL | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
| WINED3D_NO_PRIMITIVE_RESTART | WINED3D_LEGACY_CUBEMAP_FILTERING
@@ -112,10 +112,10 @@ index fe7163fa88a..c1389529588 100644
if (!extended)
flags |= WINED3D_VIDMEM_ACCOUNTING;
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 0ae45328709..214c1718694 100644
index 3cf9b76..d744a5c 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -62,7 +62,7 @@ struct FvfToDecl
@@ -65,7 +65,7 @@ struct FvfToDecl
#define DDRAW_WINED3D_FLAGS (WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING \
| WINED3D_RESTORE_MODE_ON_ACTIVATE | WINED3D_FOCUS_MESSAGES | WINED3D_PIXEL_CENTER_INTEGER \
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART \
@@ -125,57 +125,39 @@ index 0ae45328709..214c1718694 100644
enum ddraw_device_state
{
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 8b1729de2a3..53be418a623 100644
index 9753186..486d22a 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4642,11 +4642,13 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
@@ -4696,10 +4696,13 @@ static void get_viewport(struct wined3d_context *context, const struct wined3d_s
if (target)
{
- if (vp.width > target->width)
- vp.width = target->width;
- if (vp.height > target->height)
- vp.height = target->height;
-
- if (viewport->width > target->width)
- viewport->width = target->width;
- if (viewport->height > target->height)
- viewport->height = target->height;
+ if (context->d3d_info->wined3d_creation_flags & WINED3D_LIMIT_VIEWPORT)
+ {
+ if (vp.width > target->width)
+ vp.width = target->width;
+ if (vp.height > target->height)
+ vp.height = target->height;
+ if (viewport->width > target->width)
+ viewport->width = target->width;
+ if (viewport->height > target->height)
+ viewport->height = target->height;
+ }
wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
}
else if (depth_stencil)
@@ -4688,10 +4690,13 @@ static void viewport_miscpart_cc(struct wined3d_context *context,
if (target)
{
- if (vp.width > target->width)
- vp.width = target->width;
- if (vp.height > target->height)
- vp.height = target->height;
+ if (context->d3d_info->wined3d_creation_flags & WINED3D_LIMIT_VIEWPORT)
+ {
+ if (vp.width > target->width)
+ vp.width = target->width;
+ if (vp.height > target->height)
+ vp.height = target->height;
+ }
wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
}
/*
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index f468e307b36..4a6b9ff7f3d 100644
index f555d1d..2184a00 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1312,6 +1312,7 @@ enum wined3d_shader_byte_code_format
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
#define WINED3D_FORWARD_DEPTH_BIAS 0x00002000
#define WINED3D_REQUEST_D3D10 0x00004000
+#define WINED3D_LIMIT_VIEWPORT 0x00008000
#define WINED3D_RESZ_CODE 0x7fa05000
--
2.14.1
2.7.4