Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- include/Makefile.in | 1 + include/mfd3d12.idl | 63 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 include/mfd3d12.idl
diff --git a/include/Makefile.in b/include/Makefile.in index df049fd284f..756e25dcc82 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -408,6 +408,7 @@ SOURCES = \ mediaobj.idl \ metahost.idl \ mfapi.h \ + mfd3d12.idl \ mferror.h \ mfidl.idl \ mfmediaengine.idl \ diff --git a/include/mfd3d12.idl b/include/mfd3d12.idl new file mode 100644 index 00000000000..2098e6d405a --- /dev/null +++ b/include/mfd3d12.idl @@ -0,0 +1,63 @@ +/* + * Copyright 2021 Nikolay Sivov 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 "mfidl.idl"; +import "d3d12.idl"; + +[ + object, + uuid(09d0f835-92ff-4e53-8efa-40faa551f233), + local +] +interface IMFD3D12SynchronizationObjectCommands : IUnknown +{ + HRESULT EnqueueResourceReady([in] ID3D12CommandQueue *producer_queue); + HRESULT EnqueueResourceReadyWait([in] ID3D12CommandQueue *consumer_queue); + HRESULT SignalEventOnResourceReady(HANDLE event); + HRESULT EnqueueResourceRelease([in] ID3D12CommandQueue *consumer_queue); +} + +[ + object, + uuid(802302b0-82de-45e1-b421-f19ee5bdaf23), + local +] +interface IMFD3D12SynchronizationObject : IUnknown +{ + HRESULT SignalEventOnFinalResourceRelease(HANDLE hEvent); +} + +typedef enum MF_MT_D3D_RESOURCE_VERSION_ENUM +{ + MF_D3D11_RESOURCE, + MF_D3D12_RESOURCE +} MF_MT_D3D_RESOURCE_VERSION_ENUM; + +cpp_quote("EXTERN_GUID(MF_D3D12_SYNCHRONIZATION_OBJECT, 0x2a7c8d6a, 0x85a6, 0x494d, 0xa0, 0x46, 0x06, 0xea, 0x1a, 0x13, 0x8f, 0x4b);") +cpp_quote("EXTERN_GUID(MF_MT_D3D_RESOURCE_VERSION, 0x174f1e85, 0xfe26, 0x453d, 0xb5, 0x2e, 0x5b, 0xdd, 0x4e, 0x55, 0xb9, 0x44);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_CPU_READBACK, 0x28ee9fe3, 0xd481, 0x46a6, 0xb9, 0x8a, 0x7f, 0x69, 0xd5, 0x28, 0xe, 0x82);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_TEXTURE_LAYOUT, 0x97c85caa, 0xbeb, 0x4ee1, 0x97, 0x15, 0xf2, 0x2f, 0xad, 0x8c, 0x10, 0xf5);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET, 0xeeac2585, 0x3430, 0x498c, 0x84, 0xa2, 0x77, 0xb1, 0xbb, 0xa5, 0x70, 0xf6);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL, 0xb1138dc3, 0x01d5, 0x4c14, 0x9b, 0xdc, 0xcd, 0xc9, 0x33, 0x6f, 0x55, 0xb9);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, 0x82c85647, 0x5057, 0x4960, 0x95, 0x59, 0xf4, 0x5b, 0x8e, 0x27, 0x14, 0x27);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE, 0xba06bfac, 0xffe3, 0x474a, 0xab, 0x55, 0x16, 0x1e, 0xe4, 0x41, 0x7a, 0x2e);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER, 0xa6a1e439, 0x2f96, 0x4ab5, 0x98, 0xdc, 0xad, 0xf7, 0x49, 0x73, 0x50, 0x5d);") +cpp_quote("EXTERN_GUID(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS, 0xa4940b2, 0xcfd6, 0x4738, 0x9d, 0x02, 0x98, 0x11, 0x37, 0x34, 0x01, 0x5a);") +cpp_quote("EXTERN_GUID(MF_SA_D3D12_HEAP_FLAGS, 0x496b3266, 0xd28f, 0x4f8c, 0x93, 0xa7, 0x4a, 0x59, 0x6b, 0x1a, 0x31, 0xa1);") +cpp_quote("EXTERN_GUID(MF_SA_D3D12_HEAP_TYPE, 0x56f26a76, 0xbbc1, 0x4ce0, 0xbb, 0x11, 0xe2, 0x23, 0x68, 0xd8, 0x74, 0xed);") +cpp_quote("EXTERN_GUID(MF_SA_D3D12_CLEAR_VALUE, 0x86ba9a39, 0x526, 0x495d, 0x9a, 0xb5, 0x54, 0xec, 0x9f, 0xad, 0x6f, 0xc3);")
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index c36a2069bd8..d7cd0d360d9 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -46,6 +46,12 @@ #include "strsafe.h" #undef INITGUID #include "evr.h" +/* mfd3d12 guids are not included in mfuuid */ +#define INITGUID +#undef EXTERN_GUID +#define EXTERN_GUID DEFINE_GUID +#include "initguid.h" +#include "mfd3d12.h"
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
@@ -1572,6 +1578,8 @@ const char *debugstr_attr(const GUID *guid) X(MF_PD_PLAYBACK_ELEMENT_ID), X(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE9), X(MF_MT_ALL_SAMPLES_INDEPENDENT), + X(MF_SA_D3D12_CLEAR_VALUE), + X(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER), X(MF_PD_PREFERRED_LANGUAGE), X(MF_PD_PLAYBACK_BOUNDARY_TIME), X(MF_MEDIA_ENGINE_TELEMETRY_APPLICATION_ID), @@ -1596,6 +1604,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_MEDIA_ENGINE_STREAM_CONTAINS_ALPHA_CHANNEL), X(MF_MEDIA_ENGINE_MEDIA_PLAYER_MODE), X(MF_MEDIA_ENGINE_EXTENSION), + X(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS), X(MF_MT_DEFAULT_STRIDE), X(MF_MT_ARBITRARY_FORMAT), X(MF_TRANSFORM_CATEGORY_Attribute), @@ -1629,9 +1638,11 @@ const char *debugstr_attr(const GUID *guid) X(MF_READWRITE_DISABLE_CONVERTERS), X(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE_EDGE), X(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS), + X(MF_SA_D3D12_HEAP_FLAGS), X(MF_MT_MINIMUM_DISPLAY_APERTURE), X(MFSampleExtension_Token), X(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY), + X(MF_D3D12_SYNCHRONIZATION_OBJECT), X(MF_MT_AUDIO_VALID_BITS_PER_SAMPLE), X(MF_TRANSFORM_ASYNC_UNLOCK), X(MF_DISABLE_FRAME_CORRUPTION_INFO), @@ -1644,6 +1655,7 @@ const char *debugstr_attr(const GUID *guid) X(MFSampleExtension_3DVideo_SampleFormat), X(MF_MT_H264_RESOLUTION_SCALING), X(MF_MT_VIDEO_LEVEL), + X(MF_SA_D3D12_HEAP_TYPE), X(MF_SAMPLEGRABBERSINK_SAMPLE_TIME_OFFSET), X(MF_MT_SAMPLE_SIZE), X(MF_MT_AAC_PAYLOAD_TYPE), @@ -1665,6 +1677,8 @@ const char *debugstr_attr(const GUID *guid) X(MF_SESSION_QUALITY_MANAGER), X(MF_SESSION_CONTENT_PROTECTION_MANAGER), X(MF_MT_MPEG4_SAMPLE_DESCRIPTION), + X(MF_MT_D3D_RESOURCE_VERSION), + X(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET), X(MF_MT_MPEG_START_TIME_CODE), X(MFT_REMUX_MARK_I_PICTURE_AS_CLEAN_POINT), X(MFT_REMUX_MARK_I_PICTURE_AS_CLEAN_POINT), @@ -1724,10 +1738,12 @@ const char *debugstr_attr(const GUID *guid) X(MF_EVENT_SOURCE_FAKE_START), X(MF_EVENT_SOURCE_PROJECTSTART), X(MF_EVENT_SOURCE_ACTUAL_START), + X(MF_MT_D3D12_TEXTURE_LAYOUT), X(MF_MEDIA_ENGINE_CONTENT_PROTECTION_MANAGER), X(MF_MT_AUDIO_SAMPLES_PER_BLOCK), X(MFT_ENUM_HARDWARE_URL_Attribute), X(MF_SOURCE_READER_ASYNC_CALLBACK), + X(MF_MT_D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE), X(MF_MT_OUTPUT_BUFFER_NUM), X(MF_SA_D3D11_BINDFLAGS), X(MFT_ENCODER_SUPPORTS_CONFIG_EVENT), @@ -1737,6 +1753,7 @@ const char *debugstr_attr(const GUID *guid) X(MFT_SUPPORT_3DVIDEO), X(MFT_SUPPORT_3DVIDEO), X(MFT_INPUT_TYPES_Attributes), + X(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS), X(MF_MT_H264_LAYOUT_PER_STREAM), X(MF_EVENT_SCRUBSAMPLE_TIME), X(MF_MT_SPATIAL_AUDIO_MAX_METADATA_ITEMS), @@ -1754,6 +1771,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_SAMPLEGRABBERSINK_IGNORE_CLOCK), X(MF_SA_D3D11_SHARED), X(MF_MT_PAN_SCAN_ENABLED), + X(MF_MT_D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL), X(MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID), X(MF_MT_DV_VAUX_CTRL_PACK), X(MFSampleExtension_ForwardedDecodeUnitType), @@ -1798,6 +1816,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_PD_AUDIO_ISVARIABLEBITRATE), X(MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS), X(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE), + X(MF_MT_D3D12_CPU_READBACK), X(MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID), X(MF_MT_MPEG2_CONTENT_PACKET), X(MFT_PROCESS_LOCAL_Attribute),