mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 5bccf6fc3f309207ef4162df335157649f627f50.
This commit is contained in:
parent
3a33c70a9a
commit
cb2a6e06e1
@ -1,4 +1,4 @@
|
||||
From 593683720fbef744c46cdc9051eb9703d4279819 Mon Sep 17 00:00:00 2001
|
||||
From cb01601870a6299e0da0a956269ef24ed79d5035 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Mon, 21 May 2018 18:13:00 -0700
|
||||
Subject: [PATCH] dwrite: Use font fallback when mapping characters
|
||||
@ -7,14 +7,14 @@ Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/analyzer.c | 77 +++++++++++++++++++++++++++++---------
|
||||
dlls/dwrite/layout.c | 6 +++
|
||||
dlls/dwrite/tests/layout.c | 70 +++++++++-------------------------
|
||||
3 files changed, 83 insertions(+), 70 deletions(-)
|
||||
dlls/dwrite/tests/layout.c | 54 +++++---------------------
|
||||
3 files changed, 74 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
|
||||
index a418081d491..06a3934d229 100644
|
||||
index 6b74a23540a..5827e87fdf5 100644
|
||||
--- a/dlls/dwrite/analyzer.c
|
||||
+++ b/dlls/dwrite/analyzer.c
|
||||
@@ -2053,6 +2053,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
@@ -2062,6 +2062,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
IDWriteFont **mapped_font)
|
||||
{
|
||||
const struct fallback_mapping *mapping;
|
||||
@ -22,7 +22,7 @@ index a418081d491..06a3934d229 100644
|
||||
HRESULT hr;
|
||||
UINT32 i;
|
||||
|
||||
@@ -2064,9 +2065,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
@@ -2073,9 +2074,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ index a418081d491..06a3934d229 100644
|
||||
weight, style, stretch, mapped_font);
|
||||
if (hr == S_OK) {
|
||||
TRACE("Created fallback font using family %s.\n", debugstr_w(mapping->families[i]));
|
||||
@@ -2123,32 +2130,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
|
||||
@@ -2132,32 +2139,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
|
||||
|
||||
if (basefamily && *basefamily) {
|
||||
hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
|
||||
@ -124,10 +124,10 @@ index a418081d491..06a3934d229 100644
|
||||
heap_free(buff);
|
||||
return hr;
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 76ea23ba66b..da1261f3dc8 100644
|
||||
index 99048b97a3c..64d8eef6f59 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -882,6 +882,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
@@ -958,6 +958,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
goto fatal;
|
||||
}
|
||||
|
||||
@ -141,10 +141,10 @@ index 76ea23ba66b..da1261f3dc8 100644
|
||||
IDWriteFont_Release(font);
|
||||
if (FAILED(hr)) {
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 68a6413b2e8..65bbaa71d93 100644
|
||||
index cea581a0bef..ecefbe9c87a 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3302,35 +3302,23 @@ todo_wine
|
||||
@@ -3368,35 +3368,23 @@ todo_wine
|
||||
|
||||
count = 0;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
@ -180,7 +180,7 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
|
||||
IDWriteTextLayout_Release(layout);
|
||||
@@ -4624,12 +4612,9 @@ static void test_MapCharacters(void)
|
||||
@@ -4690,12 +4678,9 @@ static void test_MapCharacters(void)
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
@ -193,7 +193,7 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
if (font) {
|
||||
IDWriteFont_Release(font);
|
||||
@@ -4641,16 +4626,13 @@ if (font) {
|
||||
@@ -4707,16 +4692,13 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
@ -213,7 +213,7 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
/* string 'a\x3058b' */
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
@@ -4658,38 +4640,32 @@ if (font) {
|
||||
@@ -4724,32 +4706,24 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
@ -225,11 +225,9 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
-todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
- IDWriteFont_Release(font);
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+ if (font) {
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
+
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
@ -244,26 +242,13 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
-todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
- /* font returned for Hiragana character, check if it supports Latin too */
|
||||
- exists = FALSE;
|
||||
- hr = IDWriteFont_HasCharacter(font, 'b', &exists);
|
||||
- ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- ok(exists, "got %d\n", exists);
|
||||
+ if (font) {
|
||||
+ /* font returned for Hiragana character, check if it supports Latin too */
|
||||
+ exists = FALSE;
|
||||
+ hr = IDWriteFont_HasCharacter(font, 'b', &exists);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(exists, "got %d\n", exists);
|
||||
|
||||
- IDWriteFont_Release(font);
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
+
|
||||
/* Try with explicit collection, Tahoma will be forced. */
|
||||
/* 1. Latin part */
|
||||
g_source = str2W;
|
||||
@@ -4712,7 +4688,10 @@ if (font) {
|
||||
@@ -4772,7 +4746,10 @@ if (font) {
|
||||
IDWriteLocalizedStrings_Release(strings);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
@ -275,7 +260,7 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
@@ -4722,7 +4701,6 @@ if (font) {
|
||||
@@ -4782,7 +4759,6 @@ if (font) {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
@ -283,7 +268,7 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
|
||||
exists = FALSE;
|
||||
hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
|
||||
@@ -5916,34 +5894,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
@@ -6564,34 +6540,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
@ -319,5 +304,5 @@ index 68a6413b2e8..65bbaa71d93 100644
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.20.1
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "31af1aeb7895bddf59a73886b89759f76881bc9e"
|
||||
echo "5bccf6fc3f309207ef4162df335157649f627f50"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -211,7 +211,6 @@ patch_enable_all ()
|
||||
enable_server_Stored_ACLs="$1"
|
||||
enable_server_default_integrity="$1"
|
||||
enable_setupapi_DiskSpaceList="$1"
|
||||
enable_setupapi_SPFILENOTIFY_FILEINCABINET="$1"
|
||||
enable_shdocvw_ParseURLFromOutsideSource_Tests="$1"
|
||||
enable_shell32_ACE_Viewer="$1"
|
||||
enable_shell32_Context_Menu="$1"
|
||||
@ -705,9 +704,6 @@ patch_enable ()
|
||||
setupapi-DiskSpaceList)
|
||||
enable_setupapi_DiskSpaceList="$2"
|
||||
;;
|
||||
setupapi-SPFILENOTIFY_FILEINCABINET)
|
||||
enable_setupapi_SPFILENOTIFY_FILEINCABINET="$2"
|
||||
;;
|
||||
shdocvw-ParseURLFromOutsideSource_Tests)
|
||||
enable_shdocvw_ParseURLFromOutsideSource_Tests="$2"
|
||||
;;
|
||||
@ -3559,21 +3555,6 @@ if test "$enable_setupapi_DiskSpaceList" -eq 1; then
|
||||
patch_apply setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch
|
||||
fi
|
||||
|
||||
# Patchset setupapi-SPFILENOTIFY_FILEINCABINET
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#42827] Fix Param2 in SPFILENOTIFY_FILEINCABINET handler
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/setupapi/setupcab.c, dlls/setupapi/tests/setupcab.c
|
||||
# |
|
||||
if test "$enable_setupapi_SPFILENOTIFY_FILEINCABINET" -eq 1; then
|
||||
patch_apply setupapi-SPFILENOTIFY_FILEINCABINET/0001-setupapi-tests-Add-more-tests-for-SPFILENOTIFY_FILEI.patch
|
||||
patch_apply setupapi-SPFILENOTIFY_FILEINCABINET/0002-setupapi-Fix-CabinetName-passed-to-SPFILENOTIFY_CABI.patch
|
||||
patch_apply setupapi-SPFILENOTIFY_FILEINCABINET/0003-setupapi-tests-Add-tests-for-cabinet-name-passed-to-.patch
|
||||
patch_apply setupapi-SPFILENOTIFY_FILEINCABINET/0004-setupapi-Fix-parameters-of-SPFILENOTIFY_FILEINCABINE.patch
|
||||
fi
|
||||
|
||||
# Patchset shdocvw-ParseURLFromOutsideSource_Tests
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -1 +1,3 @@
|
||||
Fixes: [42827] Fix Param2 in SPFILENOTIFY_FILEINCABINET handler
|
||||
# I have patches locally to upstream/replace this.
|
||||
Disabled: true
|
||||
|
@ -1,19 +1,19 @@
|
||||
From 6ba32e009912c40b81c83f30c0589876280bad6d Mon Sep 17 00:00:00 2001
|
||||
From a994b3627570ca44e30cbf238412159347ebb010 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 20 Feb 2017 00:27:25 +0100
|
||||
Subject: [PATCH] wined3d: Improve wined3d_cs_emit_update_sub_resource.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 75 ++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/cs.c | 78 ++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 2 -
|
||||
dlls/wined3d/wined3d_private.h | 1 +
|
||||
3 files changed, 76 insertions(+), 2 deletions(-)
|
||||
3 files changed, 79 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 1417c07b..7da87ba8 100644
|
||||
index 5176c635cf5..efacf42eb12 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -409,6 +409,7 @@ struct wined3d_cs_update_sub_resource
|
||||
@@ -420,6 +420,7 @@ struct wined3d_cs_update_sub_resource
|
||||
unsigned int sub_resource_idx;
|
||||
struct wined3d_box box;
|
||||
struct wined3d_sub_resource_data data;
|
||||
@ -21,7 +21,7 @@ index 1417c07b..7da87ba8 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_add_dirty_texture_region
|
||||
@@ -2375,6 +2376,51 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2481,6 +2482,51 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
unsigned int slice_pitch)
|
||||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
@ -50,10 +50,10 @@ index 1417c07b..7da87ba8 100644
|
||||
+ }
|
||||
+
|
||||
+ size = FIELD_OFFSET(struct wined3d_cs_update_sub_resource, copy_data[data_size]);
|
||||
+ if (!cs->ops->check_space(cs, size, WINED3D_CS_QUEUE_DEFAULT))
|
||||
+ if (!cs->c.ops->check_space(&cs->c, size, WINED3D_CS_QUEUE_DEFAULT))
|
||||
+ goto no_async;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ op = cs->c.ops->require_space(&cs->c, size, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
+ op->resource = resource;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
@ -65,43 +65,36 @@ index 1417c07b..7da87ba8 100644
|
||||
+
|
||||
+ wined3d_resource_acquire(resource);
|
||||
+
|
||||
+ cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ cs->c.ops->submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ return;
|
||||
+
|
||||
+no_async:
|
||||
+ wined3d_resource_wait_idle(resource);
|
||||
|
||||
op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
|
||||
op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_MAP);
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
@@ -2388,6 +2434,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
wined3d_cs_submit(cs, WINED3D_CS_QUEUE_MAP);
|
||||
+
|
||||
/* The data pointer may go away, so we need to wait until it is read.
|
||||
* Copying the data may be faster if it's small. */
|
||||
wined3d_cs_finish(cs, WINED3D_CS_QUEUE_MAP);
|
||||
@@ -2572,6 +2619,11 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2677,6 +2723,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_GENERATE_MIPMAPS */ wined3d_cs_exec_generate_mipmaps,
|
||||
};
|
||||
|
||||
+static BOOL wined3d_cs_st_check_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
+static BOOL wined3d_cs_st_check_space(struct wined3d_device_context *context,
|
||||
+ size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
+{
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_device_context *context,
|
||||
size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
{
|
||||
if (size > (cs->data_size - cs->end))
|
||||
@@ -2625,6 +2677,7 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
|
||||
@@ -2734,6 +2786,7 @@ static void wined3d_cs_st_finish(struct wined3d_device_context *context, enum wi
|
||||
|
||||
static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
static const struct wined3d_device_context_ops wined3d_cs_st_ops =
|
||||
{
|
||||
+ wined3d_cs_st_check_space,
|
||||
wined3d_cs_st_require_space,
|
||||
wined3d_cs_st_submit,
|
||||
wined3d_cs_st_finish,
|
||||
@@ -2658,6 +2711,19 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
|
||||
@@ -2769,6 +2822,19 @@ static void wined3d_cs_mt_submit(struct wined3d_device_context *context, enum wi
|
||||
wined3d_cs_queue_submit(&cs->queue[queue_id], cs);
|
||||
}
|
||||
|
||||
@ -121,34 +114,37 @@ index 1417c07b..7da87ba8 100644
|
||||
static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs)
|
||||
{
|
||||
size_t queue_size = ARRAY_SIZE(queue->data);
|
||||
@@ -2719,6 +2785,14 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
|
||||
@@ -2831,6 +2897,17 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
|
||||
return packet->data;
|
||||
}
|
||||
|
||||
+static BOOL wined3d_cs_mt_check_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
+static BOOL wined3d_cs_mt_check_space(struct wined3d_device_context *context,
|
||||
+ size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
+{
|
||||
+ struct wined3d_cs *cs = wined3d_cs_from_context(context);
|
||||
+
|
||||
+ if (cs->thread_id == GetCurrentThreadId())
|
||||
+ return wined3d_cs_st_check_space(cs, size, queue_id);
|
||||
+ return wined3d_cs_st_check_space(context, size, queue_id);
|
||||
+
|
||||
+ return wined3d_cs_queue_check_space(&cs->queue[queue_id], size);
|
||||
+}
|
||||
+
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_device_context *context,
|
||||
size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
{
|
||||
if (cs->thread_id == GetCurrentThreadId())
|
||||
@@ -2738,6 +2812,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
|
||||
@@ -2855,6 +2932,7 @@ static void wined3d_cs_mt_finish(struct wined3d_device_context *context, enum wi
|
||||
|
||||
static const struct wined3d_cs_ops wined3d_cs_mt_ops =
|
||||
static const struct wined3d_device_context_ops wined3d_cs_mt_ops =
|
||||
{
|
||||
+ wined3d_cs_mt_check_space,
|
||||
wined3d_cs_mt_require_space,
|
||||
wined3d_cs_mt_submit,
|
||||
wined3d_cs_mt_finish,
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index f51f4c87..7427fe48 100644
|
||||
index 06329293261..356f549e5c6 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4342,8 +4342,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4972,8 +4972,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
return;
|
||||
}
|
||||
|
||||
@ -158,17 +154,17 @@ index f51f4c87..7427fe48 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 886f20b7..dbdb16a6 100644
|
||||
index ee00530981c..6881fe8e4cd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3639,6 +3639,7 @@ struct wined3d_cs_queue
|
||||
@@ -4671,6 +4671,7 @@ struct wined3d_cs_queue
|
||||
|
||||
struct wined3d_cs_ops
|
||||
struct wined3d_device_context_ops
|
||||
{
|
||||
+ BOOL (*check_space)(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id);
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id);
|
||||
void (*submit)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
|
||||
void (*finish)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
|
||||
+ BOOL (*check_space)(struct wined3d_device_context *context, size_t size, enum wined3d_cs_queue_id queue_id);
|
||||
void *(*require_space)(struct wined3d_device_context *context, size_t size, enum wined3d_cs_queue_id queue_id);
|
||||
void (*submit)(struct wined3d_device_context *context, enum wined3d_cs_queue_id queue_id);
|
||||
void (*finish)(struct wined3d_device_context *context, enum wined3d_cs_queue_id queue_id);
|
||||
--
|
||||
2.19.1
|
||||
2.20.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ac972e6697b1c428e2aa54ca3329e42c5d485ce2 Mon Sep 17 00:00:00 2001
|
||||
From 4ccd7af44de5f89689541253e03f772c185d36ae Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 20:15:07 +0300
|
||||
Subject: [PATCH] wined3d: Allow higher world matrix states.
|
||||
@ -16,10 +16,10 @@ Subject: [PATCH] wined3d: Allow higher world matrix states.
|
||||
9 files changed, 282 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 1f0d4a85d1d..ba649101914 100644
|
||||
index 175381231e1..cfe74a11f5e 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21980,6 +21980,18 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21993,6 +21993,18 @@ static void test_indexed_vertex_blending(void)
|
||||
d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
|
||||
@ -39,10 +39,10 @@ index 1f0d4a85d1d..ba649101914 100644
|
||||
present_parameters.hDeviceWindow = window;
|
||||
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index b98d288d3c1..1f8268237e7 100644
|
||||
index 56dd40e9d68..28acdce0ea3 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -5148,6 +5148,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
||||
@@ -5094,6 +5094,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
||||
d3d_info->limits.ffp_textures = fragment_caps.MaxSimultaneousTextures;
|
||||
d3d_info->limits.ffp_blend_stages = fragment_caps.MaxTextureBlendStages;
|
||||
TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages);
|
||||
@ -51,24 +51,24 @@ index b98d288d3c1..1f8268237e7 100644
|
||||
d3d_info->limits.active_light_count = vertex_caps.max_active_lights;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 005f592f8ab..556a615c86d 100644
|
||||
index 5176c635cf5..b7401703ab0 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1671,7 +1671,8 @@ static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1781,7 +1781,8 @@ static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
|
||||
const struct wined3d_cs_set_transform *op = data;
|
||||
|
||||
cs->state.transforms[op->state] = op->matrix;
|
||||
- if (op->state < WINED3D_TS_WORLD_MATRIX(cs->device->adapter->d3d_info.limits.ffp_vertex_blend_matrices))
|
||||
+ if (op->state < WINED3D_TS_WORLD_MATRIX(max(cs->device->adapter->d3d_info.limits.ffp_vertex_blend_matrices,
|
||||
+ cs->device->adapter->d3d_info.limits.ffp_max_vertex_blend_matrix_index + 1)))
|
||||
device_invalidate_state(cs->device, STATE_TRANSFORM(op->state));
|
||||
- if (op->state < WINED3D_TS_WORLD_MATRIX(cs->c.device->adapter->d3d_info.limits.ffp_vertex_blend_matrices))
|
||||
+ if (op->state < WINED3D_TS_WORLD_MATRIX(max(cs->c.device->adapter->d3d_info.limits.ffp_vertex_blend_matrices,
|
||||
+ cs->c.device->adapter->d3d_info.limits.ffp_max_vertex_blend_matrix_index + 1)))
|
||||
device_invalidate_state(cs->c.device, STATE_TRANSFORM(op->state));
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 000173701db..aa97cada0e7 100644
|
||||
index 1cb3663fd7c..c521eb2fcd4 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3592,6 +3592,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
@@ -4102,6 +4102,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
|
||||
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps)
|
||||
{
|
||||
@ -76,7 +76,7 @@ index 000173701db..aa97cada0e7 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("device %p, caps %p.\n", device, caps);
|
||||
@@ -3601,6 +3602,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
@@ -4111,6 +4112,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
|
||||
if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING)
|
||||
caps->MaxVertexShaderConst = device->adapter->d3d_info.limits.vs_uniform_count_swvp;
|
||||
@ -89,10 +89,10 @@ index 000173701db..aa97cada0e7 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index b6a9b502d82..f0ff3b8c000 100644
|
||||
index c673f61e429..acc91353a37 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -2088,7 +2088,9 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter,
|
||||
@@ -2259,7 +2259,9 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter,
|
||||
caps->MaxUserClipPlanes = vertex_caps.max_user_clip_planes;
|
||||
caps->MaxActiveLights = vertex_caps.max_active_lights;
|
||||
caps->MaxVertexBlendMatrices = vertex_caps.max_vertex_blend_matrices;
|
||||
@ -104,10 +104,10 @@ index b6a9b502d82..f0ff3b8c000 100644
|
||||
caps->FVFCaps = vertex_caps.fvf_caps;
|
||||
caps->RasterCaps |= vertex_caps.raster_caps;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index f869c5fe841..ccb6ccb6baa 100644
|
||||
index d73ff074dd0..3ebead70e88 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -12042,6 +12042,258 @@ static const struct wined3d_state_entry_template glsl_vertex_pipe_vp_states[] =
|
||||
@@ -12066,6 +12066,258 @@ static const struct wined3d_state_entry_template glsl_vertex_pipe_vp_states[] =
|
||||
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(1)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(1)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(2)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(2)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(3)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(3)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
|
||||
@ -367,10 +367,10 @@ index f869c5fe841..ccb6ccb6baa 100644
|
||||
{STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), glsl_vertex_pipe_texmatrix}, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), glsl_vertex_pipe_texmatrix}, WINED3D_GL_EXT_NONE },
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index b24fbf7ac2d..d1e13736388 100644
|
||||
index a8a51e9a22a..fa2ef1359a6 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -5482,7 +5482,8 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
|
||||
@@ -5558,7 +5558,8 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
|
||||
state_table[i].apply = state_undefined;
|
||||
}
|
||||
|
||||
@ -381,10 +381,10 @@ index b24fbf7ac2d..d1e13736388 100644
|
||||
for (i = start; i <= last; ++i)
|
||||
{
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 0397056441f..b2180782af8 100644
|
||||
index 233cd49209f..f5ec4e0b98b 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -5171,11 +5171,9 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype)
|
||||
@@ -5123,11 +5123,9 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype)
|
||||
TSTYPE_TO_STR(WINED3D_TS_WORLD_MATRIX(3));
|
||||
#undef TSTYPE_TO_STR
|
||||
default:
|
||||
@ -400,10 +400,10 @@ index 0397056441f..b2180782af8 100644
|
||||
return "unrecognized";
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 54313054701..7d7e931d624 100644
|
||||
index 2f6e9f1ead1..5568cd2c619 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -182,6 +182,7 @@ struct wined3d_d3d_limits
|
||||
@@ -188,6 +188,7 @@ struct wined3d_d3d_limits
|
||||
unsigned int ffp_blend_stages;
|
||||
unsigned int ffp_vertex_blend_matrices;
|
||||
unsigned int active_light_count;
|
||||
@ -412,5 +412,5 @@ index 54313054701..7d7e931d624 100644
|
||||
unsigned int max_rt_count;
|
||||
unsigned int max_clip_distances;
|
||||
--
|
||||
2.26.2
|
||||
2.20.1
|
||||
|
||||
|
@ -1 +1 @@
|
||||
31af1aeb7895bddf59a73886b89759f76881bc9e
|
||||
5bccf6fc3f309207ef4162df335157649f627f50
|
||||
|
Loading…
Reference in New Issue
Block a user