You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
86 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
aa0c8391eb | ||
|
36020b4a0e | ||
|
4fa7fcd631 | ||
|
ebf36e4717 | ||
|
835c92a298 | ||
|
708eb528c0 | ||
|
77a24c72b8 | ||
|
8924ee42d8 | ||
|
e1b2c45272 | ||
|
9b43d37fd1 | ||
|
5b64f435e9 | ||
|
441fd5f422 | ||
|
c103bbb0b6 | ||
|
d88d44f1d9 | ||
|
5e84688c5f | ||
|
c110178b0d | ||
|
796c6b3a44 | ||
|
2ae11f25b0 | ||
|
30f69aa45a | ||
|
bb826f2185 | ||
|
c5767aad30 | ||
|
fa0cd8ead0 | ||
|
f247cd5d6b | ||
|
b17a3d6c54 | ||
|
c0e113dd3a | ||
|
946648d13f | ||
|
d9670d89d1 | ||
|
4914f150c5 | ||
|
0af25de63c | ||
|
0682c26496 | ||
|
db49cb3767 | ||
|
6f8931b39a | ||
|
0e1220c76d | ||
|
acb3c0bb3c | ||
|
a381f356d6 | ||
|
b69d02ba02 | ||
|
3546551685 | ||
|
2439dab96c | ||
|
f5190ef988 | ||
|
ec5fbb99b7 | ||
|
857466ad4c | ||
|
4378292a65 | ||
|
c2e4c17811 | ||
|
34a7d5e858 | ||
|
a4e8224bd8 | ||
|
1b224000ac | ||
|
2b9cd3663b | ||
|
4901d72e77 | ||
|
735225dbaa | ||
|
7042b486e2 | ||
|
4ef147fbe5 | ||
|
7b9777c23e | ||
|
aed0bcfb83 | ||
|
22f5ea5e4f | ||
|
7f5729fc14 | ||
|
7fda13a16d | ||
|
667ee8a4ff | ||
|
b45a0aead3 | ||
|
36483a9c11 | ||
|
28834e80f8 | ||
|
49770c6bc6 | ||
|
93f5b4f6a0 | ||
|
e452a6cbdc | ||
|
23ccc2eef1 | ||
|
18f976c338 | ||
|
05bc4b822f | ||
|
177488c071 | ||
|
d0d5fef5bb | ||
|
7d45af5cb4 | ||
|
ad6dc1328b | ||
|
f6f66d11a2 | ||
|
5ab7824f62 | ||
|
c263c6fabb | ||
|
f10d2d0452 | ||
|
bc8dead787 | ||
|
3738f9baee | ||
|
c2de76b804 | ||
|
5a9719f283 | ||
|
c8d46d4ca3 | ||
|
4f96088b1e | ||
|
7f8391d22f | ||
|
2f87552459 | ||
|
4f83c2f614 | ||
|
dc277fed5e | ||
|
342b3b8162 | ||
|
891daebf57 |
8
.github/workflows/macOS.yml
vendored
8
.github/workflows/macOS.yml
vendored
@@ -20,7 +20,6 @@ jobs:
|
||||
bison \
|
||||
gphoto2 \
|
||||
gstreamer \
|
||||
gcenx/wine/libinotify-kqueue \
|
||||
mingw-w64 \
|
||||
molten-vk \
|
||||
sdl2
|
||||
@@ -44,10 +43,11 @@ jobs:
|
||||
cd wine
|
||||
$GITHUB_WORKSPACE/staging/patchinstall.py DESTDIR=. --all
|
||||
|
||||
- name: Configure wine64
|
||||
- name: Configure wine
|
||||
env:
|
||||
LDFLAGS: "-Wl,-rpath,/opt/X11/lib"
|
||||
# Avoid weird linker errors with Xcode 10 and later
|
||||
# We need to tell the linker to add brew & Xquarts to the rpath stack.
|
||||
LDFLAGS: "-Wl,-rpath,/usr/local/lib -Wl,-rpath,/opt/X11/lib"
|
||||
# Use an older deployment target to avoid new dyld behaviors.
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.14"
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 601da0ae0c6b22f37d20e6e0f10558093277eca9 Mon Sep 17 00:00:00 2001
|
||||
From 3dc4a148d7c91afea8f589f47daca82c5c27b7c1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
branch name and version.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
dlls/ntdll/loader.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 5f84ca7e23b..fabf394fbe5 100644
|
||||
index 74eb1b7f500..95639558155 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -43,6 +43,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -20,7 +20,7 @@ index 5f84ca7e23b..fabf394fbe5 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3828,6 +3829,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
@@ -3870,6 +3871,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index 5f84ca7e23b..fabf394fbe5 100644
|
||||
|
||||
/******************************************************************
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -4322,6 +4324,9 @@ static void release_address_space(void)
|
||||
@@ -4366,6 +4368,9 @@ static void release_address_space(void)
|
||||
*/
|
||||
void loader_init( CONTEXT *context, void **entry )
|
||||
{
|
||||
@@ -38,13 +38,13 @@ index 5f84ca7e23b..fabf394fbe5 100644
|
||||
static int attach_done;
|
||||
NTSTATUS status;
|
||||
ULONG_PTR cookie, port = 0;
|
||||
@@ -4407,7 +4412,18 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
@@ -4455,6 +4460,20 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
arm64ec_thread_init();
|
||||
#endif
|
||||
wm = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
|
||||
+ /* This hunk occasionally applies in the wrong place;
|
||||
+ * add a comment here to try to prevent that. */
|
||||
}
|
||||
+ }
|
||||
+ RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" );
|
||||
+ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL );
|
||||
+ if (NtCreateEvent( &staging_event, EVENT_ALL_ACCESS, &staging_event_attr, NotificationEvent, FALSE ) == STATUS_SUCCESS)
|
||||
@@ -53,10 +53,12 @@ index 5f84ca7e23b..fabf394fbe5 100644
|
||||
+ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+ NtClose( staging_event );
|
||||
}
|
||||
|
||||
NtCurrentTeb()->FlsSlots = fls_alloc_data();
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
||||
|
@@ -0,0 +1,267 @@
|
||||
From e4d55d451648b67c9269241efce8eee63faf70a4 Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Knechtges <philipp-dev@knechtges.com>
|
||||
Date: Fri, 13 Sep 2024 11:16:44 +0200
|
||||
Subject: [PATCH] d2d1: Add tests for drawing ID2D1GeometryGroup
|
||||
|
||||
The functionality to draw ID2D1GeometryGroup is currently missing.
|
||||
Nothing is drawn. This causes the blank pages in the bug below.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139
|
||||
---
|
||||
dlls/d2d1/tests/d2d1.c | 219 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 219 insertions(+)
|
||||
|
||||
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
|
||||
index 40bcf5079b8..41b36ef0dd5 100644
|
||||
--- a/dlls/d2d1/tests/d2d1.c
|
||||
+++ b/dlls/d2d1/tests/d2d1.c
|
||||
@@ -7061,6 +7061,7 @@ static void test_gradient(BOOL d3d11)
|
||||
static void test_draw_geometry(BOOL d3d11)
|
||||
{
|
||||
ID2D1TransformedGeometry *transformed_geometry[4];
|
||||
+ ID2D1GeometryGroup *geometry_group;
|
||||
ID2D1RectangleGeometry *rect_geometry[2];
|
||||
D2D1_POINT_2F point = {0.0f, 0.0f};
|
||||
D2D1_ROUNDED_RECT rounded_rect;
|
||||
@@ -7970,6 +7971,117 @@ static void test_draw_geometry(BOOL d3d11)
|
||||
hr = ID2D1PathGeometry_Open(geometry, &sink);
|
||||
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
+ set_point(&point, -0.402914f, 0.915514f);
|
||||
+ ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
|
||||
+ quadratic_to(sink, -0.310379f, 0.882571f, -0.116057f, 0.824000f);
|
||||
+ quadratic_to(sink, 0.008350f, 0.693614f, -0.052343f, 0.448886f);
|
||||
+ quadratic_to(sink, -0.154236f, 0.246072f, -0.279229f, 0.025343f);
|
||||
+ quadratic_to(sink, -0.370064f, -0.588586f, -0.383029f, -0.924114f);
|
||||
+ quadratic_to(sink, -0.295479f, -0.958764f, -0.017086f, -0.988400f);
|
||||
+ quadratic_to(sink, 0.208836f, -0.954157f, 0.272200f, -0.924114f);
|
||||
+ quadratic_to(sink, 0.295614f, -0.569071f, 0.230143f, 0.022886f);
|
||||
+ quadratic_to(sink, 0.101664f, 0.220643f, 0.012057f, 0.451571f);
|
||||
+ quadratic_to(sink, -0.028764f, 0.709014f, 0.104029f, 0.833943f);
|
||||
+ quadratic_to(sink, 0.319414f, 0.913057f, 0.403229f, 0.942628f);
|
||||
+ quadratic_to(sink, 0.317721f, 1.023450f, -0.017086f, 1.021771f);
|
||||
+ quadratic_to(sink, -0.310843f, 1.007472f, -0.402914f, 0.915514f);
|
||||
+ ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
|
||||
+
|
||||
+ hr = ID2D1GeometrySink_Close(sink);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1GeometrySink_Release(sink);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ translate_matrix(&matrix, 40.0f, 160.0f);
|
||||
+ scale_matrix(&matrix, 20.0f, 80.0f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ translate_matrix(&matrix, 160.0f, 640.0f);
|
||||
+ scale_matrix(&matrix, 40.0f, 160.0f);
|
||||
+ rotate_matrix(&matrix, M_PI / -5.0f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1PathGeometry_Release(geometry);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ scale_matrix(&matrix, 0.5f, 1.0f);
|
||||
+ translate_matrix(&matrix, -80.0f, 0.0f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ rotate_matrix(&matrix, M_PI / 2.0f);
|
||||
+ translate_matrix(&matrix, 80.0f, -320.0f);
|
||||
+ scale_matrix(&matrix, 2.0f, 0.25f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_WINDING,
|
||||
+ (ID2D1Geometry**) &transformed_geometry, 4, &geometry_group);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[3]);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[2]);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[1]);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[0]);
|
||||
+
|
||||
+ ID2D1RenderTarget_BeginDraw(rt);
|
||||
+ ID2D1RenderTarget_Clear(rt, &color);
|
||||
+ ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry_group, (ID2D1Brush *)brush, 10.0f, NULL);
|
||||
+ hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1GeometryGroup_Release(geometry_group);
|
||||
+
|
||||
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 256,
|
||||
+ "iTANiwEagQEkeSp0LnIWAhZyFAYUchQGFHIUBhRyFAYUchQGFHIUBhRyFAYUchQGFHIUBhRyFAYU"
|
||||
+ "cxQFFHMUBRRzFAUUcxQFFHMUBRRzFAUUcxQFFHMUBRRzFAUUcxQFFHQUBBR0FAQUdBQDFHUUAxR1"
|
||||
+ "FAMUdRQDFHUUAxR1FQIUdhQCFHYUAhR2FAIUdhQCFHYUAhR2FAIUdhQBFHgoeCh4KHkmeiZ7JHwk"
|
||||
+ "fSJ+In8ggAEfggEeggEdhAEchQEbhQEahwEZhwEYiQEXiQEWigEWigEWigEWiwEViwEViwEViwEV"
|
||||
+ "igEXiQEXiQEXiQEYhwEZhgEbgwEefyR5KXQvbxgEGG4VBxhtMnAudCp6IoMBGOMu");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 512,
|
||||
+ "xpcBB7QCEqkCG6ACJJgCLI8CNYcCHgMc/gEeDBr4AR4UGPIBHR0W7AEdIxbmAR0pFt8BHTAV2gEd"
|
||||
+ "MBrWARwuIdMBGiwi1gEYKiPZARYoJNwBFiQk4AEWHyWxAQQvFhsltgEKKBYWJrwBECBOwQEXF0rI"
|
||||
+ "ARwOSM4Ba9UBYeABRf0BOIoCMZECLJYCKJoCJ5wCJp0CJJ8CIqICH6QCHagCGa4CFLoCB/yUAQAA");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 512,
|
||||
+ "yWQBnQEEmQEHlgELkwENkAEQjgETiwEVigEXhwEZhgEahQEcgwEdggEfgAEgfyF+I30jfCR8JXom"
|
||||
+ "eid4KHgodxQCFHYUAhR1FAMUdBUEFHMUBRRyFQUUchQHFHEUBxRwFAgUcBQJFG4UChRuFAoUbRUL"
|
||||
+ "FGwUDBRsFAwUbBQNFGwUDBRsFAwUbRQMFGwUDBRsFAwUbRQLFWwUDBRtFAsUbRQLFG0VCxRtFAsU"
|
||||
+ "bRQLFG4UCxRtFAsUbhQKFG4UCxRuFAoUbhQKFG4VCRRvFAoUbhQKFG8UCRRvFAoUbxQJFG8UCRRw"
|
||||
+ "FAgVbxQJFHAUCBRwFAgUcBUIFHAUCBRwFAgUcRQHFHEUBxRyFAYUchQGFHMUBRRzFAUUdBQEFHQU"
|
||||
+ "BBR1FAQUdBQEFHUUAxR1FAMUdhQCFHYUAhR2FQEUdxQBFHcpeCh4KHkneSd6JnoneiZ7JXwkfSN+"
|
||||
+ "In8hgAEggQEfgwEdhAEdhAEchQEbhgEahwEZiAEYGAFwGBYCcRcUBHEXEgZyFhEHchcOCXMWDAtz"
|
||||
+ "FgsMdBYIDnQWBhB1FgQQdhYCEnYqdyl3KXcpeCd5J3kneSd5JnomeyR8JHwkfCN9I30ifiF/IX4h"
|
||||
+ "fyF/IH8ggAEgfyCAASCAAR+AAR+BAR6CAR6BAR6CAR2CAR2DARyEARuEARuFARqGARmGARiKARSR"
|
||||
+ "AQqhYwAA");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 1024,
|
||||
+ "ytABA7gCCbICD60CFKkCF6cCGqMCHqACIZ0CJJoCJpgCKZUCFgIUkgIWBBWPAhYHFI4CFQoUjAIV"
|
||||
+ "DBSKAhUNFYgCFQ8UhwIVERSFAhUTFIMCFRQVgQIUFxSAAhQZFP4BFBoV/AEUHBT7ARQeFPkBFB8V"
|
||||
+ "9wEUIRT2ARQjFPQBFSMV8gEVJRTxARUnFPABFCgV7gEUKhTtARQsFOwBFCwV7AEULBTsARUsFOwB"
|
||||
+ "FSsV7AEULBTtARQsFO0BFCsU7QEVKxTtARUqFe0BFSoU7gEUKxTuARQqFe4BFCoU7wEUKhTuARUp"
|
||||
+ "FO8BFSkU7wEVKBXvARUoFPABFCkU8AEUKBTxARQoFPEBFCcV8QEUJxTxARUnFPEBFSYU8gEVJhTy"
|
||||
+ "ARUlFfIBFSUU8wEUJRXzARQlFPQBFCUU9AEUJBT1ARQkFPUBFCMU9gEUIhT2ARUhFPcBFSAU+AEV"
|
||||
+ "HxT5ARUeFPoBFR4U+gEVHRT7ARUcFPwBFRsU/QEVGhT+ARUZFP8BFBkUgAIUGBSBAhQXFIICFBcU"
|
||||
+ "ggIUFhSDAhQVFIQCFBQUhQIUExSGAhQSFIcCFBIUhwIUERSIAhUPFIkCFg0UigIXCxSNAhYJFI8C"
|
||||
+ "FggUkAIXBRSSAhcDFJQCFwEUlgIrlwIpmgImnAIkngIjnwIhoQIfowIepAIcpgIbpgIaqAIZqAIZ"
|
||||
+ "qAIYKwP7ARgnBf0BGCMI/QEZHgz+ARgbD/8BGBcSgAIYEhaAAhoNGIICGggcgwIaBB+DAjyEAjyF"
|
||||
+ "AjqGAjmIAjiIAiECFIkCFAIIBBSKAhQNFIsCFAwUjAIUCxSNAhQKFI4CFAkUjwIUBxWQAhQGFZEC"
|
||||
+ "FAUVkQIUBRWRAhQFFZECFQMVkwIUAxWTAhQDFZMCFAIVlAIVARWVAiqVAimWAimWAiiYAiaZAiaZ"
|
||||
+ "AiWaAiScAiKdAiGeAh+hAhyjAhmuAg3GxgEA");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+
|
||||
+ hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ hr = ID2D1PathGeometry_Open(geometry, &sink);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
set_point(&point, 20.0f, 80.0f);
|
||||
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
|
||||
quadratic_to(sink, 20.0f, 160.0f, 60.0f, 160.0f);
|
||||
@@ -8011,6 +8123,7 @@ static void test_draw_geometry(BOOL d3d11)
|
||||
static void test_fill_geometry(BOOL d3d11)
|
||||
{
|
||||
ID2D1TransformedGeometry *transformed_geometry[4];
|
||||
+ ID2D1GeometryGroup *geometry_group;
|
||||
ID2D1RectangleGeometry *rect_geometry[2];
|
||||
D2D1_POINT_2F point = {0.0f, 0.0f};
|
||||
D2D1_ROUNDED_RECT rounded_rect;
|
||||
@@ -8728,6 +8841,112 @@ static void test_fill_geometry(BOOL d3d11)
|
||||
hr = ID2D1PathGeometry_Open(geometry, &sink);
|
||||
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
+ set_point(&point, -0.402914f, 0.915514f);
|
||||
+ ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
|
||||
+ quadratic_to(sink, -0.310379f, 0.882571f, -0.116057f, 0.824000f);
|
||||
+ quadratic_to(sink, 0.008350f, 0.693614f, -0.052343f, 0.448886f);
|
||||
+ quadratic_to(sink, -0.154236f, 0.246072f, -0.279229f, 0.025343f);
|
||||
+ quadratic_to(sink, -0.370064f, -0.588586f, -0.383029f, -0.924114f);
|
||||
+ quadratic_to(sink, -0.295479f, -0.958764f, -0.017086f, -0.988400f);
|
||||
+ quadratic_to(sink, 0.208836f, -0.954157f, 0.272200f, -0.924114f);
|
||||
+ quadratic_to(sink, 0.295614f, -0.569071f, 0.230143f, 0.022886f);
|
||||
+ quadratic_to(sink, 0.101664f, 0.220643f, 0.012057f, 0.451571f);
|
||||
+ quadratic_to(sink, -0.028764f, 0.709014f, 0.104029f, 0.833943f);
|
||||
+ quadratic_to(sink, 0.319414f, 0.913057f, 0.403229f, 0.942628f);
|
||||
+ quadratic_to(sink, 0.317721f, 1.023450f, -0.017086f, 1.021771f);
|
||||
+ quadratic_to(sink, -0.310843f, 1.007472f, -0.402914f, 0.915514f);
|
||||
+ ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
|
||||
+
|
||||
+ hr = ID2D1GeometrySink_Close(sink);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1GeometrySink_Release(sink);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ translate_matrix(&matrix, 40.0f, 160.0f);
|
||||
+ scale_matrix(&matrix, 20.0f, 80.0f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ translate_matrix(&matrix, 160.0f, 640.0f);
|
||||
+ scale_matrix(&matrix, 40.0f, 160.0f);
|
||||
+ rotate_matrix(&matrix, M_PI / -5.0f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1PathGeometry_Release(geometry);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ scale_matrix(&matrix, 0.5f, 1.0f);
|
||||
+ translate_matrix(&matrix, -80.0f, 0.0f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ set_matrix_identity(&matrix);
|
||||
+ rotate_matrix(&matrix, M_PI / 2.0f);
|
||||
+ translate_matrix(&matrix, 80.0f, -320.0f);
|
||||
+ scale_matrix(&matrix, 2.0f, 0.25f);
|
||||
+ hr = ID2D1Factory_CreateTransformedGeometry(factory,
|
||||
+ (ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_WINDING,
|
||||
+ (ID2D1Geometry**) &transformed_geometry, 4, &geometry_group);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[3]);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[2]);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[1]);
|
||||
+ ID2D1TransformedGeometry_Release(transformed_geometry[0]);
|
||||
+
|
||||
+ ID2D1RenderTarget_BeginDraw(rt);
|
||||
+ ID2D1RenderTarget_Clear(rt, &color);
|
||||
+ ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry_group, (ID2D1Brush *)brush, NULL);
|
||||
+ hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ID2D1GeometryGroup_Release(geometry_group);
|
||||
+
|
||||
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 32,
|
||||
+ "zzIBlwEOjQEXiAEahgEahgEahgEahgEahgEahgEahgEahgEahgEahgEahwEZhwEZhwEZhwEZhwEZ"
|
||||
+ "hwEZhwEZhwEZhwEZhwEZiAEYiAEYiAEXiQEXiQEXiQEXiQEXiQEXigEWigEWigEWigEWigEWigEW"
|
||||
+ "igEVjAEUjAEUjAEUjQESjgESjwEQkAEQkQEOkgENlAEMlAELlgEKlwEImAEImQEHmQEGmwEFmwEE"
|
||||
+ "nQEDnQECngECngECngECnwEBnwEBnwEBnwEBngEDnQEDnQEDnQEEmwEFmgEHmQEHlwELkQERjAEX"
|
||||
+ "hgEdhAEfgwEchwEWjwEMqTEA");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 32,
|
||||
+ "h58BBrUCD6wCGKQCIJsCKZMCMIwCNoUCPf8BQ/kBSPQBTu0BTu4BTfEBSfUBRfkBQf0BPYECOYUC"
|
||||
+ "NIoCMI4CK+UBAS0W/AEHIweQAgsZBpcCEAwIngIepAIZqQIWrAITsAIRswIOtQIMuAIJuwIHwAIB"
|
||||
+ "ypwB");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 32,
|
||||
+ "wW4DnAEEmwEFmgEHmAEIlwEKlQELlAEMkwEOkQEPkAEQkAERjgESjgESjQEUjAEUiwEWigEWiQEX"
|
||||
+ "iQEYhwEZhwEZhgEbhQEbhAEchAEdggEeggEeggEfgAEggAEggAEhgAEggAEggQEggAEggAEggQEf"
|
||||
+ "gQEggQEfgQEfggEfgQEfgQEfggEfgQEfggEeggEfggEeggEeggEegwEeggEegwEdgwEegwEdgwEd"
|
||||
+ "hAEchAEdhAEchAEchAEdhAEchAEchQEbhQEbhgEahgEahwEZhwEZiAEYiAEYiQEYiAEYiQEXiQEX"
|
||||
+ "igEWigEWiwEViwEVjAEUjAEUjAEUjQETjQETjgESjgETjgESjwERkAEQkgEOkwENlAEMlQELlgEK"
|
||||
+ "lwEJmAEJmAEImQEHmgEGmwEFnAEEnQEEnQEDnQEDngECngEDngECngECnwECngECnwECngECngED"
|
||||
+ "ngECEgGLAQMQAosBAw4EjAEDCwWNAQQJBo0BBQYIjQEHAgqNARKOARKPARCQARCQARCQAQ+RAQ6S"
|
||||
+ "AQ6SAQ2TAQ2SAQ2TAQ2TAQyTAQyUAQyTAQyUAQuVAQuUAQuVAQqWAQmWAQqWAQmXAQiXAQiYAQeY"
|
||||
+ "AQeZAQWbAQSDZwAA");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 32,
|
||||
+ "g90BBLkCCLYCC7ICDrACEa0CFKoCF6cCGqQCHKMCHqECIJ8CIpwCJJsCJpkCKJcCKZYCK5QCLZIC"
|
||||
+ "L5ACMI8CMo0CNIsCNYoCN4gCOYcCOYYCO4QCPYICPoECQIACQYACQIECQIACQIECQIECQIECP4IC"
|
||||
+ "P4ICP4ECP4ICP4ICPoMCPoMCPoMCPYQCPYMCPYQCPYQCPYQCPIUCPIUCPIUCO4YCO4YCOoYCO4YC"
|
||||
+ "OocCOocCOocCOYgCOYgCOIkCOIkCN4oCNosCNYwCNI0CM44CMo4CM44CMo8CMZACMJECL5ICLpMC"
|
||||
+ "LZQCLJUCK5YCK5YCKpcCKZgCKJkCJ5oCJpsCJpsCJZwCJJ4CIqACIKICH6MCHaUCG6cCGakCF6wC"
|
||||
+ "Fa0CE68CEbECD7MCDrQCDLYCCrgCCbkCB7sCBrsCBbwCBbwCBL0CBL0CBL0CBL0CA70CBL0CBL0C"
|
||||
+ "BLwCBSUBlgIFIQSXAgYbCJcCBxcKmQIIEQ6ZAgoMEJoCDQUTnAIknAIjnQIingIhnwIgoAIfoQIe"
|
||||
+ "ogIdowIcpAIbpQIapQIZpgIZpgIZpwIYpwIXqAIXqAIXqQIVqgIVqgIUqwITrQISrQIRrgIQsAIO"
|
||||
+ "sQIMswILtQIIhs4B");
|
||||
+ ok(match, "Figure does not match.\n");
|
||||
+
|
||||
+ hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+ hr = ID2D1PathGeometry_Open(geometry, &sink);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
set_point(&point, -0.402914f, 0.915514f);
|
||||
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
|
||||
quadratic_to(sink, -0.310379f, 0.882571f, -0.116057f, 0.824000f);
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -0,0 +1,279 @@
|
||||
From be0fbef50483da8fe3fd0c4b74469d15a5c9f1ea Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Knechtges <philipp-dev@knechtges.com>
|
||||
Date: Fri, 13 Sep 2024 16:37:31 +0200
|
||||
Subject: [PATCH] d2d1: Implement drawing for ID2D1GeometryGroup
|
||||
|
||||
Drawing of ID2D1GeometryGroup was so far unimplemented and resulted in
|
||||
blank drawing buffers. This partially fixes the rendering issues mentioned
|
||||
in the bug below.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139
|
||||
---
|
||||
dlls/d2d1/geometry.c | 236 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 235 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index 3da3ad2e65b..93925408077 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -5497,8 +5497,13 @@ static const struct ID2D1GeometryGroupVtbl d2d_geometry_group_vtbl =
|
||||
HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, unsigned int geometry_count)
|
||||
{
|
||||
- unsigned int i;
|
||||
+ unsigned int i, j;
|
||||
+ struct d2d_geometry *other_geom;
|
||||
+ D2D_MATRIX_3X2_F g, gplain;
|
||||
+ size_t f_vertex_count, f_face_count, f_bezier_vertex_count, f_arc_vertex_count;
|
||||
+ size_t o_vertex_count, o_face_count, o_bezier_count, o_bezier_face_count, o_arc_count, o_arc_face_count;
|
||||
|
||||
+ FIXME("Ignoring fill_mode=%#x!\n", fill_mode);
|
||||
d2d_geometry_init(geometry, factory, &identity, (ID2D1GeometryVtbl *)&d2d_geometry_group_vtbl);
|
||||
|
||||
if (!(geometry->u.group.src_geometries = calloc(geometry_count, sizeof(*geometries))))
|
||||
@@ -5507,13 +5512,242 @@ HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *fac
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ geometry->fill.vertex_count = 0;
|
||||
+ geometry->fill.face_count = 0;
|
||||
+ geometry->fill.bezier_vertex_count = 0;
|
||||
+ geometry->fill.arc_vertex_count = 0;
|
||||
+ geometry->outline.vertex_count = 0;
|
||||
+ geometry->outline.face_count = 0;
|
||||
+ geometry->outline.bezier_count = 0;
|
||||
+ geometry->outline.bezier_face_count = 0;
|
||||
+ geometry->outline.arc_count = 0;
|
||||
+ geometry->outline.arc_face_count = 0;
|
||||
for (i = 0; i < geometry_count; ++i)
|
||||
{
|
||||
ID2D1Geometry_AddRef(geometry->u.group.src_geometries[i] = geometries[i]);
|
||||
+ other_geom = unsafe_impl_from_ID2D1Geometry(geometries[i]);
|
||||
+ geometry->fill.vertex_count += other_geom->fill.vertex_count;
|
||||
+ geometry->fill.face_count += other_geom->fill.face_count;
|
||||
+ geometry->fill.bezier_vertex_count += other_geom->fill.bezier_vertex_count;
|
||||
+ geometry->fill.arc_vertex_count += other_geom->fill.arc_vertex_count;
|
||||
+ geometry->outline.vertex_count += other_geom->outline.vertex_count;
|
||||
+ geometry->outline.face_count += other_geom->outline.face_count;
|
||||
+ geometry->outline.bezier_count += other_geom->outline.bezier_count;
|
||||
+ geometry->outline.bezier_face_count += other_geom->outline.bezier_face_count;
|
||||
+ geometry->outline.arc_count += other_geom->outline.arc_count;
|
||||
+ geometry->outline.arc_face_count += other_geom->outline.arc_face_count;
|
||||
}
|
||||
geometry->u.group.geometry_count = geometry_count;
|
||||
geometry->u.group.fill_mode = fill_mode;
|
||||
|
||||
+ if (!(geometry->fill.vertices = calloc(geometry->fill.vertex_count, sizeof(D2D1_POINT_2F))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ if (!(geometry->fill.faces = calloc(geometry->fill.face_count, sizeof(struct d2d_face))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->fill.faces_size = geometry->fill.face_count;
|
||||
+ if (!(geometry->fill.bezier_vertices = calloc(geometry->fill.bezier_vertex_count, sizeof(struct d2d_curve_vertex))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->fill.bezier_vertices_size = geometry->fill.bezier_vertex_count;
|
||||
+ if (!(geometry->fill.arc_vertices = calloc(geometry->fill.arc_vertex_count, sizeof(struct d2d_curve_vertex))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->fill.arc_vertices_size = geometry->fill.arc_vertex_count;
|
||||
+ if (!(geometry->outline.vertices = calloc(geometry->outline.vertex_count, sizeof(struct d2d_outline_vertex))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->outline.vertices_size = geometry->outline.vertex_count;
|
||||
+ if (!(geometry->outline.faces = calloc(geometry->outline.face_count, sizeof(struct d2d_face))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->outline.faces_size = geometry->outline.face_count;
|
||||
+ if (!(geometry->outline.beziers = calloc(geometry->outline.bezier_count, sizeof(struct d2d_curve_outline_vertex))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->outline.beziers_size = geometry->outline.bezier_count;
|
||||
+ if (!(geometry->outline.bezier_faces = calloc(geometry->outline.bezier_face_count, sizeof(struct d2d_face))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->outline.bezier_faces_size = geometry->outline.bezier_face_count;
|
||||
+ if (!(geometry->outline.arcs = calloc(geometry->outline.arc_count, sizeof(struct d2d_curve_outline_vertex))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->outline.arcs_size = geometry->outline.arc_count;
|
||||
+ if (!(geometry->outline.arc_faces = calloc(geometry->outline.arc_face_count, sizeof(struct d2d_face))))
|
||||
+ {
|
||||
+ for (i = 0; i < geometry->u.group.geometry_count; ++i)
|
||||
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]);
|
||||
+ d2d_geometry_cleanup(geometry);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+ geometry->outline.arc_faces_size = geometry->outline.arc_face_count;
|
||||
+
|
||||
+ f_vertex_count = 0;
|
||||
+ f_face_count = 0;
|
||||
+ f_bezier_vertex_count = 0;
|
||||
+ f_arc_vertex_count = 0;
|
||||
+ o_vertex_count = 0;
|
||||
+ o_face_count = 0;
|
||||
+ o_bezier_count = 0;
|
||||
+ o_bezier_face_count = 0;
|
||||
+ o_arc_count = 0;
|
||||
+ o_arc_face_count = 0;
|
||||
+ for (i = 0; i < geometry_count; ++i)
|
||||
+ {
|
||||
+ other_geom = unsafe_impl_from_ID2D1Geometry(geometries[i]);
|
||||
+ g = other_geom->transform;
|
||||
+ gplain = g;
|
||||
+ gplain.dx = 0.0f;
|
||||
+ gplain.dy = 0.0f;
|
||||
+
|
||||
+ for (j = 0; j < other_geom->fill.vertex_count; ++j) {
|
||||
+ d2d_point_transform(&geometry->fill.vertices[j+f_vertex_count], &g,
|
||||
+ other_geom->fill.vertices[j].x, other_geom->fill.vertices[j].y);
|
||||
+ }
|
||||
+ for (j = 0; j < other_geom->fill.face_count; ++j) {
|
||||
+ geometry->fill.faces[f_face_count+j].v[0] = other_geom->fill.faces[j].v[0]
|
||||
+ + (UINT16) f_vertex_count;
|
||||
+ geometry->fill.faces[f_face_count+j].v[1] = other_geom->fill.faces[j].v[1]
|
||||
+ + (UINT16) f_vertex_count;
|
||||
+ geometry->fill.faces[f_face_count+j].v[2] = other_geom->fill.faces[j].v[2]
|
||||
+ + (UINT16) f_vertex_count;
|
||||
+ }
|
||||
+ f_vertex_count += other_geom->fill.vertex_count;
|
||||
+ f_face_count += other_geom->fill.face_count;
|
||||
+
|
||||
+ for (j = 0; j < other_geom->fill.bezier_vertex_count; ++j) {
|
||||
+ d2d_point_transform(&geometry->fill.bezier_vertices[j+f_bezier_vertex_count].position,
|
||||
+ &g, other_geom->fill.bezier_vertices[j].position.x,
|
||||
+ other_geom->fill.bezier_vertices[j].position.y);
|
||||
+ geometry->fill.bezier_vertices[j+f_bezier_vertex_count].texcoord
|
||||
+ = other_geom->fill.bezier_vertices[j].texcoord;
|
||||
+ }
|
||||
+ f_bezier_vertex_count += other_geom->fill.bezier_vertex_count;
|
||||
+
|
||||
+ for (j = 0; j < other_geom->fill.arc_vertex_count; ++j) {
|
||||
+ d2d_point_transform(&geometry->fill.arc_vertices[j+f_arc_vertex_count].position,
|
||||
+ &g, other_geom->fill.arc_vertices[j].position.x,
|
||||
+ other_geom->fill.arc_vertices[j].position.y);
|
||||
+ geometry->fill.arc_vertices[j+f_arc_vertex_count].texcoord
|
||||
+ = other_geom->fill.arc_vertices[j].texcoord;
|
||||
+
|
||||
+ }
|
||||
+ f_arc_vertex_count += other_geom->fill.arc_vertex_count;
|
||||
+
|
||||
+ for (j = 0; j < other_geom->outline.vertex_count; ++j) {
|
||||
+ d2d_point_transform(&geometry->outline.vertices[j+o_vertex_count].position, &g,
|
||||
+ other_geom->outline.vertices[j].position.x, other_geom->outline.vertices[j].position.y);
|
||||
+ d2d_point_transform(&geometry->outline.vertices[j+o_vertex_count].prev, &gplain,
|
||||
+ other_geom->outline.vertices[j].prev.x, other_geom->outline.vertices[j].prev.y);
|
||||
+ d2d_point_normalise(&geometry->outline.vertices[j+o_vertex_count].prev);
|
||||
+ d2d_point_transform(&geometry->outline.vertices[j+o_vertex_count].next, &gplain,
|
||||
+ other_geom->outline.vertices[j].next.x, other_geom->outline.vertices[j].next.y);
|
||||
+ d2d_point_normalise(&geometry->outline.vertices[j+o_vertex_count].next);
|
||||
+ }
|
||||
+ for (j = 0; j < other_geom->outline.face_count; ++j) {
|
||||
+ geometry->outline.faces[o_face_count+j].v[0] = other_geom->outline.faces[j].v[0]
|
||||
+ + (UINT16) o_vertex_count;
|
||||
+ geometry->outline.faces[o_face_count+j].v[1] = other_geom->outline.faces[j].v[1]
|
||||
+ + (UINT16) o_vertex_count;
|
||||
+ geometry->outline.faces[o_face_count+j].v[2] = other_geom->outline.faces[j].v[2]
|
||||
+ + (UINT16) o_vertex_count;
|
||||
+ }
|
||||
+ o_vertex_count += other_geom->outline.vertex_count;
|
||||
+ o_face_count += other_geom->outline.face_count;
|
||||
+
|
||||
+ for (j = 0; j < other_geom->outline.bezier_count; ++j) {
|
||||
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].position, &g,
|
||||
+ other_geom->outline.beziers[j].position.x, other_geom->outline.beziers[j].position.y);
|
||||
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].prev, &gplain,
|
||||
+ other_geom->outline.beziers[j].prev.x, other_geom->outline.beziers[j].prev.y);
|
||||
+ d2d_point_normalise(&geometry->outline.beziers[j+o_bezier_count].prev);
|
||||
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].next, &gplain,
|
||||
+ other_geom->outline.beziers[j].next.x, other_geom->outline.beziers[j].next.y);
|
||||
+ d2d_point_normalise(&geometry->outline.beziers[j+o_bezier_count].next);
|
||||
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].p0, &g,
|
||||
+ other_geom->outline.beziers[j].p0.x, other_geom->outline.beziers[j].p0.y);
|
||||
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].p1, &g,
|
||||
+ other_geom->outline.beziers[j].p1.x, other_geom->outline.beziers[j].p1.y);
|
||||
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].p2, &g,
|
||||
+ other_geom->outline.beziers[j].p2.x, other_geom->outline.beziers[j].p2.y);
|
||||
+ }
|
||||
+ for (j = 0; j < other_geom->outline.bezier_face_count; ++j) {
|
||||
+ geometry->outline.bezier_faces[o_bezier_face_count+j].v[0]
|
||||
+ = other_geom->outline.bezier_faces[j].v[0] + (UINT16) o_bezier_count;
|
||||
+ geometry->outline.bezier_faces[o_bezier_face_count+j].v[1]
|
||||
+ = other_geom->outline.bezier_faces[j].v[1] + (UINT16) o_bezier_count;
|
||||
+ geometry->outline.bezier_faces[o_bezier_face_count+j].v[2]
|
||||
+ = other_geom->outline.bezier_faces[j].v[2] + (UINT16) o_bezier_count;
|
||||
+ }
|
||||
+ o_bezier_count += other_geom->outline.bezier_count;
|
||||
+ o_bezier_face_count += other_geom->outline.bezier_face_count;
|
||||
+
|
||||
+ for (j = 0; j < other_geom->outline.arc_count; ++j) {
|
||||
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].position, &g,
|
||||
+ other_geom->outline.arcs[j].position.x, other_geom->outline.arcs[j].position.y);
|
||||
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].prev, &gplain,
|
||||
+ other_geom->outline.arcs[j].prev.x, other_geom->outline.arcs[j].prev.y);
|
||||
+ d2d_point_normalise(&geometry->outline.arcs[j+o_arc_count].prev);
|
||||
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].next, &gplain,
|
||||
+ other_geom->outline.arcs[j].next.x, other_geom->outline.arcs[j].next.y);
|
||||
+ d2d_point_normalise(&geometry->outline.arcs[j+o_arc_count].next);
|
||||
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].p0, &g,
|
||||
+ other_geom->outline.arcs[j].p0.x, other_geom->outline.arcs[j].p0.y);
|
||||
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].p1, &g,
|
||||
+ other_geom->outline.arcs[j].p1.x, other_geom->outline.arcs[j].p1.y);
|
||||
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].p2, &g,
|
||||
+ other_geom->outline.arcs[j].p2.x, other_geom->outline.arcs[j].p2.y);
|
||||
+ }
|
||||
+ for (j = 0; j < other_geom->outline.arc_face_count; ++j) {
|
||||
+ geometry->outline.arc_faces[o_arc_face_count+j].v[0]
|
||||
+ = other_geom->outline.arc_faces[j].v[0] + (UINT16) o_arc_count;
|
||||
+ geometry->outline.arc_faces[o_arc_face_count+j].v[1]
|
||||
+ = other_geom->outline.arc_faces[j].v[1] + (UINT16) o_arc_count;
|
||||
+ geometry->outline.arc_faces[o_arc_face_count+j].v[2]
|
||||
+ = other_geom->outline.arc_faces[j].v[2] + (UINT16) o_arc_count;
|
||||
+ }
|
||||
+ o_arc_count += other_geom->outline.arc_count;
|
||||
+ o_arc_face_count += other_geom->outline.arc_face_count;
|
||||
+ }
|
||||
+
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
3
patches/d2d1_ID2D1GeometryGroup/definition
Normal file
3
patches/d2d1_ID2D1GeometryGroup/definition
Normal file
@@ -0,0 +1,3 @@
|
||||
Fixes: [51139] d2d1: Implement drawing of ID2D1GeometryGroup
|
||||
|
||||
# MR https://gitlab.winehq.org/wine/wine/-/merge_requests/6492
|
@@ -1,32 +0,0 @@
|
||||
From 5d9d9cbdb4043848aa5ebdd8a1349d9c876650e3 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:18:03 +0100
|
||||
Subject: [PATCH] d3dx9_36: Add support for FOURCC surface to
|
||||
save_dds_surface_to_memory.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/surface.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 26809a47e18..db334ee83f1 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -433,6 +433,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Reuse dds_fourcc_to_d3dformat as D3DFORMAT and FOURCC are DWORD with same values */
|
||||
+ if (dds_fourcc_to_d3dformat(d3dformat) != D3DFMT_UNKNOWN)
|
||||
+ {
|
||||
+ pixel_format->flags |= DDS_PF_FOURCC;
|
||||
+ pixel_format->fourcc = d3dformat;
|
||||
+ return D3D_OK;
|
||||
+ }
|
||||
+
|
||||
WARN("Unknown pixel format %#x.\n", d3dformat);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
|
@@ -1,118 +0,0 @@
|
||||
From 96af775034dae1c0b133b315c45b7172090d3498 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
texture to dds file.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_private.h | 2 ++
|
||||
dlls/d3dx9_36/surface.c | 63 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +--
|
||||
3 files changed, 66 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 34a9f6eec7f..878dff3fc01 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -178,6 +178,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write);
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update);
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette);
|
||||
HRESULT d3dx_pixels_init(const void *data, uint32_t row_pitch, uint32_t slice_pitch,
|
||||
const PALETTEENTRY *palette, D3DFORMAT format, uint32_t left, uint32_t top, uint32_t right, uint32_t bottom,
|
||||
uint32_t front, uint32_t back, struct d3dx_pixels *pixels);
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 31bce97bbab..212d452c654 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -574,6 +574,69 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT get_surface(D3DRESOURCETYPE type, struct IDirect3DBaseTexture9 *tex,
|
||||
+ int face, UINT level, struct IDirect3DSurface9 **surf)
|
||||
+{
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case D3DRTYPE_TEXTURE:
|
||||
+ return IDirect3DTexture9_GetSurfaceLevel((IDirect3DTexture9*) tex, level, surf);
|
||||
+ case D3DRTYPE_CUBETEXTURE:
|
||||
+ return IDirect3DCubeTexture9_GetCubeMapSurface((IDirect3DCubeTexture9*) tex, face, level, surf);
|
||||
+ default:
|
||||
+ ERR("Unexpected texture type\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ D3DRESOURCETYPE type;
|
||||
+ UINT mip_levels;
|
||||
+ IDirect3DSurface9 *surface;
|
||||
+
|
||||
+ type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
+
|
||||
+ if ((type != D3DRTYPE_TEXTURE) && (type != D3DRTYPE_CUBETEXTURE) && (type != D3DRTYPE_VOLUMETEXTURE))
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ if (type == D3DRTYPE_CUBETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Cube texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+ else if (type == D3DRTYPE_VOLUMETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Volume texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ mip_levels = IDirect3DTexture9_GetLevelCount(src_texture);
|
||||
+
|
||||
+ if (mip_levels > 1)
|
||||
+ {
|
||||
+ FIXME("Mipmap not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ if (src_palette)
|
||||
+ {
|
||||
+ FIXME("Saving surfaces with palettized pixel formats not implemented yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ hr = get_surface(type, src_texture, D3DCUBEMAP_FACE_POSITIVE_X, 0, &surface);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ hr = save_dds_surface_to_memory(dst_buffer, surface, NULL);
|
||||
+ IDirect3DSurface9_Release(surface);
|
||||
+ }
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data,
|
||||
const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info)
|
||||
{
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index b42c9db3f2d..d84bac25cfe 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1847,10 +1847,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
- {
|
||||
- FIXME("DDS file format isn't supported yet\n");
|
||||
- return E_NOTIMPL;
|
||||
- }
|
||||
+ return save_dds_texture_to_memory(dst_buffer, src_texture, src_palette);
|
||||
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [26898] Support for DDS file format in D3DXSaveTextureToFileInMemory
|
||||
Disabled: True
|
@@ -1,87 +0,0 @@
|
||||
From d258e0c4428f3d5b7c0b6f4b31058d8710244dd7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Wed, 14 Aug 2013 09:31:31 +0200
|
||||
Subject: d3dx9_36: Filter out D3DCompile warning messages that are not present
|
||||
with D3DCompileShader. (try 4)
|
||||
|
||||
This patch fixes vertex processing issue of bug 33770.
|
||||
|
||||
The problem comes from the fact that even if the call succeeds,
|
||||
the game interprets a non null error_messages pointer as an error.
|
||||
|
||||
By calling D3DCompile we use a newer version of the compiler which is more
|
||||
strict and generates the following warning.
|
||||
- warning X3206: 'dot': implicit truncation of vector type
|
||||
- warning X3206: implicit truncation of vector type
|
||||
- warning X3206: 'mul': implicit truncation of vector type
|
||||
D3DCompileShader does not generate such warnings.
|
||||
|
||||
These is confirmed in the DX SDK release note:
|
||||
New Warning X3206: Implicit Truncation of Vector Type
|
||||
Beginning in the August 2009 release of the DirectX SDK, the compiler will warn
|
||||
when an implicit truncation of a vector type occurs.
|
||||
|
||||
The warnings cannot be disable so this patch filters out these strings in D3DCompileShader
|
||||
and reset the error messages pointer if the resulting buffer is empty.
|
||||
|
||||
Try 2:
|
||||
- only filter out lines containing "X3206:" in case d3dcompiler_43 has localization
|
||||
|
||||
Try 3:
|
||||
- use move in place instead of copying the buffer
|
||||
|
||||
Try 4:
|
||||
- filter simplification by Sebastian and remove 'mul' testing left-out in search string
|
||||
---
|
||||
dlls/d3dx9_36/shader.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index 5ea3d13..646d3dc 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -450,6 +450,41 @@ HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Filter out D3DCompile warning messages that are not present with D3DCompileShader */
|
||||
+ if (SUCCEEDED(hr) && error_msgs && *error_msgs)
|
||||
+ {
|
||||
+ char *messages = ID3DXBuffer_GetBufferPointer(*error_msgs);
|
||||
+ DWORD size = ID3DXBuffer_GetBufferSize(*error_msgs);
|
||||
+
|
||||
+ /* Ensure messages are null terminated for safe processing */
|
||||
+ if (size) messages[size - 1] = 0;
|
||||
+
|
||||
+ while (size > 1)
|
||||
+ {
|
||||
+ char *prev, *next;
|
||||
+
|
||||
+ /* Warning has the form "warning X3206: ... implicit truncation of vector type"
|
||||
+ but we only search for "X3206:" in case d3dcompiler_43 has localization */
|
||||
+ prev = next = strstr(messages, "X3206:");
|
||||
+ if (!prev) break;
|
||||
+
|
||||
+ /* get pointer to beginning and end of current line */
|
||||
+ while (prev > messages && *(prev - 1) != '\n') prev--;
|
||||
+ while (next < messages + size - 1 && *next != '\n') next++;
|
||||
+ if (next < messages + size - 1 && *next == '\n') next++;
|
||||
+
|
||||
+ memmove(prev, next, messages + size - next);
|
||||
+ size -= (next - prev);
|
||||
+ }
|
||||
+
|
||||
+ /* Only return a buffer if the resulting string is not empty as some apps depend on that */
|
||||
+ if (size <= 1)
|
||||
+ {
|
||||
+ ID3DXBuffer_Release(*error_msgs);
|
||||
+ *error_msgs = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return hr;
|
||||
}
|
||||
|
||||
--
|
||||
2.1.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [33770] D3DCompileShader should filter specific warning messages
|
@@ -1,182 +0,0 @@
|
||||
From ae80ae124a784078a9838a8aca4b3af308d645dd Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Hibbs <hibbsncc1701@gmail.com>
|
||||
Date: Fri, 30 Sep 2022 17:58:15 -0400
|
||||
Subject: [PATCH] d3dx9: Implement d3dx_effect_SetRawValue
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46012
|
||||
|
||||
Signed-off-by: Patrick Hibbs <hibbsncc1701@gmail.com>
|
||||
---
|
||||
dlls/d3dx9_36/effect.c | 154 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 152 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
|
||||
index ea965ce789b..625af4af36b 100644
|
||||
--- a/dlls/d3dx9_36/effect.c
|
||||
+++ b/dlls/d3dx9_36/effect.c
|
||||
@@ -4445,10 +4445,160 @@ static HRESULT WINAPI d3dx_effect_CloneEffect(ID3DXEffect *iface, IDirect3DDevic
|
||||
static HRESULT WINAPI d3dx_effect_SetRawValue(ID3DXEffect *iface, D3DXHANDLE parameter, const void *data,
|
||||
UINT byte_offset, UINT bytes)
|
||||
{
|
||||
- FIXME("iface %p, parameter %p, data %p, byte_offset %u, bytes %u stub!\n",
|
||||
+ struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
|
||||
+ struct d3dx_parameter *param = (parameter == INVALID_HANDLE_VALUE) ? NULL : get_valid_parameter(effect, parameter);
|
||||
+ const unsigned int single_size = sizeof(DWORD);
|
||||
+ unsigned int x, index_offset, remaining_byte_offset, remaining_bytes;
|
||||
+ void *raw;
|
||||
+
|
||||
+ TRACE("iface %p, parameter %p, data %p, byte_offset %u, bytes %u.\n",
|
||||
iface, parameter, data, byte_offset, bytes);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ /* pendentic */
|
||||
+ index_offset = 0;
|
||||
+ remaining_byte_offset = 0;
|
||||
+
|
||||
+ /* BOOLs and Matries with a single value copy require sanitization of the
|
||||
+ byte_offset.
|
||||
+
|
||||
+ Specificly, matries with a single value copy only allow byte shifts that
|
||||
+ are not multiples of the value (DWORD) size. For multiples, we increment
|
||||
+ the index of the promoted data type, then add any remainder as a byte
|
||||
+ offset.
|
||||
+
|
||||
+ For BOOLs, due to their value sanitization, we only care about the
|
||||
+ index of their promoted data type. Unless it's a non value size matrix.
|
||||
+ In that case we do care about the byte offset.
|
||||
+ */
|
||||
+ if (byte_offset > 0 && (param->type == D3DXPT_BOOL ||
|
||||
+ (param->class == D3DXPC_MATRIX_COLUMNS ||
|
||||
+ param->class == D3DXPC_MATRIX_ROWS)))
|
||||
+ {
|
||||
+ remaining_byte_offset = byte_offset % single_size;
|
||||
+ if (remaining_byte_offset != 0)
|
||||
+ index_offset = byte_offset / single_size;
|
||||
+ else
|
||||
+ index_offset = byte_offset;
|
||||
+ if (param->type != D3DXPT_BOOL || (bytes != single_size &&
|
||||
+ (param->class == D3DXPC_MATRIX_COLUMNS ||
|
||||
+ param->class == D3DXPC_MATRIX_ROWS)))
|
||||
+ {
|
||||
+ index_offset = index_offset * single_size;
|
||||
+ if (param->type != D3DXPT_BOOL)
|
||||
+ index_offset = index_offset * single_size;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* If parameter is bad, we are expected to throw C0000005. */
|
||||
+ switch (param->class)
|
||||
+ {
|
||||
+ case D3DXPC_STRUCT:
|
||||
+ break;
|
||||
+ case D3DXPC_OBJECT:
|
||||
+ raw = param_get_data_and_dirtify(effect, param, param->bytes, TRUE);
|
||||
+ if (data && bytes)
|
||||
+ {
|
||||
+ if (((char*)raw)[0] != '\0')
|
||||
+ {
|
||||
+ memset(raw, '\0', param->bytes);
|
||||
+ return S_OK; /* This returns a false success. */
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+ case D3DXPC_SCALAR:
|
||||
+ raw = param_get_data_and_dirtify(effect, param, param->bytes, TRUE);
|
||||
+ if (param->type == D3DXPT_BOOL)
|
||||
+ *(BOOL*)raw = *(BOOL*)data ? TRUE : FALSE;
|
||||
+ else
|
||||
+ memcpy((unsigned char*)raw + byte_offset, data, bytes);
|
||||
+ return S_OK;
|
||||
+ break;
|
||||
+ case D3DXPC_VECTOR:
|
||||
+ raw = (unsigned char*)param_get_data_and_dirtify(effect, param, param->bytes, TRUE);
|
||||
+ if (param->type == D3DXPT_BOOL)
|
||||
+ {
|
||||
+ raw = (unsigned char*)raw + index_offset;
|
||||
+ *(DWORD*)raw = *(DWORD*)data ? TRUE : FALSE;
|
||||
+ memset((unsigned char*)raw + single_size, \
|
||||
+ '\0', param->bytes - index_offset - single_size);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ raw = (unsigned char*)raw + byte_offset;
|
||||
+ for (x = 0; (x * single_size) + byte_offset < param->bytes && (x * single_size) < bytes; x++)
|
||||
+ {
|
||||
+ memcpy((unsigned char*)raw + (x * single_size), \
|
||||
+ (unsigned char*)data + (x * single_size), \
|
||||
+ single_size);
|
||||
+ }
|
||||
+ }
|
||||
+ return S_OK;
|
||||
+ break;
|
||||
+ case D3DXPC_MATRIX_COLUMNS:
|
||||
+ case D3DXPC_MATRIX_ROWS:
|
||||
+ raw = (unsigned char*)param_get_data_and_dirtify(effect, param, param->bytes, TRUE);
|
||||
+ if (param->type == D3DXPT_BOOL)
|
||||
+ {
|
||||
+ if (bytes == single_size)
|
||||
+ {
|
||||
+ raw = (unsigned char*)raw + index_offset;
|
||||
+ for (x = 0; (x * single_size) < param->bytes - index_offset; x++)
|
||||
+ {
|
||||
+ remaining_bytes = param->bytes - index_offset - \
|
||||
+ (x * single_size) - single_size;
|
||||
+ *(DWORD*)raw = *(DWORD*)data ? TRUE : FALSE;
|
||||
+ memset((unsigned char*)raw + single_size, \
|
||||
+ '\0', (remaining_bytes > (single_size * 4) ? \
|
||||
+ single_size * 4 : remaining_bytes));
|
||||
+ raw = (unsigned char*)raw + (remaining_bytes > (single_size * 4) ? \
|
||||
+ single_size * 4 : remaining_bytes);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ raw = (unsigned char*)raw + index_offset;
|
||||
+ for (x = 0; (x * single_size) < param->bytes - index_offset; x++)
|
||||
+ {
|
||||
+ ((DWORD*)raw)[x] = ((DWORD*)data)[x] ? TRUE : FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (bytes == single_size)
|
||||
+ {
|
||||
+ raw = (unsigned char*)raw + index_offset + remaining_byte_offset;
|
||||
+ for (x = 0; (x * single_size) + byte_offset < param->bytes && (x * single_size) < bytes; x++)
|
||||
+ {
|
||||
+ memcpy((unsigned char*)raw + (x * single_size), \
|
||||
+ (unsigned char*)data + (x * single_size), \
|
||||
+ single_size);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ raw = (unsigned char*)raw + byte_offset;
|
||||
+ for (x = 0; byte_offset + (x * single_size) < param->bytes &&
|
||||
+ (x * single_size) < bytes; x++)
|
||||
+ {
|
||||
+ memcpy((unsigned char*)raw + (x * single_size), \
|
||||
+ (unsigned char*)data + (x * single_size), \
|
||||
+ single_size);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return S_OK;
|
||||
+ break;
|
||||
+ default:
|
||||
+ FIXME("Unhandled param class %s.\n", debug_d3dxparameter_class(param->class));
|
||||
+ break;
|
||||
+ };
|
||||
+
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
}
|
||||
#endif
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
Fixes: [46012] d3d9: Implement ID3DXEffect::SetRawValue
|
||||
|
||||
# https://gitlab.winehq.org/wine/wine/-/merge_requests/979
|
@@ -1,4 +1,4 @@
|
||||
From 6dbedd8d7aebe117b013c61f9549848f13619f0e Mon Sep 17 00:00:00 2001
|
||||
From 6c64a33f908b9fade24fe11d89533a70fdce352f Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 10:44:49 -0500
|
||||
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
|
||||
@@ -12,10 +12,10 @@ Although perhaps we shouldn't since the server doesn't do this.
|
||||
2 files changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 67775f9cd15..c03d4c3688b 100644
|
||||
index eb7f8223b51..388ac14dc8a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -407,6 +407,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -411,6 +411,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
@@ -23,15 +23,15 @@ index 67775f9cd15..c03d4c3688b 100644
|
||||
sys/extattr.h \
|
||||
sys/filio.h \
|
||||
sys/ipc.h \
|
||||
@@ -2067,6 +2068,7 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2079,6 +2080,7 @@ AC_CHECK_FUNCS(\
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
posix_fallocate \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
sched_getcpu \
|
||||
sched_yield \
|
||||
renameat \
|
||||
@@ -2087,6 +2089,12 @@ AC_SEARCH_LIBS(clock_gettime, rt,
|
||||
@@ -2100,6 +2102,12 @@ AC_SEARCH_LIBS(clock_gettime, rt,
|
||||
test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
|
||||
LIBS=$ac_save_LIBS
|
||||
|
||||
@@ -45,10 +45,10 @@ index 67775f9cd15..c03d4c3688b 100644
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
|
||||
diff --git a/include/config.h.in b/include/config.h.in
|
||||
index 1c3d4c4d62b..e9686e04a2a 100644
|
||||
index 6033d8674f3..563b63a92df 100644
|
||||
--- a/include/config.h.in
|
||||
+++ b/include/config.h.in
|
||||
@@ -318,6 +318,9 @@
|
||||
@@ -321,6 +321,9 @@
|
||||
/* Define to 1 if you have the 'posix_fallocate' function. */
|
||||
#undef HAVE_POSIX_FALLOCATE
|
||||
|
||||
@@ -58,7 +58,7 @@ index 1c3d4c4d62b..e9686e04a2a 100644
|
||||
/* Define to 1 if you have the 'prctl' function. */
|
||||
#undef HAVE_PRCTL
|
||||
|
||||
@@ -375,7 +378,10 @@
|
||||
@@ -381,7 +384,10 @@
|
||||
/* Define to 1 if 'interface_id' is a member of 'sg_io_hdr_t'. */
|
||||
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
|
||||
|
||||
@@ -70,7 +70,7 @@ index 1c3d4c4d62b..e9686e04a2a 100644
|
||||
#undef HAVE_SIGINFO_T_SI_FD
|
||||
|
||||
/* Define to 1 if you have the 'sigprocmask' function. */
|
||||
@@ -504,6 +510,9 @@
|
||||
@@ -510,6 +516,9 @@
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#undef HAVE_SYS_EPOLL_H
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9b9b36ccc66866ba142ce1f0d12190025ac2e7f7 Mon Sep 17 00:00:00 2001
|
||||
From da832ae3626406e9aee5f9f78bce01f2a0d49691 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 20:09:59 -0500
|
||||
Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
@@ -9,13 +9,13 @@ Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
server/esync.c | 318 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
server/esync.h | 24 ++++
|
||||
server/main.c | 4 +
|
||||
server/protocol.def | 25 +++-
|
||||
5 files changed, 371 insertions(+), 1 deletion(-)
|
||||
server/protocol.def | 24 ++++
|
||||
5 files changed, 371 insertions(+)
|
||||
create mode 100644 server/esync.c
|
||||
create mode 100644 server/esync.h
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index ae502dbf17d..b164193ef20 100644
|
||||
index 7e571ac2ba6..9632c4e694f 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -11,6 +11,7 @@ SOURCES = \
|
||||
@@ -381,7 +381,7 @@ index 00000000000..00f9e638d83
|
||||
+extern int do_esync(void);
|
||||
+void esync_init(void);
|
||||
diff --git a/server/main.c b/server/main.c
|
||||
index ddda5f4e86e..5062d0999fa 100644
|
||||
index e014ec535ff..052667b4c6b 100644
|
||||
--- a/server/main.c
|
||||
+++ b/server/main.c
|
||||
@@ -34,6 +34,7 @@
|
||||
@@ -401,20 +401,12 @@ index ddda5f4e86e..5062d0999fa 100644
|
||||
+
|
||||
if (debug_level) fprintf( stderr, "wineserver: starting (pid=%ld)\n", (long) getpid() );
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
init_signals();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index e86d3414247..03bc0aeb11e 100644
|
||||
index fa4ca4aaa9e..a9ee996a8ab 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3867,7 +3867,6 @@ struct handle_info
|
||||
obj_handle_t handle; /* process handle */
|
||||
@END
|
||||
|
||||
-
|
||||
/* Iterate thread list for process */
|
||||
@REQ(get_next_thread)
|
||||
obj_handle_t process; /* process handle */
|
||||
@@ -3879,6 +3878,29 @@ struct handle_info
|
||||
@@ -4080,6 +4080,29 @@ struct handle_info
|
||||
obj_handle_t handle; /* next thread handle */
|
||||
@END
|
||||
|
||||
@@ -444,11 +436,11 @@ index e86d3414247..03bc0aeb11e 100644
|
||||
|
||||
/* Setup keyboard auto-repeat */
|
||||
@REQ(set_keyboard_repeat)
|
||||
@@ -3888,3 +3910,4 @@ struct handle_info
|
||||
@@ -4089,3 +4112,4 @@ struct handle_info
|
||||
@REPLY
|
||||
int enable; /* previous state of auto-repeat enable */
|
||||
@END
|
||||
+
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 914fe97f7dc20348ec3e1a2e18bcefa9b7cab463 Mon Sep 17 00:00:00 2001
|
||||
From 16f5ebca082d65ca9abeddb857f30ef58f590ea3 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 18:51:40 -0500
|
||||
Subject: [PATCH] server: Add an object operation to grab the esync file
|
||||
@@ -44,7 +44,7 @@ Split off to decrease patch size.
|
||||
35 files changed, 71 insertions(+)
|
||||
|
||||
diff --git a/server/async.c b/server/async.c
|
||||
index 749c547af4f..2377c737e98 100644
|
||||
index d2d929c9709..9768a4932a6 100644
|
||||
--- a/server/async.c
|
||||
+++ b/server/async.c
|
||||
@@ -78,6 +78,7 @@ static const struct object_ops async_ops =
|
||||
@@ -100,7 +100,7 @@ index 91f159bc7c9..0df7fd2f18e 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/completion.c b/server/completion.c
|
||||
index f9e68c523f1..9093132efac 100644
|
||||
index 99680ae0680..3d750154d1b 100644
|
||||
--- a/server/completion.c
|
||||
+++ b/server/completion.c
|
||||
@@ -92,6 +92,7 @@ static const struct object_ops completion_wait_ops =
|
||||
@@ -120,10 +120,10 @@ index f9e68c523f1..9093132efac 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/console.c b/server/console.c
|
||||
index b64283baf4a..1cc9eea6a50 100644
|
||||
index de6f4e73e31..9bdba479e8c 100644
|
||||
--- a/server/console.c
|
||||
+++ b/server/console.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops console_ops =
|
||||
@@ -84,6 +84,7 @@ static const struct object_ops console_ops =
|
||||
console_add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_signaled, /* signaled */
|
||||
@@ -131,7 +131,7 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_get_fd, /* get_fd */
|
||||
@@ -158,6 +159,7 @@ static const struct object_ops console_server_ops =
|
||||
@@ -161,6 +162,7 @@ static const struct object_ops console_server_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_server_signaled, /* signaled */
|
||||
@@ -139,15 +139,15 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_server_get_fd, /* get_fd */
|
||||
@@ -227,6 +229,7 @@ static const struct object_ops screen_buffer_ops =
|
||||
screen_buffer_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -230,6 +232,7 @@ static const struct object_ops screen_buffer_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
screen_buffer_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
NULL, /* satisfied */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
screen_buffer_get_fd, /* get_fd */
|
||||
@@ -276,6 +279,7 @@ static const struct object_ops console_device_ops =
|
||||
@@ -279,6 +282,7 @@ static const struct object_ops console_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -155,23 +155,23 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -313,6 +317,7 @@ static const struct object_ops console_input_ops =
|
||||
console_input_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -318,6 +322,7 @@ static const struct object_ops console_input_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_input_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_input_get_fd, /* get_fd */
|
||||
@@ -370,6 +375,7 @@ static const struct object_ops console_output_ops =
|
||||
console_output_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -377,6 +382,7 @@ static const struct object_ops console_output_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_output_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_output_get_fd, /* get_fd */
|
||||
@@ -428,6 +434,7 @@ static const struct object_ops console_connection_ops =
|
||||
@@ -435,6 +441,7 @@ static const struct object_ops console_connection_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -180,7 +180,7 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_signal, /* signal */
|
||||
console_connection_get_fd, /* get_fd */
|
||||
diff --git a/server/debugger.c b/server/debugger.c
|
||||
index c59a0abea77..ca04d4c71ce 100644
|
||||
index 39a740e07e5..0c01ec1c0d3 100644
|
||||
--- a/server/debugger.c
|
||||
+++ b/server/debugger.c
|
||||
@@ -86,6 +86,7 @@ static const struct object_ops debug_event_ops =
|
||||
@@ -200,7 +200,7 @@ index c59a0abea77..ca04d4c71ce 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/device.c b/server/device.c
|
||||
index 436dac6bfe9..f730fa81afa 100644
|
||||
index 1f93cca437d..a0608aa6164 100644
|
||||
--- a/server/device.c
|
||||
+++ b/server/device.c
|
||||
@@ -66,6 +66,7 @@ static const struct object_ops irp_call_ops =
|
||||
@@ -236,7 +236,7 @@ index 436dac6bfe9..f730fa81afa 100644
|
||||
no_signal, /* signal */
|
||||
device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/directory.c b/server/directory.c
|
||||
index b37ec969a9e..a6c0e292071 100644
|
||||
index fd689c561bc..2894f7669db 100644
|
||||
--- a/server/directory.c
|
||||
+++ b/server/directory.c
|
||||
@@ -69,6 +69,7 @@ static const struct object_ops object_type_ops =
|
||||
@@ -268,7 +268,7 @@ index 6a63c0dd5e9..f95dc5a391f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/event.c b/server/event.c
|
||||
index f1b79b1b35e..c727bfdd1ba 100644
|
||||
index ad7c09acc99..16cea16e9c2 100644
|
||||
--- a/server/event.c
|
||||
+++ b/server/event.c
|
||||
@@ -72,6 +72,7 @@ static const struct object_ops event_ops =
|
||||
@@ -288,7 +288,7 @@ index f1b79b1b35e..c727bfdd1ba 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 16328063df6..4ce78db5b33 100644
|
||||
index dde92beb664..b0c28e54360 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -172,6 +172,7 @@ static const struct object_ops fd_ops =
|
||||
@@ -336,7 +336,7 @@ index 2a839968c25..cbef0c63383 100644
|
||||
no_signal, /* signal */
|
||||
file_get_fd, /* get_fd */
|
||||
diff --git a/server/handle.c b/server/handle.c
|
||||
index e65831b3b22..e6c5707556f 100644
|
||||
index 8968df73647..3d36af360c2 100644
|
||||
--- a/server/handle.c
|
||||
+++ b/server/handle.c
|
||||
@@ -126,6 +126,7 @@ static const struct object_ops handle_table_ops =
|
||||
@@ -348,7 +348,7 @@ index e65831b3b22..e6c5707556f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/hook.c b/server/hook.c
|
||||
index c2d2823cd61..ab4d0e9dd31 100644
|
||||
index ffe7206369e..921aa8aba2e 100644
|
||||
--- a/server/hook.c
|
||||
+++ b/server/hook.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops hook_table_ops =
|
||||
@@ -360,7 +360,7 @@ index c2d2823cd61..ab4d0e9dd31 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/mailslot.c b/server/mailslot.c
|
||||
index 61eceec94e2..92fe938d3b9 100644
|
||||
index c54281c2101..e4c24459f22 100644
|
||||
--- a/server/mailslot.c
|
||||
+++ b/server/mailslot.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops mailslot_ops =
|
||||
@@ -396,7 +396,7 @@ index 61eceec94e2..92fe938d3b9 100644
|
||||
no_signal, /* signal */
|
||||
mailslot_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index 2bf45780375..b84bb08a77b 100644
|
||||
index 247b28cf6f5..d8498b65054 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -67,6 +67,7 @@ static const struct object_ops ranges_ops =
|
||||
@@ -436,7 +436,7 @@ index af0efe72132..4785a830e92 100644
|
||||
mutex_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index dd8c14b30a9..5880b601d3a 100644
|
||||
index 6e4ae371a1b..0eebd68abe6 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -119,6 +119,7 @@ static const struct object_ops named_pipe_ops =
|
||||
@@ -480,7 +480,7 @@ index dd8c14b30a9..5880b601d3a 100644
|
||||
no_signal, /* signal */
|
||||
named_pipe_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/object.c b/server/object.c
|
||||
index b1665fb5372..0a4d1bede06 100644
|
||||
index cd368ef724a..4d8fcc5a774 100644
|
||||
--- a/server/object.c
|
||||
+++ b/server/object.c
|
||||
@@ -108,6 +108,7 @@ static const struct object_ops apc_reserve_ops =
|
||||
@@ -500,7 +500,7 @@ index b1665fb5372..0a4d1bede06 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/object.h b/server/object.h
|
||||
index 6222e3352ed..0a65d0e3892 100644
|
||||
index 1058f9bfb0a..4acf6f03572 100644
|
||||
--- a/server/object.h
|
||||
+++ b/server/object.h
|
||||
@@ -78,6 +78,8 @@ struct object_ops
|
||||
@@ -513,7 +513,7 @@ index 6222e3352ed..0a65d0e3892 100644
|
||||
void (*satisfied)(struct object *,struct wait_queue_entry *);
|
||||
/* signal an object */
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 49f5c75005f..dc83a089655 100644
|
||||
index b161e3394ba..b3676936317 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -105,6 +105,7 @@ static const struct object_ops process_ops =
|
||||
@@ -541,7 +541,7 @@ index 49f5c75005f..dc83a089655 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 984d466b66e..8a95055db40 100644
|
||||
index 2d23fb0def8..19486a745be 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -165,6 +165,7 @@ static const struct object_ops msg_queue_ops =
|
||||
@@ -561,7 +561,7 @@ index 984d466b66e..8a95055db40 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index cc9a33fff1d..c19e92c9750 100644
|
||||
index c60c737feff..34c422dcc6f 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -180,6 +180,7 @@ static const struct object_ops key_ops =
|
||||
@@ -573,10 +573,10 @@ index cc9a33fff1d..c19e92c9750 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/request.c b/server/request.c
|
||||
index dabcea68309..832a33917b4 100644
|
||||
index 2254315b79e..f4f5e713935 100644
|
||||
--- a/server/request.c
|
||||
+++ b/server/request.c
|
||||
@@ -90,6 +90,7 @@ static const struct object_ops master_socket_ops =
|
||||
@@ -89,6 +89,7 @@ static const struct object_ops master_socket_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -621,10 +621,10 @@ index 19b76d44c16..55cd6aa037e 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index d2ec882554f..44a4e3b7b15 100644
|
||||
index e064f867ff4..e9e81d9ecd0 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -471,6 +471,7 @@ static const struct object_ops sock_ops =
|
||||
@@ -486,6 +486,7 @@ static const struct object_ops sock_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -632,7 +632,7 @@ index d2ec882554f..44a4e3b7b15 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
sock_get_fd, /* get_fd */
|
||||
@@ -3599,6 +3600,7 @@ static const struct object_ops ifchange_ops =
|
||||
@@ -3695,6 +3696,7 @@ static const struct object_ops ifchange_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -640,7 +640,7 @@ index d2ec882554f..44a4e3b7b15 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
ifchange_get_fd, /* get_fd */
|
||||
@@ -3820,6 +3822,7 @@ static const struct object_ops socket_device_ops =
|
||||
@@ -3916,6 +3918,7 @@ static const struct object_ops socket_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -649,7 +649,7 @@ index d2ec882554f..44a4e3b7b15 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/symlink.c b/server/symlink.c
|
||||
index dd28efd3a75..c7f34412317 100644
|
||||
index 74b60162c01..2dd9c6a798d 100644
|
||||
--- a/server/symlink.c
|
||||
+++ b/server/symlink.c
|
||||
@@ -71,6 +71,7 @@ static const struct object_ops symlink_ops =
|
||||
@@ -661,10 +661,10 @@ index dd28efd3a75..c7f34412317 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 506adfc0a6f..339cdfec1fa 100644
|
||||
index c7d1c6c55c8..ac000826599 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -96,6 +96,7 @@ static const struct object_ops thread_apc_ops =
|
||||
@@ -106,6 +106,7 @@ static const struct object_ops thread_apc_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_apc_signaled, /* signaled */
|
||||
@@ -672,7 +672,7 @@ index 506adfc0a6f..339cdfec1fa 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -138,6 +139,7 @@ static const struct object_ops context_ops =
|
||||
@@ -148,6 +149,7 @@ static const struct object_ops context_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
context_signaled, /* signaled */
|
||||
@@ -680,7 +680,7 @@ index 506adfc0a6f..339cdfec1fa 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -187,6 +189,7 @@ static const struct object_ops thread_ops =
|
||||
@@ -197,6 +199,7 @@ static const struct object_ops thread_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_signaled, /* signaled */
|
||||
@@ -689,7 +689,7 @@ index 506adfc0a6f..339cdfec1fa 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/timer.c b/server/timer.c
|
||||
index 96dc9d00ca1..f59902d5607 100644
|
||||
index b0b6ec81535..883f30fa97e 100644
|
||||
--- a/server/timer.c
|
||||
+++ b/server/timer.c
|
||||
@@ -76,6 +76,7 @@ static const struct object_ops timer_ops =
|
||||
@@ -701,7 +701,7 @@ index 96dc9d00ca1..f59902d5607 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 48ee1eca8fe..479596bdbfa 100644
|
||||
index 7e20c670a16..b638ed192cb 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -145,6 +145,7 @@ static const struct object_ops token_ops =
|
||||
@@ -713,7 +713,7 @@ index 48ee1eca8fe..479596bdbfa 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/window.c b/server/window.c
|
||||
index 412592fbc71..94a70ce890f 100644
|
||||
index f7f9d5e517f..8c416d8c88f 100644
|
||||
--- a/server/window.c
|
||||
+++ b/server/window.c
|
||||
@@ -107,6 +107,7 @@ static const struct object_ops window_ops =
|
||||
@@ -725,7 +725,7 @@ index 412592fbc71..94a70ce890f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/winstation.c b/server/winstation.c
|
||||
index e5f4bfec357..50fe34aa9ce 100644
|
||||
index b3746090ccf..126b70d625a 100644
|
||||
--- a/server/winstation.c
|
||||
+++ b/server/winstation.c
|
||||
@@ -76,6 +76,7 @@ static const struct object_ops winstation_ops =
|
||||
@@ -745,5 +745,5 @@ index e5f4bfec357..50fe34aa9ce 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
Fixes: [36692] Many multi-threaded applications have poor performance due to heavy use of synchronization primitives
|
||||
Depends: server-Realtime_Priority
|
||||
Depends: ntdll-Junction_Points
|
||||
Depends: server-PeekMessage
|
||||
Depends: server-Signal_Thread
|
||||
|
@@ -0,0 +1,24 @@
|
||||
From 252a1d6bb99c83ce8a0289fbd1f4fe135e2c55cd Mon Sep 17 00:00:00 2001
|
||||
From: Torge Matthies <tmatthies@codeweavers.com>
|
||||
Date: Fri, 25 Oct 2024 13:19:02 +0200
|
||||
Subject: [PATCH] include: Add MFNETSOURCE_STATISTICS_SERVICE definition.
|
||||
|
||||
---
|
||||
include/mfidl.idl | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 666af53c6e3..a8c5af05e68 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -1626,6 +1626,7 @@ cpp_quote("EXTERN_GUID(MR_STREAM_VOLUME_SERVICE, 0xf8b5fa2f, 0x32ef, 0x46f5, 0xb
|
||||
cpp_quote("EXTERN_GUID(MR_AUDIO_POLICY_SERVICE, 0x911fd737, 0x6775, 0x4ab0, 0xa6, 0x14, 0x29, 0x78, 0x62, 0xfd, 0xac, 0x88);")
|
||||
cpp_quote("EXTERN_GUID(MF_PROPERTY_HANDLER_SERVICE, 0xa3face02, 0x32b8, 0x41dd, 0x90, 0xe7, 0x5f, 0xef, 0x7c, 0x89, 0x91, 0xb5);")
|
||||
cpp_quote("EXTERN_GUID(MF_WORKQUEUE_SERVICES, 0x8e37d489, 0x41e0, 0x413a, 0x90, 0x68, 0x28, 0x7c, 0x88, 0x6d, 0x8d, 0xda);")
|
||||
+cpp_quote("EXTERN_GUID(MFNETSOURCE_STATISTICS_SERVICE, 0x3cb1f275, 0x0505, 0x4c5d, 0xae, 0x71, 0x0a, 0x55, 0x63, 0x44, 0xef, 0xa1);")
|
||||
|
||||
cpp_quote("EXTERN_GUID(MF_PROGRESSIVE_CODING_CONTENT, 0x8f020eea, 0x1508, 0x471f, 0x9d, 0xa6, 0x50, 0x7d, 0x7c, 0xfa, 0x40, 0xdb);")
|
||||
cpp_quote("EXTERN_GUID(MF_NALU_LENGTH_SET, 0xa7911d53, 0x12a4, 0x4965, 0xae, 0x70, 0x6e, 0xad, 0xd6, 0xff, 0x05, 0x51);")
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -0,0 +1,383 @@
|
||||
From 0d4a7cf6b9bb3a57a098762113ca1750c43a810e Mon Sep 17 00:00:00 2001
|
||||
From: Torge Matthies <tmatthies@codeweavers.com>
|
||||
Date: Fri, 25 Oct 2024 10:47:30 +0200
|
||||
Subject: [PATCH] mf/tests: Add network bytestream tests.
|
||||
|
||||
---
|
||||
dlls/mf/tests/mf.c | 347 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 347 insertions(+)
|
||||
|
||||
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
|
||||
index d0f1f1cf0a4..61daaf35741 100644
|
||||
--- a/dlls/mf/tests/mf.c
|
||||
+++ b/dlls/mf/tests/mf.c
|
||||
@@ -4726,6 +4726,7 @@ static void test_evr(void)
|
||||
|
||||
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ if (!sink) return;
|
||||
|
||||
check_interface(sink, &IID_IMFMediaSinkPreroll, TRUE);
|
||||
check_interface(sink, &IID_IMFVideoRenderer, TRUE);
|
||||
@@ -6803,6 +6804,351 @@ static void test_media_session_Close(void)
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
}
|
||||
|
||||
+static void test_network_bytestream(void)
|
||||
+{
|
||||
+ static const WCHAR *URL = L"http://test.winehq.org/tests/test.mp3";
|
||||
+ static const WCHAR *EFFECTIVE_URL = L"http://test.winehq.org:80/tests/test.mp3";
|
||||
+ static const WCHAR *CONTENT_TYPE = L"audio/mpeg";
|
||||
+ static const BYTE LAST_MODIFIED_TIME[] = { 0x00, 0x3b, 0x4b, 0xbf, 0x05, 0x80, 0xd8, 0x01 };
|
||||
+
|
||||
+ IMFSourceResolver *resolver;
|
||||
+ IUnknown *object = NULL, *bs = NULL;
|
||||
+ MF_OBJECT_TYPE obj_type;
|
||||
+ HRESULT hr;
|
||||
+ void *ptr;
|
||||
+
|
||||
+ hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
|
||||
+ ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
|
||||
+
|
||||
+ hr = MFCreateSourceResolver(&resolver);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
+ if (object) IUnknown_Release(object);
|
||||
+
|
||||
+ obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
+ object = NULL;
|
||||
+ hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://nonexistent.url/file.mp4", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
|
||||
+ todo_wine
|
||||
+ ok(hr == NS_E_SERVER_NOT_FOUND, "Got hr %#lx.\n", hr);
|
||||
+ ok(obj_type == MF_OBJECT_INVALID, "Unexpected obj_type %#x.\n", obj_type);
|
||||
+ if (object) IUnknown_Release(object);
|
||||
+
|
||||
+ obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
+ object = NULL;
|
||||
+ hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
|
||||
+ todo_wine
|
||||
+ ok(hr == NS_E_FILE_NOT_FOUND, "Got hr %#lx.\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(obj_type == MF_OBJECT_INVALID, "Unexpected obj_type %#x.\n", obj_type);
|
||||
+ if (object) IUnknown_Release(object);
|
||||
+
|
||||
+ obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
+ object = NULL;
|
||||
+ hr = IMFSourceResolver_CreateObjectFromURL(resolver, URL, MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ ok(obj_type == MF_OBJECT_BYTESTREAM, "Unexpected obj_type %#x.\n", obj_type);
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = IUnknown_QueryInterface(object, &IID_IMFAttributes, &ptr);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
+ if (SUCCEEDED(hr) && ptr)
|
||||
+ {
|
||||
+ IMFAttributes *attr = ptr;
|
||||
+ UINT32 count = 0;
|
||||
+ PROPVARIANT var;
|
||||
+ GUID key = {0};
|
||||
+
|
||||
+ hr = IMFAttributes_GetCount(attr, &count);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 3, "count = %u\n", count);
|
||||
+
|
||||
+ PropVariantInit(&var);
|
||||
+
|
||||
+ hr = IMFAttributes_GetItemByIndex(attr, 0, &key, &var);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+ ok(IsEqualGUID(&key, &MF_BYTESTREAM_EFFECTIVE_URL), "Got key %s\n", debugstr_guid(&key));
|
||||
+ ok(var.vt == VT_LPWSTR, "Got type %d\n", var.vt);
|
||||
+ todo_wine
|
||||
+ ok(!lstrcmpW(var.pwszVal, EFFECTIVE_URL), "Got value %s\n", var.pszVal);
|
||||
+ memset(&key, 0, sizeof(key));
|
||||
+ PropVariantClear(&var);
|
||||
+
|
||||
+ hr = IMFAttributes_GetItemByIndex(attr, 1, &key, &var);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+ ok(IsEqualGUID(&key, &MF_BYTESTREAM_CONTENT_TYPE), "Got key %s\n", debugstr_guid(&key));
|
||||
+ ok(var.vt == VT_LPWSTR, "Got type %d\n", var.vt);
|
||||
+ todo_wine
|
||||
+ ok(!lstrcmpW(var.pwszVal, CONTENT_TYPE), "Got value %s\n", var.pszVal);
|
||||
+ memset(&key, 0, sizeof(key));
|
||||
+ PropVariantClear(&var);
|
||||
+
|
||||
+ hr = IMFAttributes_GetItemByIndex(attr, 2, &key, &var);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(IsEqualGUID(&key, &MF_BYTESTREAM_LAST_MODIFIED_TIME), "Got key %s\n", debugstr_guid(&key));
|
||||
+ todo_wine
|
||||
+ ok(var.vt == (VT_VECTOR | VT_I1 | VT_NULL), "Got type %d\n", var.vt);
|
||||
+ todo_wine
|
||||
+ ok(var.blob.cbSize == sizeof(LAST_MODIFIED_TIME), "Got size %lu\n", var.blob.cbSize);
|
||||
+ todo_wine
|
||||
+ ok(var.blob.pBlobData != NULL, "Got NULL value\n");
|
||||
+ if (var.blob.cbSize == sizeof(LAST_MODIFIED_TIME) && var.blob.pBlobData)
|
||||
+ ok(!memcmp(var.blob.pBlobData, LAST_MODIFIED_TIME, sizeof(LAST_MODIFIED_TIME)), "Got wrong value\n");
|
||||
+ memset(&key, 0, sizeof(key));
|
||||
+ PropVariantClear(&var);
|
||||
+
|
||||
+ hr = IMFAttributes_GetItemByIndex(attr, 3, &key, &var);
|
||||
+ ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
+ ok(IsEqualGUID(&key, &GUID_NULL), "Got key %s\n", debugstr_guid(&key));
|
||||
+ ok(var.vt == VT_EMPTY, "Got type %d\n", var.vt);
|
||||
+ memset(&key, 0, sizeof(key));
|
||||
+ PropVariantClear(&var);
|
||||
+
|
||||
+ IUnknown_Release((IUnknown *)ptr);
|
||||
+ }
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamCacheControl, &ptr);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
+ if (SUCCEEDED(hr) && ptr)
|
||||
+ {
|
||||
+ IMFByteStreamCacheControl *ctrl = ptr;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = IMFByteStreamCacheControl_StopBackgroundTransfer(ctrl);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ IMFByteStreamCacheControl_Release(ctrl);
|
||||
+ }
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamBuffering, &ptr);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
+ if (SUCCEEDED(hr) && ptr)
|
||||
+ {
|
||||
+ MFBYTESTREAM_BUFFERING_PARAMS params = {0};
|
||||
+ IMFByteStreamBuffering *buffering = ptr;
|
||||
+ MF_LEAKY_BUCKET_PAIR bucket = {0};
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = IMFByteStreamBuffering_StopBuffering(buffering);
|
||||
+ ok(hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamBuffering_EnableBuffering(buffering, FALSE);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamBuffering_EnableBuffering(buffering, TRUE);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamBuffering_StopBuffering(buffering);
|
||||
+ ok(hr == S_OK || hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamBuffering_SetBufferingParams(buffering, NULL);
|
||||
+ ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ params.cbTotalFileSize = -1;
|
||||
+ params.cbPlayableDataSize = -1;
|
||||
+ params.prgBuckets = NULL;
|
||||
+ params.cBuckets = 0;
|
||||
+ params.qwNetBufferingTime = 0;
|
||||
+ params.qwExtraBufferingTimeDuringSeek = 0;
|
||||
+ params.qwPlayDuration = 0;
|
||||
+ params.dRate = 1.0f;
|
||||
+ hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ params.cBuckets = 1;
|
||||
+ hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
+ ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ params.prgBuckets = &bucket;
|
||||
+ bucket.dwBitrate = 0;
|
||||
+ bucket.msBufferWindow = 0;
|
||||
+ hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ params.cbTotalFileSize = 0xdeadbeef;
|
||||
+ params.cbPlayableDataSize = 0xdeadbeef;
|
||||
+ bucket.dwBitrate = 0xdeadbeef;
|
||||
+ bucket.msBufferWindow = 0xdeadbeef;
|
||||
+ params.qwNetBufferingTime = 0xdeadbeef;
|
||||
+ params.qwExtraBufferingTimeDuringSeek = 0xdeadbeef;
|
||||
+ params.qwPlayDuration = 0xdeadbeef;
|
||||
+ params.dRate = 12345.0f;
|
||||
+ hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamBuffering_EnableBuffering(buffering, TRUE);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ IMFByteStreamBuffering_Release(buffering);
|
||||
+ }
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamTimeSeek, &ptr);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
+ if (SUCCEEDED(hr) && ptr)
|
||||
+ {
|
||||
+ QWORD start_time = 0xdeadbeef, stop_time = 0xdeadbef0, duration = 0xdeadbef1;
|
||||
+ IMFByteStreamTimeSeek *seek = ptr;
|
||||
+ BOOL b = 0xdeadbeef;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = IMFByteStreamTimeSeek_GetTimeSeekResult(seek, NULL, NULL, NULL);
|
||||
+ ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamTimeSeek_GetTimeSeekResult(seek, &start_time, &stop_time, &duration);
|
||||
+ ok(hr == MF_E_INVALIDREQUEST, "Got hr %#lx\n", hr);
|
||||
+ ok(start_time == 0, "start_time = %I64u\n", start_time);
|
||||
+ ok(stop_time == 0, "stop_time = %I64u\n", stop_time);
|
||||
+ ok(duration == 0, "duration = %I64u\n", duration);
|
||||
+
|
||||
+ hr = IMFByteStreamTimeSeek_IsTimeSeekSupported(seek, NULL);
|
||||
+ ok(hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamTimeSeek_IsTimeSeekSupported(seek, &b);
|
||||
+ ok(hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
+ ok(!b, "supported = %x\n", b);
|
||||
+
|
||||
+ hr = IMFByteStreamTimeSeek_TimeSeek(seek, 0);
|
||||
+ ok(hr == MF_E_INVALIDREQUEST, "Got hr %#lx\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStreamTimeSeek_GetTimeSeekResult(seek, &start_time, &stop_time, &duration);
|
||||
+ ok(hr == MF_E_INVALIDREQUEST, "Got hr %#lx\n", hr);
|
||||
+ ok(start_time == 0, "start_time = %I64u\n", start_time);
|
||||
+ ok(stop_time == 0, "stop_time = %I64u\n", stop_time);
|
||||
+ ok(duration == 0, "duration = %I64u\n", duration);
|
||||
+
|
||||
+ IMFByteStreamTimeSeek_Release(seek);
|
||||
+ }
|
||||
+
|
||||
+ {
|
||||
+ BYTE *tmp = malloc(8192);
|
||||
+ ULONG read = 0, written = 0;
|
||||
+ QWORD len = 0;
|
||||
+
|
||||
+ hr = IMFByteStream_SetLength((IMFByteStream*)object, 1000);
|
||||
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStream_SetCurrentPosition((IMFByteStream*)object, 1000);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStream_Read((IMFByteStream*)object, tmp, 8192, &read);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ ok(read == 3365, "read = %lu\n", read);
|
||||
+
|
||||
+ hr = IMFByteStream_SetCurrentPosition((IMFByteStream*)object, 1000);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+
|
||||
+ hr = IMFByteStream_Write((IMFByteStream*)object, tmp, 1000, &written);
|
||||
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
|
||||
+ ok(written == 0, "written = %lu\n", written);
|
||||
+
|
||||
+ free(tmp);
|
||||
+
|
||||
+ hr = IMFByteStream_GetLength((IMFByteStream*)object, &len);
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+ ok(len != 0, "len = %I64u\n", len);
|
||||
+
|
||||
+ hr = IMFByteStream_Flush((IMFByteStream*)object);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
+ }
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = MFGetService(object, &MFNETSOURCE_STATISTICS_SERVICE, &IID_IPropertyStore, &ptr);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
+ if (SUCCEEDED(hr) && ptr)
|
||||
+ {
|
||||
+ IPropertyStore *pstore = ptr;
|
||||
+ DWORD count = 0;
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = IUnknown_QueryInterface(object, &IID_IPropertyStore, &ptr);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ ok(ptr == (void *)pstore, "Got different IPropertyStore: %p != %p.\n", ptr, pstore);
|
||||
+ IPropertyStore_Release((IPropertyStore *)ptr);
|
||||
+
|
||||
+ hr = IPropertyStore_GetCount(pstore, &count);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ ok(count == 0, "Got count %lu.\n", count);
|
||||
+
|
||||
+ IPropertyStore_Release(pstore);
|
||||
+ }
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ hr = IUnknown_QueryInterface(object, &IID_IMFMediaEventGenerator, &ptr);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
+ if (SUCCEEDED(hr) && ptr)
|
||||
+ {
|
||||
+ IMFMediaEvent *evt = (void *)(DWORD_PTR)0xdeadbeef;
|
||||
+ BOOL seen_caps_changed = FALSE, buffering = FALSE;
|
||||
+ IMFMediaEventGenerator *gen = ptr;
|
||||
+ MediaEventType type;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ while (SUCCEEDED(hr = IMFMediaEventGenerator_GetEvent(gen, MF_EVENT_FLAG_NO_WAIT, &evt)))
|
||||
+ {
|
||||
+ type = (MediaEventType)0xdeadbeef;
|
||||
+ hr = IMFMediaEvent_GetType(evt, &type);
|
||||
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
+
|
||||
+ if (type == MEByteStreamCharacteristicsChanged)
|
||||
+ {
|
||||
+ ok(!seen_caps_changed, "got multiple MEByteStreamCharacteristicsChanged events\n");
|
||||
+ seen_caps_changed = TRUE;
|
||||
+ }
|
||||
+ else if (type == MEBufferingStarted)
|
||||
+ {
|
||||
+ ok(!buffering, "got MEBufferingStopped without MEBufferingStarted\n");
|
||||
+ buffering = TRUE;
|
||||
+ }
|
||||
+ else if (type == MEBufferingStopped)
|
||||
+ buffering = FALSE;
|
||||
+ else
|
||||
+ ok(0, "Unexpected event type %#lx\n", type);
|
||||
+
|
||||
+ IMFMediaEvent_Release(evt);
|
||||
+ }
|
||||
+ ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Got hr %#lx.\n", hr);
|
||||
+
|
||||
+ IMFMediaEventGenerator_Release(gen);
|
||||
+ }
|
||||
+
|
||||
+ obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
+ bs = NULL;
|
||||
+ hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, (void *)object, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, &obj_type, &bs);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ ok(obj_type == MF_OBJECT_MEDIASOURCE, "Unexpected obj_type %#x.\n", obj_type);
|
||||
+
|
||||
+ if (bs) IUnknown_Release(bs);
|
||||
+ if (object) IUnknown_Release(object);
|
||||
+
|
||||
+ IMFSourceResolver_Release(resolver);
|
||||
+
|
||||
+ hr = MFShutdown();
|
||||
+ ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr);
|
||||
+}
|
||||
+
|
||||
START_TEST(mf)
|
||||
{
|
||||
init_functions();
|
||||
@@ -6838,5 +7184,6 @@ START_TEST(mf)
|
||||
test_media_session_Start();
|
||||
test_MFEnumDeviceSources();
|
||||
test_media_session_Close();
|
||||
+ test_network_bytestream();
|
||||
test_media_session_source_shutdown();
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user