Rebase against 70c5dc64fc02408c6f7233c996e0ffdc5dc4a5a0

This commit is contained in:
Zebediah Figura 2018-04-16 18:15:29 -05:00
parent 8fd6d103e3
commit de87a73aac
7 changed files with 71 additions and 127 deletions

View File

@ -1,28 +1,25 @@
From abb41fbea240e18b6bec38f0c582b7445a60915f Mon Sep 17 00:00:00 2001
From 21028049055c1f65d72baf685ad9464187aada25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 31 May 2017 03:53:05 +0200
Subject: msi: Always return MSIDBSTATE_ERROR when MsiGetDatabaseState is
called from a custom action.
---
dlls/msi/database.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
dlls/msi/database.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index d3104b0ff22..6a138d6b816 100644
index d3eb910..47a99fa 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -2005,16 +2005,8 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
@@ -1890,13 +1890,8 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
if( !db )
{
- IWineMsiRemoteDatabase *remote_database;
-
- remote_database = (IWineMsiRemoteDatabase *)msi_get_remote( handle );
- MSIHANDLE remote_database = msi_get_remote(handle);
- if ( !remote_database )
- return MSIDBSTATE_ERROR;
-
- IWineMsiRemoteDatabase_Release( remote_database );
WARN("MsiGetDatabaseState not allowed during a custom action!\n");
-
- return MSIDBSTATE_READ;
@ -31,5 +28,5 @@ index d3104b0ff22..6a138d6b816 100644
if (db->mode != MSIDBOPEN_READONLY )
--
2.13.1
2.7.4

View File

@ -1,51 +0,0 @@
From be9ca596fa1d1b3c6d4be54853b812b2f8bce246 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 27 May 2017 16:12:09 +0200
Subject: ntoskrnl: Implement ExInterlockedPopEntrySList.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 14 ++++++++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 2ee727a8940..9332c3ef2a6 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1664,6 +1664,20 @@ PSLIST_ENTRY WINAPI NTOSKRNL_InterlockedPopEntrySList( PSLIST_HEADER list )
/***********************************************************************
+ * ExInterlockedPopEntrySList (NTOSKRNL.EXE.@)
+ */
+#ifdef DEFINE_FASTCALL2_ENTRYPOINT
+DEFINE_FASTCALL2_ENTRYPOINT( NTOSKRNL_ExInterlockedPopEntrySList )
+PSLIST_ENTRY WINAPI __regs_NTOSKRNL_ExInterlockedPopEntrySList( PSLIST_HEADER list, PKSPIN_LOCK lock )
+#else
+PSLIST_ENTRY WINAPI NTOSKRNL_ExInterlockedPopEntrySList( PSLIST_HEADER list, PKSPIN_LOCK lock )
+#endif
+{
+ return InterlockedPopEntrySList( list );
+}
+
+
+/***********************************************************************
* InterlockedPushEntrySList (NTOSKRNL.EXE.@)
*/
#ifdef DEFINE_FASTCALL2_ENTRYPOINT
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index dd2e31feac0..3b5c361a862 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -5,7 +5,7 @@
@ stub ExInterlockedAddLargeStatistic
@ stub ExInterlockedCompareExchange64
@ stub ExInterlockedFlushSList
-@ stub ExInterlockedPopEntrySList
+@ stdcall -norelay ExInterlockedPopEntrySList(ptr ptr) NTOSKRNL_ExInterlockedPopEntrySList
@ stub ExInterlockedPushEntrySList
@ stub ExReInitializeRundownProtection
@ stdcall -norelay ExReleaseFastMutexUnsafe(ptr)
--
2.12.2

View File

@ -1,4 +1,4 @@
From 3ef178d58627649ca4f323f72c91b93942ab84e9 Mon Sep 17 00:00:00 2001
From 8f1d4c0a6fec701d3af943188952d55f8b56582a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 6 Jun 2017 23:42:56 +0200
Subject: ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.
@ -10,10 +10,10 @@ Subject: ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.
3 files changed, 93 insertions(+), 4 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 28330b3..58383e5 100644
index 81f5738..a9f7029 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1800,7 +1800,24 @@ void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside,
@@ -1814,7 +1814,24 @@ void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST Lookaside,
ULONG Tag,
USHORT Depth)
{
@ -40,7 +40,7 @@ index 28330b3..58383e5 100644
/***********************************************************************
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 5b7c9e6..97ff41e 100644
index 8634f36..8453079 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -144,20 +144,18 @@ typedef enum _KWAIT_REASON
@ -157,9 +157,9 @@ index 5b7c9e6..97ff41e 100644
void WINAPI ExFreePool(PVOID);
void WINAPI ExFreePoolWithTag(PVOID,ULONG);
+void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST,PALLOCATE_FUNCTION,PFREE_FUNCTION,ULONG,SIZE_T,ULONG,USHORT);
PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK);
void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX);
NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*);
diff --git a/include/winnt.h b/include/winnt.h
index b309929..d7694ab 100644
--- a/include/winnt.h

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "3f281a3baad9f5f8f875da902718a1d5d3dc0d9f"
echo "70c5dc64fc02408c6f7233c996e0ffdc5dc4a5a0"
}
# Show version information
@ -5691,7 +5691,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch
patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-KeInitializeMutex.patch
patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Add-IoGetDeviceAttachmentBaseRef-stub.patch
patch_apply ntoskrnl-Stubs/0012-ntoskrnl-Implement-ExInterlockedPopEntrySList.patch
patch_apply ntoskrnl-Stubs/0013-ntoskrnl.exe-Implement-NtBuildNumber.patch
patch_apply ntoskrnl-Stubs/0014-ntoskrnl.exe-Implement-ExInitializeNPagedLookasideLi.patch
(
@ -5701,7 +5700,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
printf '%s\n' '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },';
printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },';
printf '%s\n' '+ { "Jarkko Korpi", "ntoskrnl.exe: Add IoGetDeviceAttachmentBaseRef stub.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntoskrnl: Implement ExInterlockedPopEntrySList.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Implement NtBuildNumber.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.", 1 },';
) >> "$patchlist"

View File

@ -1,4 +1,4 @@
From 20a2042fef1594938d5591889c18832903e42911 Mon Sep 17 00:00:00 2001
From b755264588f0cfc8f9f7f1e19f101637d09a30ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 18 Aug 2017 23:51:59 +0200
Subject: [PATCH] wined3d: Implement dual source blending.
@ -14,10 +14,10 @@ Subject: [PATCH] wined3d: Implement dual source blending.
7 files changed, 92 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index ccc8846..207a5a2 100644
index 8492fc9..2621c4f 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -26315,7 +26315,7 @@ static void test_dual_blending(void)
@@ -26546,7 +26546,7 @@ static void test_dual_blending(void)
ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
ID3D11DeviceContext_Draw(context, 3, 0);
@ -27,10 +27,10 @@ index ccc8846..207a5a2 100644
ID3D11BlendState_Release(blend_state);
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 4b2f263..9afbd43 100644
index e85e20d..92bf4f7 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3108,10 +3108,19 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
@@ -3113,10 +3113,19 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
else if (!context->render_offscreen)
return context_generate_rt_mask_from_resource(rts[0]->resource);
@ -52,7 +52,7 @@ index 4b2f263..9afbd43 100644
{
i = wined3d_bit_scan(&mask);
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 3492d8d..8a55d27 100644
index 93bb8f1..067a1c5 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3532,6 +3532,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
@ -80,10 +80,10 @@ index 3492d8d..8a55d27 100644
{
/* We do not want to deal with re-creating immutable texture storage for color keying emulation. */
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 3c2b870..2cbab85 100644
index 88ed107..6e732de 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3008,6 +3008,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
@@ -3015,6 +3015,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
break;
case WINED3DSPR_COLOROUT:
@ -91,7 +91,7 @@ index 3c2b870..2cbab85 100644
if (reg->idx[0].offset >= gl_info->limits.buffers)
WARN("Write to render target %u, only %d supported.\n",
reg->idx[0].offset, gl_info->limits.buffers);
@@ -7694,11 +7695,23 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
@@ -7723,11 +7724,23 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
if (!needs_legacy_glsl_syntax(gl_info))
{
@ -119,7 +119,7 @@ index 3c2b870..2cbab85 100644
}
}
@@ -10247,13 +10260,25 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
@@ -10276,13 +10289,25 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
if (!needs_legacy_glsl_syntax(gl_info))
{
@ -165,7 +165,7 @@ index c20c1da..9fd7338 100644
static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device,
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index c234758..a293be2 100644
index b65207d..9b9656a 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -534,12 +534,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
@ -208,7 +208,7 @@ index c234758..a293be2 100644
state->render_states[WINED3D_RS_SRCBLEND],
state->render_states[WINED3D_RS_DESTBLEND], rt_format);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 288e4a8..0a6bc5a 100644
index 9dfada4..684bec5 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -194,6 +194,7 @@ struct wined3d_d3d_info
@ -229,17 +229,17 @@ index 288e4a8..0a6bc5a 100644
};
enum fog_src_type
@@ -1912,7 +1914,8 @@ struct wined3d_context
@@ -1913,7 +1915,8 @@ struct wined3d_context
DWORD transform_feedback_paused : 1;
DWORD shader_update_mask : 6; /* WINED3D_SHADER_TYPE_COUNT, 6 */
DWORD clip_distance_mask : 8; /* MAX_CLIP_DISTANCES, 8 */
DWORD last_was_ffp_blit : 1;
- DWORD padding : 8;
- DWORD padding : 9;
+ DWORD last_was_dual_blend : 1;
+ DWORD padding : 7;
+ DWORD padding : 8;
DWORD constant_update_mask;
DWORD numbered_array_mask;
@@ -2518,6 +2521,7 @@ struct wined3d_fbo_ops
DWORD numbered_array_mask;
@@ -2529,6 +2532,7 @@ struct wined3d_fbo_ops
struct wined3d_gl_limits
{
UINT buffers;
@ -247,7 +247,7 @@ index 288e4a8..0a6bc5a 100644
UINT lights;
UINT textures;
UINT texture_coords;
@@ -2857,6 +2861,22 @@ struct wined3d_state
@@ -2869,6 +2873,22 @@ struct wined3d_state
struct wined3d_rasterizer_state *rasterizer_state;
};

View File

@ -1,4 +1,4 @@
From a62959a00ea79f2fff613f4a4dbc27d7cd426af0 Mon Sep 17 00:00:00 2001
From ff076f32b12e12ad59b82a96133c6080022ce25b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 31 Aug 2017 01:00:04 +0200
Subject: wined3d: Fix calculation of normal when vertex blending is enabled.
@ -9,10 +9,10 @@ Subject: wined3d: Fix calculation of normal when vertex blending is enabled.
2 files changed, 36 insertions(+), 42 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 052327c..1fe62fa 100644
index ae5d76c..517f6c0 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -20510,7 +20510,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
@@ -20580,7 +20580,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
while (point->x != -1 && point->y != -1)
{
color = getPixelColor(device, point->x, point->y);
@ -22,7 +22,7 @@ index 052327c..1fe62fa 100644
}
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 12100a5..bb3b1c2 100644
index 2cad436..ca92f56 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -144,8 +144,8 @@ struct glsl_vs_program
@ -96,12 +96,12 @@ index 12100a5..bb3b1c2 100644
@@ -1757,6 +1747,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
const struct wined3d_gl_info *gl_info = context->gl_info;
struct shader_glsl_priv *priv = shader_priv;
float position_fixup[4];
float position_fixup[4 * WINED3D_MAX_VIEWPORTS];
+ float normal[3 * 3];
DWORD update_mask;
struct glsl_shader_prog_link *prog = ctx_data->glsl_program;
@@ -1811,7 +1802,9 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1813,7 +1804,9 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[0], 1, FALSE, &mat._11));
checkGLcall("glUniformMatrix4fv");
@ -112,7 +112,7 @@ index 12100a5..bb3b1c2 100644
}
if (update_mask & WINED3D_SHADER_CONST_FFP_VERTEXBLEND)
@@ -1826,6 +1819,10 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1828,6 +1821,10 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
get_modelview_matrix(context, state, i, &mat);
GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[i], 1, FALSE, &mat._11));
checkGLcall("glUniformMatrix4fv");
@ -123,7 +123,7 @@ index 12100a5..bb3b1c2 100644
}
}
@@ -8787,8 +8784,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
@@ -8818,8 +8815,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
shader_addline(buffer, "\n");
shader_addline(buffer, "uniform mat4 ffp_modelview_matrix[%u];\n", MAX_VERTEX_INDEX_BLENDS);
@ -133,17 +133,17 @@ index 12100a5..bb3b1c2 100644
shader_addline(buffer, "uniform mat4 ffp_texture_matrix[%u];\n", MAX_TEXTURES);
shader_addline(buffer, "uniform struct\n{\n");
@@ -8898,17 +8895,10 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
@@ -8929,17 +8926,10 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
shader_addline(buffer, "vec3 normal = vec3(0.0);\n");
if (settings->normal)
{
- if (!settings->vertexblends)
- {
+ for (i = 0; i < settings->vertexblends + 1; ++i)
{
- shader_addline(buffer, "normal = ffp_normal_matrix * ffp_attrib_normal;\n");
- }
- else
+ for (i = 0; i < settings->vertexblends + 1; ++i)
{
- {
- for (i = 0; i < settings->vertexblends + 1; ++i)
- {
- sprintf(var, settings->vb_indices ? "int(ffp_attrib_blendindices[%u] + 0.1)" : "%u", i);
@ -154,7 +154,7 @@ index 12100a5..bb3b1c2 100644
}
if (settings->normalize)
@@ -9786,8 +9776,12 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
@@ -9814,8 +9804,12 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
string_buffer_sprintf(name, "ffp_modelview_matrix[%u]", i);
vs->modelview_matrix_location[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
}

View File

@ -1,7 +1,7 @@
From 9e3fd02b6ba9494fd9433fef92cbf6cbcfb39ff6 Mon Sep 17 00:00:00 2001
From c609a9065e0139dba4a6c50419e1bc06a2bf53aa 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.
Subject: [PATCH] wined3d: Allow arbitrary viewports for d3d11.
---
dlls/d3d11/tests/d3d11.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++
@ -13,10 +13,10 @@ Subject: wined3d: Allow arbitrary viewports for d3d11.
6 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index f4abd51..c6b9221 100644
index 1b713e4..531d955 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -23392,6 +23392,60 @@ static void test_fractional_viewports(void)
@@ -24217,6 +24217,60 @@ static void test_fractional_viewports(void)
release_test_context(&test_context);
}
@ -77,7 +77,7 @@ index f4abd51..c6b9221 100644
static void test_early_depth_stencil(void)
{
ID3D11DepthStencilState *depth_stencil_state;
@@ -25461,6 +25515,7 @@ START_TEST(d3d11)
@@ -26479,6 +26533,7 @@ START_TEST(d3d11)
test_gather_c();
test_depth_bias();
test_fractional_viewports();
@ -112,10 +112,10 @@ index cdce669..644766c 100644
if (!extended)
flags |= WINED3D_VIDMEM_ACCOUNTING;
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index a9632de..fe3301e 100644
index b8552af..50e4d82 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -65,7 +65,7 @@ struct FvfToDecl
@@ -66,7 +66,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,32 +125,32 @@ index a9632de..fe3301e 100644
enum ddraw_device_state
{
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index f20507b..c234758 100644
index 88e6181..d665012 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4559,10 +4559,13 @@ static void get_viewport(struct wined3d_context *context, const struct wined3d_s
@@ -4559,10 +4559,13 @@ static void get_viewports(struct wined3d_context *context, const struct wined3d_
if (target)
{
- 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 (viewport->width > target->width)
+ viewport->width = target->width;
+ if (viewport->height > target->height)
+ viewport->height = target->height;
+ }
if (target)
{
- if (viewports[i].width > target->width)
- viewports[i].width = target->width;
- if (viewports[i].height > target->height)
- viewports[i].height = target->height;
+ if (context->d3d_info->wined3d_creation_flags & WINED3D_LIMIT_VIEWPORT)
+ {
+ if (viewports[i].width > target->width)
+ viewports[i].width = target->width;
+ if (viewports[i].height > target->height)
+ viewports[i].height = target->height;
+ }
}
}
/*
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 5921646..d4abb29 100644
index 6bfbc03..97fb693 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1314,6 +1314,7 @@ enum wined3d_shader_byte_code_format
@@ -1315,6 +1315,7 @@ enum wined3d_shader_byte_code_format
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000