Signed-off-by: Ziqing Hui zhui@codeweavers.com ---
v4: Include the new header file to effect.c.
dlls/d2d1/effect.c | 1 + include/Makefile.in | 1 + include/d2d1effectauthor.idl | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 include/d2d1effectauthor.idl
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 601932b005b..350ac3c7bbf 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -17,6 +17,7 @@ */
#include "d2d1_private.h" +#include "d2d1effectauthor.h"
WINE_DEFAULT_DEBUG_CHANNEL(d2d);
diff --git a/include/Makefile.in b/include/Makefile.in index dff2f341568..90d451ba5b1 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -107,6 +107,7 @@ SOURCES = \ d2d1effects.idl \ d2d1effects_1.idl \ d2d1effects_2.idl \ + d2d1effectauthor.idl \ d2dbasetypes.h \ d2derr.h \ d3d.h \ diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl new file mode 100644 index 00000000000..407c6f91819 --- /dev/null +++ b/include/d2d1effectauthor.idl @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Ziqing Hui for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + import "d2d1_1.idl"; + +[ + object, + uuid(9b8b1336-00a5-4668-92b7-ced5d8bf9b7b), + local, +] +interface ID2D1VertexBuffer : IUnknown +{ + HRESULT Map( + [out] BYTE **data, + [in] UINT32 size + ); + HRESULT Unmap(); +};
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index 407c6f91819..28472e0ee81 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -31,3 +31,20 @@ interface ID2D1VertexBuffer : IUnknown ); HRESULT Unmap(); }; + +[ + object, + uuid(688d15c3-02b0-438d-b13a-d1b44c32c39a), + local, +] +interface ID2D1ResourceTexture : IUnknown +{ + HRESULT Update( + [in] const UINT32 *min_extents, + [in] const UINT32 *max_extents, + [in] const UINT32 *strides, + [in] UINT32 dimensions, + [in] const BYTE *data, + [in] UINT32 data_size + ); +};
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index 28472e0ee81..b52f51074dd 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -18,6 +18,34 @@
import "d2d1_1.idl";
+typedef enum D2D1_FILTER +{ + D2D1_FILTER_MIN_MAG_MIP_POINT = 0x00, + D2D1_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01, + D2D1_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04, + D2D1_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05, + D2D1_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, + D2D1_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, + D2D1_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, + D2D1_FILTER_MIN_MAG_MIP_LINEAR = 0x15, + D2D1_FILTER_ANISOTROPIC = 0x55, + D2D1_FILTER_FORCE_DWORD = 0xffffffff +} D2D1_FILTER; + +typedef enum D2D1_CHANNEL_DEPTH +{ + D2D1_CHANNEL_DEPTH_DEFAULT = 0x0, + D2D1_CHANNEL_DEPTH_1 = 0x1, + D2D1_CHANNEL_DEPTH_4 = 0x4, + D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff +} D2D1_CHANNEL_DEPTH; + +typedef struct D2D1_INPUT_DESCRIPTION +{ + D2D1_FILTER filter; + UINT32 levelOfDetailCount; +} D2D1_INPUT_DESCRIPTION; + [ object, uuid(9b8b1336-00a5-4668-92b7-ced5d8bf9b7b), @@ -48,3 +76,26 @@ interface ID2D1ResourceTexture : IUnknown [in] UINT32 data_size ); }; + +[ + object, + uuid(519ae1bd-d19a-420d-b849-364f594776b7), + local, +] +interface ID2D1RenderInfo : IUnknown +{ + HRESULT SetInputDescription( + [in] UINT32 index, + [in] D2D1_INPUT_DESCRIPTION description + ); + HRESULT SetOutputBuffer( + [in] D2D1_BUFFER_PRECISION precision, + [in] D2D1_CHANNEL_DEPTH depth + ); + void SetCached( + [in] BOOL is_cached + ); + void SetInstructionCountHint( + [in] UINT32 count + ); +};
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index b52f51074dd..d7576c9e9f9 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -40,12 +40,73 @@ typedef enum D2D1_CHANNEL_DEPTH D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff } D2D1_CHANNEL_DEPTH;
+typedef enum D2D1_PIXEL_OPTIONS +{ + D2D1_PIXEL_OPTIONS_NONE = 0x0, + D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING = 0x1, + D2D1_PIXEL_OPTIONS_FORCE_DWORD = 0xffffffff +} D2D1_PIXEL_OPTIONS; + +typedef enum D2D1_VERTEX_OPTIONS +{ + D2D1_VERTEX_OPTIONS_NONE = 0x0, + D2D1_VERTEX_OPTIONS_DO_NOT_CLEAR = 0x1, + D2D1_VERTEX_OPTIONS_USE_DEPTH_BUFFER = 0x2, + D2D1_VERTEX_OPTIONS_ASSUME_NO_OVERLAP = 0x4, + D2D1_VERTEX_OPTIONS_FORCE_DWORD = 0xffffffff +} D2D1_VERTEX_OPTIONS; + +typedef enum D2D1_BLEND_OPERATION +{ + D2D1_BLEND_OPERATION_ADD = 0x1, + D2D1_BLEND_OPERATION_SUBTRACT = 0x2, + D2D1_BLEND_OPERATION_REV_SUBTRACT = 0x3, + D2D1_BLEND_OPERATION_MIN = 0x4, + D2D1_BLEND_OPERATION_MAX = 0x5, + D2D1_BLEND_OPERATION_FORCE_DWORD = 0xffffffff +} D2D1_BLEND_OPERATION; + +typedef enum D2D1_BLEND +{ + D2D1_BLEND_ZERO = 0x1, + D2D1_BLEND_ONE = 0x2, + D2D1_BLEND_SRC_COLOR = 0x3, + D2D1_BLEND_INV_SRC_COLOR = 0x4, + D2D1_BLEND_SRC_ALPHA = 0x5, + D2D1_BLEND_INV_SRC_ALPHA = 0x6, + D2D1_BLEND_DEST_ALPHA = 0x7, + D2D1_BLEND_INV_DEST_ALPHA = 0x8, + D2D1_BLEND_DEST_COLOR = 0x9, + D2D1_BLEND_INV_DEST_COLOR = 0xa, + D2D1_BLEND_SRC_ALPHA_SAT = 0xb, + D2D1_BLEND_BLEND_FACTOR = 0xe, + D2D1_BLEND_INV_BLEND_FACTOR = 0xf, + D2D1_BLEND_FORCE_DWORD = 0xffffffff +} D2D1_BLEND; + typedef struct D2D1_INPUT_DESCRIPTION { D2D1_FILTER filter; UINT32 levelOfDetailCount; } D2D1_INPUT_DESCRIPTION;
+typedef struct D2D1_VERTEX_RANGE +{ + UINT32 startVertex; + UINT32 vertexCount; +} D2D1_VERTEX_RANGE; + +typedef struct D2D1_BLEND_DESCRIPTION +{ + D2D1_BLEND sourceBlend; + D2D1_BLEND destinationBlend; + D2D1_BLEND_OPERATION blendOperation; + D2D1_BLEND sourceBlendAlpha; + D2D1_BLEND destinationBlendAlpha; + D2D1_BLEND_OPERATION blendOperationAlpha; + float blendFactor[4]; +} D2D1_BLEND_DESCRIPTION; + [ object, uuid(9b8b1336-00a5-4668-92b7-ced5d8bf9b7b), @@ -99,3 +160,35 @@ interface ID2D1RenderInfo : IUnknown [in] UINT32 count ); }; + +[ + object, + uuid(693ce632-7f2f-45de-93fe-18d88b37aa21), + local, +] +interface ID2D1DrawInfo : ID2D1RenderInfo +{ + HRESULT SetPixelShaderConstantBuffer( + [in] const BYTE *buffer, + [in] UINT32 size + ); + HRESULT SetResourceTexture( + [in] UINT32 index, + [in] ID2D1ResourceTexture *texture + ); + HRESULT SetVertexShaderConstantBuffer( + [in] const BYTE *buffer, + [in] UINT32 size + ); + HRESULT SetPixelShader( + [in] REFGUID id, + [in] D2D1_PIXEL_OPTIONS options + ); + HRESULT SetVertexProcessing( + [in, optional] ID2D1VertexBuffer *buffer, + [in] D2D1_VERTEX_OPTIONS options, + [in, optional] const D2D1_BLEND_DESCRIPTION *description, + [in, optional] const D2D1_VERTEX_RANGE *range, + [in, optional] const GUID *shader + ); +};
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index d7576c9e9f9..f5cbe68e730 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -192,3 +192,23 @@ interface ID2D1DrawInfo : ID2D1RenderInfo [in, optional] const GUID *shader ); }; + +[ + object, + uuid(5598b14b-9fd7-48b7-9bdb-8f0964eb38bc), + local, +] +interface ID2D1ComputeInfo : ID2D1RenderInfo +{ + HRESULT SetComputeShaderconstantBuffer( + [in] const BYTE *buffer, + [in] UINT32 size + ); + HRESULT SetComputeShader( + [in] REFGUID id + ); + HRESULT SetResourceTexture( + [in] UINT32 index, + [in] ID2D1ResourceTexture *texture + ); +};
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- include/d2d1effectauthor.idl | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
diff --git a/include/d2d1effectauthor.idl b/include/d2d1effectauthor.idl index f5cbe68e730..88efdbeb5f8 100644 --- a/include/d2d1effectauthor.idl +++ b/include/d2d1effectauthor.idl @@ -212,3 +212,49 @@ interface ID2D1ComputeInfo : ID2D1RenderInfo [in] ID2D1ResourceTexture *texture ); }; + +[ + object, + uuid(b2efe1e7-729f-4102-949f-505fa21bf666), + local, +] +interface ID2D1TransformNode : IUnknown +{ + UINT32 GetInputCount(); +}; + +[ + object, + uuid(13d29038-c3e6-4034-9081-13b53a417992), + local, +] +interface ID2D1TransformGraph : IUnknown +{ + UINT32 GetInputCount(); + HRESULT SetSingleTransformNode( + [in] ID2D1TransformNode *node + ); + HRESULT AddNode( + [in] ID2D1TransformNode *node + ); + HRESULT RemoveNode( + [in] ID2D1TransformNode *node + ); + HRESULT SetOutputNode( + [in] ID2D1TransformNode *node + ); + HRESULT ConnectNode( + [in] ID2D1TransformNode *from_node, + [in] ID2D1TransformNode *to_node, + [in] UINT32 index + ); + HRESULT ConnectToEffectInput( + [in] UINT32 input_index, + [in] ID2D1TransformNode *node, + [in] UINT32 node_index + ); + void Clear(); + HRESULT SetPassthroughGraph( + [in] UINT32 index + ); +};
On Mon, 25 Apr 2022 at 06:42, Ziqing Hui zhui@codeweavers.com wrote:
+[
- object,
- uuid(9b8b1336-00a5-4668-92b7-ced5d8bf9b7b),
- local,
+] +interface ID2D1VertexBuffer : IUnknown +{
- HRESULT Map(
[out] BYTE **data,
[in] UINT32 size
- );
- HRESULT Unmap();
+};
Interface definitions don't end with a semi-colon. I notice I missed this issue in some of the recent d2d1_3.idl changes.