Giovanni Mascellani
06482e324c
d2d1: Compile vertex shaders with D3DCompile().
2024-02-06 22:56:42 +01:00
Brendan McGrath
1e79217fb0
d2d1: Fix double free bug when d2d_geometry_sink_Close fails.
...
geometry->fill.bezier_vertices was being freed on the failed path in
d2d_geometry_sink_Close and then again when the path geometry was
released (in d2d_geometry_cleanup).
By setting it to NULL after freeing it initially, all other calls
to free it are a no-op.
2024-01-26 10:59:42 +01:00
Brendan McGrath
6d8489a0bb
d2d1: Use 24-bit FP precision for triangulate.
...
This fixes a rendering issue (and ultimately a crash) in PowerPoint when
compiling with GCC 8.
GCC8 doesn't support the `excess-precision=standard` option under the
`#pragma GCC optimize` directive.
This results in unpredictable floating point rounding leading to errors
when inserting segments (with missing edges and/or triangles).
Using 24-bit precision ensures we don't have any excess precision.
2024-01-26 10:59:40 +01:00
Nikolay Sivov
d46021bab9
d2d1/effect: Recreate transform graph when input count changes.
2024-01-22 10:14:54 +01:00
Nikolay Sivov
1671031143
d2d1/effect: Use XML description for builtin effects.
2024-01-22 10:14:53 +01:00
Nikolay Sivov
9b32b18b08
d2d1/effect: Handle variable input count attributes in the description.
2024-01-22 10:14:51 +01:00
Nikolay Sivov
69870ee88b
d2d1/tests: Add some tests for minimum/maximum input count in effect description.
2024-01-22 10:14:51 +01:00
Brendan McGrath
72590048b2
d2d1: Acquire lock before attempt to draw to device context.
...
Ensures the Direct 2D lock is held before attempting to access Direct 2D
exclusive resources.
This fixes periodic crashes in PowerPoint 365
2023-11-29 20:45:23 +01:00
Brendan McGrath
e6954d793b
d2d1: Add test for singlethreaded draw.
...
Tests that Direct2D can access D2D exclusive resources whilst the
Direct 2D lock is held if the factory type is single threaded
2023-11-29 20:45:21 +01:00
Brendan McGrath
de9eeba7bd
d2d1: Add test for multithreaded draw.
...
Tests that Direct2D can not access D2D exclusive resources whilst the
Direct 2D lock is held
2023-11-29 20:45:20 +01:00
Alexandre Julliard
acad49573a
makefiles: Always use the global SOURCES variable for .c files.
2023-11-01 22:44:03 +01:00
Alexandre Julliard
7ccb5df0fc
makefiles: Always use the global SOURCES variable for .rc files.
2023-11-01 22:43:56 +01:00
Jacek Caban
6239db72ed
d2d1: Don't cast D2D1_THREADING_MODE to D2D1_FACTORY_TYPE in D2D1CreateDevice.
2023-10-20 19:24:08 +02:00
Jacek Caban
f319d4ce8e
d2d1: Pass interpolation mode as D2D1_INTERPOLATION_MODE to d2d_device_context_draw_bitmap.
2023-10-20 19:24:08 +02:00
Jacek Caban
a07fbb9307
d2d1/tests: Use D2D1_INTERPOLATION_MODE constants in DrawImage calls.
2023-10-20 19:24:08 +02:00
Andrew Brobston
54b875c08e
d2d1: Support GUID_WICPixelFormat32bppRGB.
...
Needed by PowerFritz 18.
2023-09-26 21:20:06 +02:00
Dmitry Timoshkov
6dd11426e0
d2d1: Scale stroke width for D2D1_STROKE_TRANSFORM_TYPE_FIXED in DrawGeometry::ID2D1DeviceContext1().
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2023-09-12 20:11:31 +02:00
Jeff Smith
7febd8db5d
d2d1/tests: Use compare_uint() in compare_float() instead of abs().
...
The result of abs(INT_MIN) is INT_MIN, which breaks the ulps comparison.
2023-08-08 12:00:01 +09:00
Nikolay Sivov
e0ab89b856
d2d1: Keep effect shader objects at device level.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-03 20:42:27 +09:00
Nikolay Sivov
9e4ee3e4e0
d2d1: Use device instance pointer in device context structure.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-03 20:42:27 +09:00
Nikolay Sivov
cf2e1db7b5
d2d1/tests: Add some more tests for effect shader loading.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-03 20:42:27 +09:00
Alistair Leslie-Hughes
85a88076f8
d2d1: Remove DECLSPEC_HIDDEN usage.
2023-07-20 21:48:39 +02:00
Nikolay Sivov
b62f3c881b
d2d1: Improve resource properties check when creating a bitmap.
2023-05-26 21:24:14 +02:00
Nikolay Sivov
df7e680cd2
d2d1: Create GDI-compatible swapchain only for corresponding target usage.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
6526de5c5a
d2d1: Improve GetDC()/ReleaseDC() handling on render targets.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
981db8313f
d2d1: Create GDI-compatible target bitmap for GDI-compatible target usage.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
612020f952
d2d1/tests: Add some more tests for ID2D1GdiInteropRenderTarget.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
ae43a87d01
d2d1: Reject D2D1_ALPHA_MODE_STRAIGHT alpha mode for HWND targets.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
02919e4298
d2d1/tests: Use test context for more tests.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
df50411fac
d2d1: Implement IsSupported() for DC target.
2023-05-23 14:43:12 +02:00
Nikolay Sivov
c9b68daf44
d2d1: Implement IsSupported() for HWND target.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-17 07:13:21 -05:00
Zhiyi Zhang
4150d7282e
d2d1/tests: Add some IsSupported() tests for HWND target.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-17 07:13:21 -05:00
Michael Stefaniuc
3d8e7ea69f
d2d1: Remove superfluous casts to self.
2023-05-10 17:08:48 +02:00
Zhiyi Zhang
066221a9f9
d2d1/tests: Fix memory leaks.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53995
2023-01-06 13:39:45 +01:00
Nikolay Sivov
5de27f63a1
d2d1/tests: Use d2d error code name for unsupported pixel format error code.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-17 09:58:18 +01:00
Nikolay Sivov
a50dbd6c15
d2d1: Derive shared bitmap format from the source bitmap.
2022-11-17 09:58:18 +01:00
Nikolay Sivov
798d659f04
d2d1: Silently ignore non-default state block implementations.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53915
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-15 21:21:27 +01:00
Nikolay Sivov
384b0b35c3
d2d1/tests: Use correct flags constants with D3D11CreateDevice().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-10 22:00:35 +01:00
Zhiyi Zhang
225daac879
d2d1: Use D2D1_ALPHA_MODE_IGNORE if D2D1_ALPHA_MODE_UNKNOWN is used for creating hwnd render targets.
...
Also, alpha mode should not be overwritten with D2D1_ALPHA_MODE_IGNORE just because
DXGI_FORMAT_UNKNOWN is specified.
2022-11-07 21:13:31 +01:00
Zhiyi Zhang
1e4d311999
d2d1/tests: Add hwnd render target pixel format tests.
2022-11-07 21:13:31 +01:00
Vladislav Timonin
4e734f48eb
d2d1: Implement ID2D1Device1::CreateDeviceContext.
2022-10-31 12:04:45 +01:00
Vladislav Timonin
34640a94b3
d2d1: Update to ID2D1Device1.
2022-10-31 12:04:43 +01:00
Nikolay Sivov
e6069c2530
d2d1: Test device context type in BindDC().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-10-25 10:58:18 +02:00
Alexandre Julliard
efa6b9f647
d2d1: Use a gcc pragma instead of a compiler flag for -fexcess-precision.
...
This will be needed to support building multiple architectures from
the same tree.
2022-10-14 18:03:25 +02:00
Alexandre Julliard
064edf1df4
d2d1/tests: Skip subsequent todo tests for unsupported properties.
...
This reduces the number of printed todos in order to stay within the 32kB limit.
2022-09-15 20:55:55 +02:00
Alexandre Julliard
ff558c63ff
d2d1/tests: Adjust geometry to make tests pass on all devices.
...
Fix suggested by Zebediah Figura.
2022-09-12 17:28:23 +02:00
Nikolay Sivov
2f3738b3a6
d2d1/commandlist: Implement layer commands.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-09 15:53:27 +02:00
Nikolay Sivov
a52ba8d95a
d2d1/commandlist: Implement DrawImage() command.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-09 15:53:25 +02:00
Nikolay Sivov
7cfe6d8f29
d2d1/commandlist: Implement FillOpacityMask() command.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-05 20:13:33 +02:00
Nikolay Sivov
4f1dfdad1d
d2d1: Add parameter validation to FillOpacityMask().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-05 20:13:33 +02:00