diff --git a/IddSampleDriver/Driver.cpp b/IddSampleDriver/Driver.cpp index e0a7fe8..af53529 100644 --- a/IddSampleDriver/Driver.cpp +++ b/IddSampleDriver/Driver.cpp @@ -16,7 +16,7 @@ Environment: --*/ #include "Driver.h" -#include "Driver.tmh" +//#include "Driver.tmh" #include #include #include @@ -732,7 +732,7 @@ void CreateTargetMode(IDDCX_TARGET_MODE& Mode, UINT Width, UINT Height, UINT VSy void CreateTargetMode2(IDDCX_TARGET_MODE2& Mode, UINT Width, UINT Height, UINT VSync) { Mode.Size = sizeof(Mode); - Mode.BitsPerComponent.Rgb = IDDCX_BITS_PER_COMPONENT_10; + Mode.BitsPerComponent.Rgb = IDDCX_BITS_PER_COMPONENT_8 | IDDCX_BITS_PER_COMPONENT_10; CreateTargetMode(Mode.TargetVideoSignalInfo.targetVideoSignalInfo, Width, Height, VSync); } @@ -833,7 +833,7 @@ NTSTATUS IddSampleEvtIddCxParseMonitorDescription2( pInArgs->pMonitorModes[ModeIndex].Size = sizeof(IDDCX_MONITOR_MODE2); pInArgs->pMonitorModes[ModeIndex].Origin = IDDCX_MONITOR_MODE_ORIGIN_MONITORDESCRIPTOR; pInArgs->pMonitorModes[ModeIndex].MonitorVideoSignalInfo = s_KnownMonitorModes2[ModeIndex]; - pInArgs->pMonitorModes[ModeIndex].BitsPerComponent.Rgb = IDDCX_BITS_PER_COMPONENT_10; + pInArgs->pMonitorModes[ModeIndex].BitsPerComponent.Rgb = IDDCX_BITS_PER_COMPONENT_8 | IDDCX_BITS_PER_COMPONENT_10; } // Set the preferred mode as represented in the EDID diff --git a/IddSampleDriver/IddCx.h b/IddSampleDriver/IddCx.h deleted file mode 100644 index d8f7687..0000000 --- a/IddSampleDriver/IddCx.h +++ /dev/null @@ -1,2726 +0,0 @@ -/*++ - -Copyright (c) Microsoft Corporation. All Rights Reserved - -Module Name: - - IddCx.h - -Abstract: - - Indirect Displays class extension and the client driver interface. - -Environment: - - User-mode Driver Framework - ---*/ - -#define DXVA2_API_DEFINED -#define DO_NOT_USE_DIRECTX_OR_DXVA2 -#include - -#include -#include - -// -// NOTE: This header is generated by stubwork. Please make any -// modifications to the corresponding template files -// (.x or .y) and use stubwork to regenerate the header -// - -#ifndef _IDDCX_H_ -#define _IDDCX_H_ - -#ifndef WDF_EXTERN_C - #ifdef __cplusplus - #define WDF_EXTERN_C extern "C" - #define WDF_EXTERN_C_START extern "C" { - #define WDF_EXTERN_C_END } - #else - #define WDF_EXTERN_C - #define WDF_EXTERN_C_START - #define WDF_EXTERN_C_END - #endif -#endif - -WDF_EXTERN_C_START - - - -#ifndef WDFAPI -#error Include WDF.H first -#endif - -// Disable warning 'nonstandard extension used : nameless struct/union' -#pragma warning(push) -#pragma warning(disable : 4201) - -// DDI Version model -// ----------------- -// The interface version model will be based on structure versions, when a DDI call/OS callback needs to be updated -// the version of that callback we be incremented along with any structures used, for example if v1 of a call was : -// -// void SomeDDICall(IDDCX_ADAPTER hOsAdapterContext, IDARG_IN_SOME_DDI* pInArgs); -// -// and the functionality/params needed to be changed then the following would be added: -// -// void SomeDDICall2(IDDCX_ADAPTER hOsAdapterContext, IDARG_IN_SOME_DDI2* pInArgs); -// -// and the DDI function table structure would be updated to IDDCX_DDI2 which would have SomeDDICall replaced with -// SomeDDICall2. At the same time a new create interface v2 would be used by a driver - - -// Timeout detection and recovery -// ------------------------------ -// The OS will monitor the drivers processing of frames and if it detects the driver is not making forward progress it will -// take action to ensure the desktop is not effected. -// The OS will monitor the driver in two ways : -// -// 1) Ensure that each OS->driver call does not take longer than 10 seconds -// 2) Ensure that a driver reports that it has finished process a given frame within 10 seconds, that is that the driver does -// not call FinishedProcessingFrame() within 10 seconds of the new frame ready event is triggered -// -// In the event of a timeout being detected then the OS will call the UMDF BugCheck() call which will cause the UMDF host -// process to terminate and restart subject to UMDF device restart policy. - -/// -/// Opaque reference to a WDF indirect display adapter object -/// -DECLARE_HANDLE(IDDCX_ADAPTER); - -/// -/// Opaque reference to a WDF indirect display monitor object -/// -DECLARE_HANDLE(IDDCX_MONITOR); - -/// -/// Opaque reference to a WDF indirect display swap-chain object. -/// -DECLARE_HANDLE(IDDCX_SWAPCHAIN); - -/// -/// Opaque reference to a WDF indirect display OPM output protection context -/// -DECLARE_HANDLE(IDDCX_OPMCTX); - -#pragma region Enum Declarations - -/// -/// Enum used to indicates how a given supported feature is implemented -/// -enum IDDCX_FEATURE_IMPLEMENTATION : UINT -{ - IDDCX_FEATURE_IMPLEMENTATION_UNINITIALIZED = 0, - /// - /// The feature is not implemented - /// - IDDCX_FEATURE_IMPLEMENTATION_NONE = 1, - /// - /// The feature is implemented and hardware is used in the implementation. For example, the adapter - /// display pipeline blends the hardware cursor image into the signal sent to the monitor. - /// - IDDCX_FEATURE_IMPLEMENTATION_HARDWARE = 2, - /// - /// The feature is implemented and software is used in the implementation. For example, the driver - /// support hardware cursor by blending the cursor image into the display pixels as part of the processing. - /// - IDDCX_FEATURE_IMPLEMENTATION_SOFTWARE = 3, -}; - -/// -/// Enum used to indicates the link type for transmission of the video data -/// -enum IDDCX_TRANSMISSION_TYPE : UINT -{ - IDDCX_TRANSMISSION_TYPE_UNINITIALIZED = 0, - /// - /// Video data is being transmitted over wired USB - /// - IDDCX_TRANSMISSION_TYPE_WIRED_USB = 0x1, - /// - /// Video data is being transmitted over wired Miracast link - /// - IDDCX_TRANSMISSION_TYPE_WIRED_MIRACAST = 0x2, - /// - /// Video data is being transmitted over a wired connect not already described - /// - IDDCX_TRANSMISSION_TYPE_WIRED_OTHER = 0x3, - /// - /// Video data is being transmitted over wireless MA-USB - /// - IDDCX_TRANSMISSION_TYPE_WIRELESS_MAUSB = 0x4, - /// - /// Video data is being transmitted over wireless network not using MA-USB but the device - /// is enumerated on the USB bus - /// - IDDCX_TRANSMISSION_TYPE_WIRELESS_USB_OTHER = 0x5, - /// - /// Video data is being transmitted over a WiFi wireless network - /// - IDDCX_TRANSMISSION_TYPE_WIRELESS_WIFI_OTHER = 0x6, - /// - /// Video data is being transmitted over wireless Miracast link - /// - IDDCX_TRANSMISSION_TYPE_WIRELESS_MIRACAST = 0x7, - /// - /// Video data is being transmitted over a non-WiFi wireless network not described above - /// - IDDCX_TRANSMISSION_TYPE_WIRELESS_OTHER = 0x8, - /// - /// Video data is being transmitted over a link type that is not covered by the above defines - /// - IDDCX_TRANSMISSION_TYPE_OTHER = 0xFFFFFFFF, -}; - -/// -/// Specifies boolean flags for an indirect display adapter. -/// -enum IDDCX_ADAPTER_FLAGS : UINT -{ - IDDCX_ADAPTER_FLAGS_NONE = 0, - /// - /// Indirect display automatically support OS virtual modes, this means mode changes can be - /// performed seamlessly by OS using DWM scaling on a per frame basis without any display mode - /// change. The disadvantage of this is that when a smaller desktop mode is used by the user the - /// desktop image provided to the driver to process will be bigger than the desktop size hence - /// wasting some encode and transmit bandwidth. This value is used to indicate to the OS that the - /// smallest possible desktop surface size should be used when the desktop mode is changed. - /// Typically a solution that has a large processing overhead or limited transmission bandwidth will - /// use this flag reduce the desktop image size to process as much as possible.Note setting this flag - /// will result in a mode change each time the desktop resolution is changed. - /// - IDDCX_ADAPTER_FLAGS_USE_SMALLEST_MODE = 1, - /// - /// Indicates if the driver can utilize move regions provided by the OS in addition to dirty rects when - /// encoding the image. The driver should only set this to TRUE if it will use the move regions as it does - /// cost additional resource for the OS to generate these. - /// If driver sets this to FALSE the OS will convert all move regions in to dirty rects - /// - IDDCX_ADAPTER_FLAGS_CAN_USE_MOVE_REGIONS = 2, -}; - -/// -/// Used to describe the monitor description -/// -enum IDDCX_MONITOR_DESCRIPTION_TYPE : UINT -{ - IDDCX_MONITOR_DESCRIPTION_TYPE_UNINITIALIZED = 0, - /// - /// The monitor description is Edid - /// - IDDCX_MONITOR_DESCRIPTION_TYPE_EDID = 1, - /// - /// The monitor description is DisplayId - /// - IDDCX_MONITOR_DESCRIPTION_TYPE_DISPLAYID = 2, -}; - -/// -/// Used to describe a mode the monitor supports based on the monitor description. -/// -enum IDDCX_MONITOR_MODE_ORIGIN : UINT -{ - IDDCX_MONITOR_MODE_ORIGIN_UNINITIALIZED = 0, - /// - /// Indicates that the driver added this mode from directly processing the monitor description - /// - IDDCX_MONITOR_MODE_ORIGIN_MONITORDESCRIPTOR = 1, - /// - /// Indicates that the driver did not add this mode as a direct resolution of processing the modes - /// supported by the monitor but because of separate additional knowledge it has about the monitor - /// - IDDCX_MONITOR_MODE_ORIGIN_DRIVER = 2, -}; - -/// -/// Describes why the driver is calling to update the mode list -/// -enum IDDCX_UPDATE_REASON : UINT -{ - IDDCX_UPDATE_REASON_UNINITIALIZED = 0, - /// - /// The mode list is changing due to power constraints on the host system changed - /// - IDDCX_UPDATE_REASON_POWER_CONSTRAINTS = 1, - /// - /// The mode list is changing due to changes in bandwidth between the system and the indirect display device - /// - IDDCX_UPDATE_REASON_HOST_LINK_BANDWIDTH = 2, - /// - /// The mode list is changing due to changes in bandwidth the indirect display device and the monitor - /// - IDDCX_UPDATE_REASON_DISPLAY_LINK_BANDWIDTH = 3, - /// - /// The mode list is changing due to constraints of the product when in a new configuration - /// - IDDCX_UPDATE_REASON_CONFIGURATION_CONSTRAINTS = 4, - /// - /// The mode list is changing due to another reason not listed above - /// - IDDCX_UPDATE_REASON_OTHER = 5, -}; - -enum IDDCX_PATH_FLAGS : UINT -{ - IDDCX_PATH_FLAGS_NONE = 0, - /// - /// Indicates if this path has changed - /// - IDDCX_PATH_FLAGS_CHANGED = 1, - /// - /// Indicates if this path is active - /// - IDDCX_PATH_FLAGS_ACTIVE = 2, -}; - -/// -/// Describes what type of support a driver has for the given Xor cursor format. -/// If driver cannot support a particular monochrome Xor or color Xor cursor it can use the -/// IDDCX_XOR_CURSOR_SUPPORT_EMULATION value to indicate to the OS that it -/// should use it's Xor emulation algorithm to convert the Xor image to alpha cursor and have the -/// driver accelerate that. This emulation places a solid border around the cursor image so it -/// can be seen in solid color regions of the screen. The advantages of this is that is allows -/// the Xor cursor to be hardware accelerated when the adapter cannot support Xor, this is very -/// useful on high latency solutions as this typically allows driver to send the cursor information -/// over a sideband channel to reduce the latency. The disadvantage is that the user will notice a -/// visual difference due to the emulation. The recommendation is not to use this on a low latency -/// solution where falling back to software cursor will not impact the mouse latency for the -/// user (<50ms) and will result in a better visible experience. On a high latency solution where -/// the cursor data can be transmitted independently of the desktop image it is recommended to use -/// this flag to allow hardware cursor and hence lower the mouse movement latency. -/// -enum IDDCX_XOR_CURSOR_SUPPORT : UINT -{ - IDDCX_XOR_CURSOR_SUPPORT_UNINITIALIZED = 0, - /// - /// Driver does not support this Xor cursor type at all, all cursors of this type will be drawn into the desktop image by - /// the OS - /// - IDDCX_XOR_CURSOR_SUPPORT_NONE = 1, - /// - /// Driver does support this Xor cursor type - /// - IDDCX_XOR_CURSOR_SUPPORT_FULL = 2, - /// - /// The driver does not support this Xor cursor type but driver wants OS to convert the Xor cursor into a alpha cursor, - /// see comment above - /// - IDDCX_XOR_CURSOR_SUPPORT_EMULATION = 3, -}; - -/// -/// Describes the type of cursor -/// -enum IDDCX_CURSOR_SHAPE_TYPE : UINT -{ - IDDCX_CURSOR_SHAPE_TYPE_UNINITIALIZED = 0, - /// - /// Indicates this is a masked-color cursor shape - /// - IDDCX_CURSOR_SHAPE_TYPE_MASKED_COLOR = 1, - /// - /// Indicates this is a 32bpp alpha cursor - /// - IDDCX_CURSOR_SHAPE_TYPE_ALPHA = 2, -}; - -/// -/// Defines the processing status of the frame -/// -enum IDDCX_FRAME_STATUS : UINT -{ - IDDCX_FRAME_STATUS_UNINITIALIZED = 0, - /// - /// Indicates that the frame was processed completely and sent to the device - /// - IDDCX_FRAME_STATUS_COMPLETED = 1, - /// - /// Indicates that the driver stopped processing this frame to start on a newer frame, this normally - /// happens if it is taking a long time to process/transmit the frame - /// - IDDCX_FRAME_STATUS_DROPPED = 2, - /// - /// Indicates that the driver stopped processing this frame because driver hit an internal error - /// - IDDCX_FRAME_STATUS_ERROR = 3, -}; - -/// -/// Defines the type of frame processing step -/// -enum IDDCX_FRAME_STATISTICS_STEP_TYPE : UINT -{ - IDDCX_FRAME_STATISTICS_STEP_TYPE_UNINITIALIZED = 0, - /// - /// Used to mark the start of a color convert operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_COLOR_CONVERT_START = 0x1, - /// - /// Used to mark the end of a color convert operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_COLOR_CONVERT_END = 0x2, - /// - /// Used to mark the start of a encode operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_ENCODE_START = 0x3, - /// - /// Used to mark the end of a encode operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_ENCODE_END = 0x4, - /// - /// Used to mark the start of a encrypt operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_ENCRYPT_START = 0x5, - /// - /// Used to mark the end of a encrypt operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_ENCRYPT_END = 0x6, - /// - /// Used to mark the start of a mux'ing operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_MUX_START = 0x7, - /// - /// Used to mark the end of a mux'ing operation - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_MUX_END = 0x8, - /// - /// Driver defined processing steps - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_1 = 0x100, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_2 = 0x101, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_3 = 0x102, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_4 = 0x103, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_5 = 0x104, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_6 = 0x105, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_7 = 0x106, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_8 = 0x107, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_9 = 0x108, - IDDCX_FRAME_STATISTICS_STEP_TYPE_DRIVER_DEFINED_10 = 0x109, -}; - -enum IDDCX_FRAME_STATISTICS_FLAGS : UINT -{ - IDDCX_FRAME_STATISTICS_FLAGS_NONE = 0, - /// - /// If set indicates that the driver reduced the color fidelity of the desktop image while processing - /// and transmitting this frame - /// - IDDCX_FRAME_STATISTICS_FLAGS_REDUCED_COLOR_FIDELITY = 1, -}; - -/// -/// The type of gamma ramp being set -/// -enum IDDCX_GAMMARAMP_TYPE : UINT -{ - IDDCX_GAMMARAMP_TYPE_UNINITIALIZED = 0, - /// - /// The gamma ramp is the default ramp - /// - IDDCX_GAMMARAMP_TYPE_DEFAULT = 1, - /// - /// Indicates that the gamma lookup table contains three arrays, one each for the red, green, and blue color channels. - /// Each array has 256 16-bit values. - /// - IDDCX_GAMMARAMP_TYPE_RGB256x3x16 = 2, -}; - - - -#pragma endregion - -// Defines the function table used to indirectly call class extension functions. -typedef VOID (*PFN_IDD_CX)(VOID); -extern PFN_IDD_CX IddFunctions[]; - -// Forward-declare the driver globals structure, which contains system-defined per-driver data. -typedef struct IDD_DRIVER_GLOBALS IDD_DRIVER_GLOBALS, *PIDD_DRIVER_GLOBALS; - -#include "IddCxFuncEnum.h" - -#pragma region Forward Declarations - -// Structures need to be referenced by the event callbacks -struct IDD_CX_CLIENT_CONFIG; -struct IDDCX_ENDPOINT_VERSION; -struct IDDCX_ENDPOINT_DIAGNOSTIC_INFO; -struct IDDCX_ADAPTER_CAPS; -struct IDARG_IN_ADAPTER_INIT_FINISHED; -struct IDARG_IN_ADAPTER_INIT; -struct IDARG_OUT_ADAPTER_INIT; -struct IDDCX_MONITOR_DESCRIPTION; -struct IDDCX_MONITOR_INFO; -struct IDARG_IN_MONITORCREATE; -struct IDARG_OUT_MONITORCREATE; -struct IDARG_OUT_MONITORARRIVAL; -struct IDDCX_MONITOR_MODE; -struct IDARG_IN_PARSEMONITORDESCRIPTION; -struct IDARG_OUT_PARSEMONITORDESCRIPTION; -struct IDARG_IN_GETDEFAULTDESCRIPTIONMODES; -struct IDARG_OUT_GETDEFAULTDESCRIPTIONMODES; -struct IDDCX_TARGET_MODE; -struct IDARG_IN_QUERYTARGETMODES; -struct IDARG_OUT_QUERYTARGETMODES; -struct IDARG_IN_UPDATEMODES; -struct IDARG_IN_MAXDISPLAYPIPELINERATE; -struct IDDCX_PATH; -struct IDARG_IN_COMMITMODES; -struct IDDCX_CURSOR_CAPS; -struct IDARG_IN_SETUP_HWCURSOR; -struct IDDCX_CURSOR_SHAPE_INFO; -struct IDARG_IN_QUERY_HWCURSOR; -struct IDARG_OUT_QUERY_HWCURSOR; -struct IDARG_IN_SETSWAPCHAIN; -struct IDDCX_METADATA; -struct IDARG_IN_SWAPCHAINSETDEVICE; -struct IDARG_OUT_RELEASEANDACQUIREBUFFER; -struct IDARG_IN_GETDIRTYRECTS; -struct IDARG_OUT_GETDIRTYRECTS; -struct IDDCX_MOVEREGION; -struct IDARG_IN_GETMOVEREGIONS; -struct IDARG_OUT_GETMOVEREGIONS; -struct IDDCX_FRAME_STATISTICS_STEP; -struct IDDCX_FRAME_STATISTICS; -struct IDARG_IN_REPORTFRAMESTATISTICS; -struct IDARG_IN_I2C_TRANSMIT; -struct IDARG_IN_SET_GAMMARAMP; -struct IDARG_IN_I2C_RECEIVE; -struct IDARG_IN_OPM_GET_CERTIFICATE_SIZE; -struct IDARG_OUT_OPM_GET_CERTIFICATE_SIZE; -struct IDARG_IN_OPM_GET_CERTIFICATE; -struct IDARG_IN_OPM_CREATE_PROTECTED_OUTPUT; -struct IDDCX_OPM_GET_RANDOM_NUMBER; -struct IDARG_OUT_OPM_GET_RANDOM_NUMBER; -struct IDDCX_OPM_ENCRYPTED_INITIALIZATION_PARAMETERS; -struct IDARG_IN_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS; -struct IDARG_IN_OPM_GET_INFOMATION; -struct IDDCX_OPM_GET_INFO_PARAMETERS; -struct IDDCX_OPM_REQUESTED_INFORMATION; -struct IDARG_OUT_OPM_GET_INFOMATION; -struct IDDCX_OPM_CONFIGURE_PARAMETERS; -struct IDARG_IN_OPM_CONFIGURE_PROTECTED_OUTPUT; - -#pragma endregion - -#pragma region Driver Callback Definitions - -#pragma region Device Callbacks - -/// -/// Driver DDI function that is called by the OS when an IO control request needs processing by the driver. -/// -typedef -_Function_class_(EVT_IDD_CX_DEVICE_IO_CONTROL) -_IRQL_requires_same_ -VOID -EVT_IDD_CX_DEVICE_IO_CONTROL( - _In_ - WDFDEVICE Device, - _In_ - WDFREQUEST Request, - _In_ - size_t OutputBufferLength, - _In_ - size_t InputBufferLength, - _In_ - ULONG IoControlCode - ); - -typedef EVT_IDD_CX_DEVICE_IO_CONTROL *PFN_IDD_CX_DEVICE_IO_CONTROL; - -/// -/// A driver DDI function that OS calls to request the driver to parse a monitor description into a list of modes -/// the monitor supports -/// -/// Input arguments of function -/// Output arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION( - _In_ - const IDARG_IN_PARSEMONITORDESCRIPTION* pInArgs, - _Out_ - IDARG_OUT_PARSEMONITORDESCRIPTION* pOutArgs - ); - -typedef EVT_IDD_CX_PARSE_MONITOR_DESCRIPTION *PFN_IDD_CX_PARSE_MONITOR_DESCRIPTION; - -#pragma endregion - -#pragma region Adapter Callbacks - -/// -/// A driver DDI that is called by the OS to inform the driver that the adapter initialization has completed. The -/// initialization may have failed, so the driver should check the parameters for the adapter status and handle -/// failures appropriately (possibly by reporting a device failure). -/// -typedef -_Function_class_(EVT_IDD_CX_ADAPTER_INIT_FINISHED) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_ADAPTER_INIT_FINISHED( - _In_ - IDDCX_ADAPTER AdapterObject, - _In_ - const IDARG_IN_ADAPTER_INIT_FINISHED* pInArgs - ); - -typedef EVT_IDD_CX_ADAPTER_INIT_FINISHED *PFN_IDD_CX_ADAPTER_INIT_FINISHED; - -/// -/// A driver DDI that is called by OS to inform the driver of a mode change for monitors on the adapter. -/// The OS always provides the IDDCX_PATH for every connected monitor even if it is not active and the OS -/// indicates which paths have changed. If a path is marked not active then we expect that whole display pipeline for -/// that path to be powered off and no signal is sent to the monitor -/// -/// NOTE : When a new path is committed the driver should program the display pipeline to display a black -/// image until the first frame is ready to be displayed(ie WDDM visibility should be off until -/// first frame is ready to be displayed and then the visibility should be turned on). -/// -/// The handle the driver provides so the OS can reference the adapter when calling the driver -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_ADAPTER_COMMIT_MODES) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_ADAPTER_COMMIT_MODES( - _In_ - IDDCX_ADAPTER AdapterObject, - _In_ - const IDARG_IN_COMMITMODES* pInArgs - ); - -typedef EVT_IDD_CX_ADAPTER_COMMIT_MODES *PFN_IDD_CX_ADAPTER_COMMIT_MODES; - -#pragma endregion - -#pragma region Monitor Callbacks - -/// -/// A driver DDI function that OS calls to request the driver provide the default monitor mode list for the -/// specified monitor. This DDI is called when a monitor without a description is connected. -/// -/// The monitor object that is having default modes generated -/// Input arguments of function -/// Output arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -/// -/// The driver must create at least one monitor mode for the monitor description. -/// -typedef -_Function_class_(EVT_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - const IDARG_IN_GETDEFAULTDESCRIPTIONMODES* pInArgs, - _Out_ - IDARG_OUT_GETDEFAULTDESCRIPTIONMODES* pOutArgs - ); - -typedef EVT_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES *PFN_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES; - -/// -/// A driver DDI function that OS calls to get a list of target modes supported by the driver for a monitor -/// connected to the endpoint. -/// -/// The monitor object whose modes are being queried -/// Input arguments of function -/// Output arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - const IDARG_IN_QUERYTARGETMODES* pInArgs, - _Out_ - IDARG_OUT_QUERYTARGETMODES* pOutArgs - ); - -typedef EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES *PFN_IDD_CX_MONITOR_QUERY_TARGET_MODES; - -/// -/// Driver DDI function that is called by OS inform the driver of a mode change for monitors on the adapter. -/// -/// NOTE : The resolution of the surfaces in the swapchain will always be the same resolution as the target mode set and -/// format will be one of the formats supported by the driver but the format of each acquired buffer may -/// change frame to frame between the formats supported and the driver should check the format of each buffer acquired. -/// -/// The handle the driver provides so the OS can reference the adapter when calling the driver -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - const IDARG_IN_SETSWAPCHAIN* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN *PFN_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN; - -/// -/// Driver DDI function that is called by OS inform the driver that a swapchain associated with a monitor is not -/// valid anymore -/// -/// The monitor whose swap-chain is no longer valid. -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN( - _In_ - IDDCX_MONITOR MonitorObject - ); - -typedef EVT_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN *PFN_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN; - -/// -/// Driver DDI function that is called by OS to returns data received from an I2C device in a monitor -/// -/// A handle to monitor object to send I2C data. -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -/// -/// The data is transmitted to an I2C device in the monitor that is connected to path specified by PathIdx -/// I2CTransmitDataToDisplay is responsible for signaling the I2C start condition, sending the I2C address, sending the -/// data in the buffer, checking for acknowledgments from the receiver, and signaling the stop condition.For details -/// about the I2C bus, see the I2C Bus Specification, published by Philips Semiconductors.The specification defines a -/// protocol for initiating I2C communication, reading and writing bytes over the I2C data line, and terminating I2C -/// communication. -/// -/// I2CTransmitDataToDisplay is required to transmit data to an I2C device that has address 0x6E but is permitted to -/// refuse to transmit data to any I2C device that has a different address. -/// -/// I2CTransmitDataToDisplay is permitted to block if another part of the display driver or graphics hardware is using -/// the specified monitor's I2C bus. It is also permitted to block if the display driver is using the I2C bus to send or -/// receive High-bandwidth Digital Content Protection (HDCP) data. -/// -/// If the display adapter supports HDCP, the I2CTransmitDataToDisplay function must refuse to send data to an I2C device -/// if the device has an I2C address that is used by HDCP. -/// -/// I2CTransmitDataToDisplay must never transmit data to an I2C device on the display adapter.That is, this function can -/// transmit data to an I2C device in a monitor that is connected to the display adapter, but not to an I2C device that -/// is on the display adapter itself. -/// -typedef -_Function_class_(EVT_IDD_CX_MONITOR_I2C_TRANSMIT) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_I2C_TRANSMIT( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - const IDARG_IN_I2C_TRANSMIT* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_I2C_TRANSMIT *PFN_IDD_CX_MONITOR_I2C_TRANSMIT; - -/// -/// Driver DDI function that is called by OS to returns data received from an I2C device in a monitor -/// -/// A handle to monitor object to receive I2C data from. -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -/// -/// The data is received from an I2C device in the monitor that is connected to path specified by PathIdx -/// I2CReceiveDataFromDisplay function is responsible for signaling the I2C start condition, sending the I2C address, -/// receiving the data from the I2C device, sending acknowledgments, and signaling the stop condition. -/// For details about the I2C bus, see the I2C Bus Specification, published by Philips Semiconductors. -/// The specification defines a protocol for initiating I2C communication, reading and writing bytes over the I2C data -/// line, and terminating I2C communication. (This resource may not be available in some languages and countries.) -/// -/// I2CReceiveDataFromDisplay is required to receive data from an I2C device that has address 0x6F but is -/// permitted to refuse to receive data from any I2C device that has a different address. -/// -/// I2CReceiveDataFromDisplay is permitted to block if another part of the display driver or graphics hardware is -/// using the specified monitor's I2C bus. It is also permitted to block if the display driver is using the I2C -/// bus to send or receive High-bandwidth Digital Content Protection (HDCP) data. -/// -/// If the display adapter supports HDCP, I2CReceiveDataFromDisplay must refuse to receive data from an I2C device if the -/// device has an I2C address that is used by HDCP. -/// -/// I2CReceiveDataFromDisplay must never receive data from an I2C device on the display adapter.That is, this function -/// can receive data from an I2C device in a monitor that is connected to the display adapter, but not from an I2C -/// device that is on the display adapter itself. -/// -typedef -_Function_class_(EVT_IDD_CX_MONITOR_I2C_RECEIVE) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_I2C_RECEIVE( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - const IDARG_IN_I2C_RECEIVE* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_I2C_RECEIVE *PFN_IDD_CX_MONITOR_I2C_RECEIVE; - -/// -/// Driver DDI function that is called by OS to set a gamma ramp on the specified monitor -/// -/// This is the context for the monitor this gamma call is intended for -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -/// -/// If the driver implements this DDI then this implies the driver support the gamma functionality -/// -typedef -_Function_class_(EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - const IDARG_IN_SET_GAMMARAMP* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP *PFN_IDD_CX_MONITOR_SET_GAMMA_RAMP; - -/// -/// Driver DDI function that is called by OS to get the size of a OPM certificate -/// -/// This is the context for the adapter this OPM call is intended for -/// Input arguments of function -/// Output arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_GET_CERTIFICATE_SIZE) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_GET_CERTIFICATE_SIZE( - _In_ - IDDCX_ADAPTER AdapterObject, - _In_ - const IDARG_IN_OPM_GET_CERTIFICATE_SIZE* pInArgs, - _Out_ - IDARG_OUT_OPM_GET_CERTIFICATE_SIZE* pOutArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_GET_CERTIFICATE_SIZE *PFN_IDD_CX_MONITOR_OPM_GET_CERTIFICATE_SIZE; - -/// -/// Driver DDI function that is called by OS to get a OPM certificate -/// -/// This is the context for the adapter this OPM call is intended for -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_GET_CERTIFICATE) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_GET_CERTIFICATE( - _In_ - IDDCX_ADAPTER AdapterObject, - _In_ - const IDARG_IN_OPM_GET_CERTIFICATE* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_GET_CERTIFICATE *PFN_IDD_CX_MONITOR_OPM_GET_CERTIFICATE; - -/// -/// Driver DDI function that is called by OS to create a OPM protected output context -/// -/// This is the context for the monitor this OPM context should be created on -/// This is the context for the OPM context this call is for -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_CREATE_PROTECTED_OUTPUT) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_CREATE_PROTECTED_OUTPUT( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - IDDCX_OPMCTX OpmCxtObject, - _In_ - const IDARG_IN_OPM_CREATE_PROTECTED_OUTPUT* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_CREATE_PROTECTED_OUTPUT *PFN_IDD_CX_MONITOR_OPM_CREATE_PROTECTED_OUTPUT; - -/// -/// Driver DDI function that is called by OS get a OPM random number -/// -/// This is the context for the OPM context this call is for -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_GET_RANDOM_NUMBER) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_GET_RANDOM_NUMBER( - _In_ - IDDCX_OPMCTX OpmCxtObject, - _Out_ - IDARG_OUT_OPM_GET_RANDOM_NUMBER* pOutArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_GET_RANDOM_NUMBER *PFN_IDD_CX_MONITOR_OPM_GET_RANDOM_NUMBER; - -/// -/// Driver DDI function that is called by OS to set signing key and sequence number -/// -/// This is the context for the OPM context this call is for -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS( - _In_ - IDDCX_OPMCTX OpmCxtObject, - _In_ - const IDARG_IN_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS *PFN_IDD_CX_MONITOR_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS; - -/// -/// Driver DDI function that is called by OS to get OPM information -/// -/// This is the context for the OPM context this call is for -/// Input arguments of function -/// Output arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_GET_INFOMATION) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_GET_INFOMATION( - _In_ - IDDCX_OPMCTX OpmCxtObject, - _In_ - const IDARG_IN_OPM_GET_INFOMATION* pInArgs, - _Out_ - IDARG_OUT_OPM_GET_INFOMATION* pOutArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_GET_INFOMATION *PFN_IDD_CX_MONITOR_OPM_GET_INFOMATION; - -/// -/// Driver DDI function that is called by OS to configure the protected output -/// -/// This is the context for the OPM context this call is for -/// Input arguments of function -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_CONFIGURE_PROTECTED_OUTPUT) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_CONFIGURE_PROTECTED_OUTPUT( - _In_ - IDDCX_OPMCTX OpmCxtObject, - _In_ - const IDARG_IN_OPM_CONFIGURE_PROTECTED_OUTPUT* pInArgs - ); - -typedef EVT_IDD_CX_MONITOR_OPM_CONFIGURE_PROTECTED_OUTPUT *PFN_IDD_CX_MONITOR_OPM_CONFIGURE_PROTECTED_OUTPUT; - -/// -/// Driver DDI function that is called by OS destroy the protected output context -/// -/// This is the context for the OPM context this call is for -/// If the routine succeeds it return STATUS_SUCCESS otherwise an appropriate error code -typedef -_Function_class_(EVT_IDD_CX_MONITOR_OPM_DESTROY_PROTECTED_OUTPUT) -_IRQL_requires_same_ -NTSTATUS -EVT_IDD_CX_MONITOR_OPM_DESTROY_PROTECTED_OUTPUT( - _In_ - IDDCX_OPMCTX OpmCxtObject - ); - -typedef EVT_IDD_CX_MONITOR_OPM_DESTROY_PROTECTED_OUTPUT *PFN_IDD_CX_MONITOR_OPM_DESTROY_PROTECTED_OUTPUT; - -#pragma endregion - -#pragma endregion - -#pragma region Structure Definitions - -/// -/// Holds per-driver Indirect Display information. Reserved for use by the system. -/// -typedef struct IDD_DRIVER_GLOBALS -{ - ULONG Reserved; -} IDD_DRIVER_GLOBALS, *PIDD_DRIVER_GLOBALS; - -/// -/// Contains information and callbacks for WDFDEVICE intitialization using the Indirect Display class extension. -/// -struct IDD_CX_CLIENT_CONFIG -{ - /// - /// The total size of the structure. - /// - ULONG Size; - - PFN_IDD_CX_DEVICE_IO_CONTROL EvtIddCxDeviceIoControl; - PFN_IDD_CX_PARSE_MONITOR_DESCRIPTION EvtIddCxParseMonitorDescription; - - PFN_IDD_CX_ADAPTER_INIT_FINISHED EvtIddCxAdapterInitFinished; - PFN_IDD_CX_ADAPTER_COMMIT_MODES EvtIddCxAdapterCommitModes; - - PFN_IDD_CX_MONITOR_GET_DEFAULT_DESCRIPTION_MODES EvtIddCxMonitorGetDefaultDescriptionModes; - PFN_IDD_CX_MONITOR_QUERY_TARGET_MODES EvtIddCxMonitorQueryTargetModes; - PFN_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN EvtIddCxMonitorAssignSwapChain; - PFN_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN EvtIddCxMonitorUnassignSwapChain; - PFN_IDD_CX_MONITOR_I2C_TRANSMIT EvtIddCxMonitorI2CTransmit; - PFN_IDD_CX_MONITOR_I2C_RECEIVE EvtIddCxMonitorI2CReceive; - PFN_IDD_CX_MONITOR_SET_GAMMA_RAMP EvtIddCxMonitorSetGammaRamp; - - PFN_IDD_CX_MONITOR_OPM_GET_CERTIFICATE_SIZE EvtIddCxMonitorOPMGetCertificateSize; - PFN_IDD_CX_MONITOR_OPM_GET_CERTIFICATE EvtIddCxMonitorOPMGetCertificate; - PFN_IDD_CX_MONITOR_OPM_CREATE_PROTECTED_OUTPUT EvtIddCxMonitorOPMCreateProtectedOutput; - PFN_IDD_CX_MONITOR_OPM_GET_RANDOM_NUMBER EvtIddCxMonitorOPMGetRandomNumber; - PFN_IDD_CX_MONITOR_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS EvtIddCxMonitorOPMSetSigningKeyAndSequenceNumbers; - PFN_IDD_CX_MONITOR_OPM_GET_INFOMATION EvtIddCxMonitorOPMGetInformation; - PFN_IDD_CX_MONITOR_OPM_CONFIGURE_PROTECTED_OUTPUT EvtIddCxMonitorOPMConfigureProtectedOutput; - PFN_IDD_CX_MONITOR_OPM_DESTROY_PROTECTED_OUTPUT EvtIddCxMonitorOPMDestroyProtectedOutput; -}; - -/// -/// Structure used to describe a version -/// -struct IDDCX_ENDPOINT_VERSION -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The major version defined by the driver - /// - UINT MajorVer; - - /// - /// The minor version defined by the driver - /// - UINT MinorVer; - - /// - /// The build number defined by the driver - /// - UINT Build; - - /// - /// The SKU type defined by the driver - /// - UINT64 SKU; -}; - -/// -/// Structure used to provide diagnostics information about an endpoint -/// -struct IDDCX_ENDPOINT_DIAGNOSTIC_INFO -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Describes the type of link the video data is being transmitted over - /// - IDDCX_TRANSMISSION_TYPE TransmissionType; - - /// - /// The friendly name of the endpoint if one exists, this is applicable if the user can give the device - /// a name, should be NULL if friendly name does not exist - /// - PCWSTR pEndPointFriendlyName; - - /// - /// The model name of the endpoint, must be a non - empty string - /// - PCWSTR pEndPointModelName; - - /// - /// The manufacture name of the endpoint, must be a non - empty string - /// - PCWSTR pEndPointManufacturerName; - - /// - /// Pointer to version info for the endpoint hardware - /// - IDDCX_ENDPOINT_VERSION* pHardwareVersion; - - /// - /// Pointer to version info for the endpoint hardware - /// - IDDCX_ENDPOINT_VERSION* pFirmwareVersion; - - /// - /// Indicates how gamma is implemented - /// - IDDCX_FEATURE_IMPLEMENTATION GammaSupport; -}; - -/// -/// Used to define the capabilities of an adapter -/// -struct IDDCX_ADAPTER_CAPS -{ - /// - /// Total size of the structure - /// - UINT Size; - - IDDCX_ADAPTER_FLAGS Flags; - - /// - /// This value represents the total display bandwidth for the adapter, each mode the driver reports to - /// the OS also has a display pipeline rate associated with it and the OS will ensure that the combined - /// display pipeline rate of all the active modes will never exceed this value. The units the driver uses - /// is up to the driver. - /// - UINT64 MaxDisplayPipelineRate; - - /// - /// Indicates the maximum number of monitors that can be connected at the same time - /// - UINT MaxMonitorsSupported; - - /// - /// Endpoint diagnostics information, none of this is used for runtime OS decision but used for telemetry - /// - IDDCX_ENDPOINT_DIAGNOSTIC_INFO EndPointDiagnostics; - - /// - /// The number of frames to request after the desktop goes idle if the driver's encoder requires multiple frames - /// to continue improving quality. - /// - UINT StaticDesktopReencodeFrameCount; -}; - -struct IDARG_IN_ADAPTER_INIT -{ - /// - /// The device that will be hosting this WDDM adapter object. - /// - WDFDEVICE WdfDevice; - - /// - /// [in] Adapter capabilities - /// - IDDCX_ADAPTER_CAPS* pCaps; - - /// - /// [in, optional] Object attributes that are used to initialize the WDF adapter object. - /// - PWDF_OBJECT_ATTRIBUTES ObjectAttributes; -}; - -struct IDARG_OUT_ADAPTER_INIT -{ - /// - /// [out] Handle to the adapter that the driver can use to identify this adapter when calling OS functions. - /// - IDDCX_ADAPTER AdapterObject; -}; - -struct IDARG_IN_ADAPTER_INIT_FINISHED -{ - NTSTATUS AdapterInitStatus; -}; - -struct IDDCX_MONITOR_DESCRIPTION -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Type of this monitor description - /// - IDDCX_MONITOR_DESCRIPTION_TYPE Type; - - /// - /// The size of the monitor description data - /// - UINT DataSize; - - /// - /// Pointer to the monitor description data - /// - _Field_size_full_(DataSize) PVOID pData; -}; - -/// -/// Used to specify information about a monitor -/// -struct IDDCX_MONITOR_INFO -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The is the monitor connector type of the monitor - /// - DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY MonitorType; - - /// - /// This is a zero based unique identifier for this connector, it should be unique for this adapter and the value should - /// not change for this connector across system reboot or driver upgrade. - /// The value has to be between 0 and (IDDCX_ADAPTER_CAPS.MaxMonitorsSupported-1) - /// - UINT ConnectorIndex; - - /// - /// Pointer the monitor description for the monitor, if the monitor does not have any description data this should be set to NULL - /// - IDDCX_MONITOR_DESCRIPTION MonitorDescription; - - /// - /// Container Id of the monitor being connected, if any device is also inside the monitor (eg audio, touch etc) then - /// those device should all have the same container id. - /// - GUID MonitorContainerId; -}; - -struct IDARG_IN_MONITORCREATE -{ - PWDF_OBJECT_ATTRIBUTES ObjectAttributes; - - /// - /// [in] Pointer to the information about this monitor - /// - IDDCX_MONITOR_INFO* pMonitorInfo; -}; - -struct IDARG_OUT_MONITORCREATE -{ - /// - /// [out] Handle the driver can use to identify this monitor when calling OS functions - /// - IDDCX_MONITOR MonitorObject; -}; - -struct IDARG_OUT_MONITORARRIVAL -{ - /// - /// Luid of the adapter where this monitor is exposed to the OS - /// NOTE : There are no API/DDI calls the driver can do with this info it's only use is to pass to companion - /// applications so they can identify the monitor they control - /// - LUID OsAdapterLuid; - - /// - /// DMM VidPn target id of the target this monitor is exposed to the OS - /// NOTE : There are no API/DDI calls the driver can do with this info it's only use is to pass to companion - /// applications so they can identify the monitor they control - /// NOTE : Although this value is related to the IDDCX_MONITOR_INFO.ConnectorIndex passed by the driver - /// the OS will perform internal mapping between the two that will change is future release so the driver should not take - /// any dependences on this mapping and hence should use OsAdapterLuid & OsTargetId and not IDDCX_MONITOR_INFO.ConnectorIndex - /// - UINT OsTargetId; -}; - -struct IDDCX_MONITOR_MODE -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Where the driver derived this mode from - /// - IDDCX_MONITOR_MODE_ORIGIN Origin; - - /// - /// This is the details of the Monitor mode.Note that AdditionalSignalInfo.vSyncFreqDivider has to have a zero value - /// - DISPLAYCONFIG_VIDEO_SIGNAL_INFO MonitorVideoSignalInfo; -}; - -struct IDARG_IN_PARSEMONITORDESCRIPTION -{ - /// - /// [in] Monitor description the driver should decode - /// - IDDCX_MONITOR_DESCRIPTION MonitorDescription; - - /// - /// [in] The number of monitor modes the pMonitorModes buffer being passed into the driver can hold. - /// A value of zero indicates that the driver should not copy the monitor mode list - /// into the provide buffer but should set the output buffer size to the size required - /// - UINT MonitorModeBufferInputCount; - - /// - /// [out] Pointer to buffer that driver should copy the monitor modes to if the value is non-NULL. - /// If value is NULL then driver should not copy any data and should just set the value - /// IDARG_OUT_PARSEMONITORDESCRIPTION.MonitorModeBufferOutputCount to indicate the size of buffer - /// required to store the modes - /// - _Field_size_opt_(MonitorModeBufferInputCount) IDDCX_MONITOR_MODE* pMonitorModes; -}; - -#define NO_PREFERRED_MODE 0xffffffff - -struct IDARG_OUT_PARSEMONITORDESCRIPTION -{ - /// - /// [out] If IDARG_IN_PARSEMONITORDESCRIPTION.pMonitorModes was NULL then driver should - /// set this to the number of monitor modes the driver would generate for the specified monitor - /// description. - /// If IDARG_IN_PARSEMONITORDESCRIPTION.pMonitorModes was non-NULL then this is the count of the - /// monitor modes that the driver copied to that buffer - /// - UINT MonitorModeBufferOutputCount; - - /// - /// [out] Index into the pMonitorModes array of the preferred mode monitor mode, a value of NO_PREFERRED_MODE - /// indicates that there is no preferred monitor mode - /// - UINT PreferredMonitorModeIdx; -}; - -struct IDARG_IN_GETDEFAULTDESCRIPTIONMODES -{ - /// - /// [in] The number of monitor modes the pDefaultsMonitorModes buffer being passed into the driver can hold. - /// A value of zero indicates that the driver should not copy the monitor mode list - /// into the provide buffer but should set the output buffer size to the size required - /// - UINT DefaultMonitorModeBufferInputCount; - - /// - /// [out] Pointer to buffer that driver should copy the monitor modes to if the value is non-NULL. - /// If value is NULL then driver should not copy any data and should just set the value - /// IDARG_OUT_GETDEFAULTDESCRIPTIONMODES.DefaultMonitorModeBufferOutputCount to indicate the size of buffer - /// required to store the modes - /// - _Field_size_opt_(DefaultMonitorModeBufferInputCount) IDDCX_MONITOR_MODE* pDefaultMonitorModes; -}; - -struct IDARG_OUT_GETDEFAULTDESCRIPTIONMODES -{ - /// - /// [out] If IDARG_IN_PARSEMONITORDESCRIPTION.pDefaultMonitorModes was NULL then driver should - /// set this to the number of monitor modes the driver would generate for the specified monitor - /// description. - /// If IDARG_IN_PARSEMONITORDESCRIPTION.pDefaultMonitorModes was non-NULL then this is the count of the - /// monitor modes that the driver copied to that buffer - /// - UINT DefaultMonitorModeBufferOutputCount; - - /// - /// [out] Index into the pMonitorModes array of the preferred mode monitor mode, a value of NO_PREFERRED_MODE - /// indicates that there is no preferred monitor mode - /// - UINT PreferredMonitorModeIdx; -}; - -/// -/// Used to describe a target mode -/// -struct IDDCX_TARGET_MODE -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// This is the details of the target mode.Note that AdditionalSignalInfo.vSyncFreqDivider has to have a zero value - /// NOTE : DISPLAYCONFIG_VIDEO_SIGNAL_INFO.vSyncFreq is the Vsync rate between the Indirect Display device and the - /// connected monitor. DISPLAYCONFIG_VIDEO_SIGNAL_INFO.AdditionalSignalInfo.vSyncFreqDivider is used to - /// calculate the rate at which the OS will update the desktop image. - /// The desktop update rate will calculate be : - /// DISPLAYCONFIG_VIDEO_SIGNAL_INFO.vSyncFreq / DISPLAYCONFIG_VIDEO_SIGNAL_INFO.AdditionalSignalInfo.vSyncFreqDivider - /// DISPLAYCONFIG_VIDEO_SIGNAL_INFO.AdditionalSignalInfo.vSyncFreqDivider cannot be zero - /// - DISPLAYCONFIG_TARGET_MODE TargetVideoSignalInfo; - - /// - /// This is the display pipeline bandwidth required for this mode. - /// - UINT64 RequiredBandwidth; -}; - -struct IDARG_IN_QUERYTARGETMODES -{ - /// - /// [in] The monitor description, note this may not be the monitor description the driver originally - /// provided in the monitor arrival call, the driver needs to use this monitor description - /// when processing this DDI. This allows for monitor description to be updated by OS. - /// - IDDCX_MONITOR_DESCRIPTION MonitorDescription; - - /// - /// [in] The number of target modes the pTargetModes buffer be passed to the driver can hold. - /// If the value is zero then the driver should not copy the target mode list to pTargetModes - /// - UINT TargetModeBufferInputCount; - - /// - /// [out] Pointer to buffer driver should copy the target modes it supports for this monitor - /// - _Field_size_(TargetModeBufferInputCount) IDDCX_TARGET_MODE* pTargetModes; -}; - -struct IDARG_OUT_QUERYTARGETMODES -{ - /// - /// [out] Driver should set this to the number of target modes the driver copied to the buffer - /// if the OS provided one otherwise the number of target modes it would have copied if the OS - /// had provided a buffer - /// - UINT TargetModeBufferOutputCount; -}; - -struct IDARG_IN_UPDATEMODES -{ - /// - /// Indicates the reason why the driver is updating the modes - /// - IDDCX_UPDATE_REASON Reason; - - /// - /// [in] Number of target modes in the pTargetModes buffer. This cannot be zero - /// - UINT TargetModeCount; - - /// - /// [in] Pointer to buffer driver should copy the target modes it supports for this monitor - /// - _Field_size_(TargetModeCount) IDDCX_TARGET_MODE* pTargetModes; -}; - -struct IDARG_IN_MAXDISPLAYPIPELINERATE -{ - /// - /// Indicates the reason why the driver is updating the rate - /// - IDDCX_UPDATE_REASON Reason; - - /// - /// This is the new value for IDDCX_ADAPTER_CAPS.MaxDisplayPipelineRate - /// - UINT64 MaxDisplayPipelineRate; -}; - -/// -/// Used to describe the mode that should be set on a given monitor -/// -struct IDDCX_PATH -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The handle the driver provides to identify the monitor this path is targeted at - /// - IDDCX_MONITOR MonitorObject; - - /// - /// Contains flags for this path, like the path's active state and whether it changed. - /// - IDDCX_PATH_FLAGS Flags; - - /// - /// This is the details of the target mode.Note that AdditionalSignalInfo.vSyncFreqDivider has to have a zero value - /// NOTE : DISPLAYCONFIG_VIDEO_SIGNAL_INFO.vSyncFreq is the Vsync rate between the Indirect Display device and the - /// connected monitor. DISPLAYCONFIG_VIDEO_SIGNAL_INFO.AdditionalSignalInfo.vSyncFreqDivider is used to - /// calculate the rate at which the OS will update the desktop image. - /// The desktop update rate will calculate be : - /// DISPLAYCONFIG_VIDEO_SIGNAL_INFO.vSyncFreq / DISPLAYCONFIG_VIDEO_SIGNAL_INFO.AdditionalSignalInfo.vSyncFreqDivider - /// DISPLAYCONFIG_VIDEO_SIGNAL_INFO.AdditionalSignalInfo.vSyncFreqDivider cannot be zero - /// - DISPLAYCONFIG_VIDEO_SIGNAL_INFO TargetVideoSignalInfo; -}; - -struct IDARG_IN_COMMITMODES -{ - /// - /// [in] The number of paths in the pPaths array - /// - UINT PathCount; - - /// - /// [in] Point to the array of paths to be committed - /// - _Field_size_(PathCount) IDDCX_PATH* pPaths; -}; - -/// -/// Structure used to describe the cursor capabilities for a given path. -/// -struct IDDCX_CURSOR_CAPS -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Indicates what level of support the driver has for XOR masks in the 32-bit masked color cursor format. - /// NOTE : The OS will first convert any monochrome cursor to a color mask cursor. - /// - IDDCX_XOR_CURSOR_SUPPORT ColorXorCursorSupport; - - /// - /// Indicates if the adapter supports the 32-bit alpha cursor format. Most cursors are alpha format. - /// - BOOL AlphaCursorSupport; - - /// - /// The maximum width supported for all supported cursor types - /// - UINT MaxX; - - /// - /// The maximum height support for all cursor types - /// - UINT MaxY; -}; - -struct IDARG_IN_SETUP_HWCURSOR -{ - /// - /// [in] Cursor information for this path - /// - IDDCX_CURSOR_CAPS CursorInfo; - - /// - /// [in] An event handle that will be triggered when new cursor data is available - /// - HANDLE hNewCursorDataAvailable; -}; - -/// -/// Describes the cursor shape -/// -struct IDDCX_CURSOR_SHAPE_INFO -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Unique id for the current cursor image, this is incremented each time a cursor image is set (even if that image has been set before). - /// This is used to check if the current cursor image the driver has cached has changed and cannot be used in any way to allow caching - /// for animated cursor sequences. - /// - UINT ShapeId; - - /// - /// Indicates the type of cursor data written to the cursor shape buffer - /// - IDDCX_CURSOR_SHAPE_TYPE CursorType; - - /// - /// Width in pixels of the cursor shape written to the shape buffer - /// - UINT Width; - - /// - /// Height in pixels of the cursor shape written to the shape buffer - /// - UINT Height; - - /// - /// Pitch in bytes of the cursor shape written to the shape buffer - /// - UINT Pitch; - - /// - /// X position of the cursor hotspot relative to the top-left of the cursor - /// - UINT XHot; - - /// - /// Y position of the cursor hotspot relative to the top-left of the cursor - /// - UINT YHot; -}; - -struct IDARG_IN_QUERY_HWCURSOR -{ - /// - /// [in] The shape id of the last cursor shape the driver received for this monitor, this is compared against the - /// latest shape the OS has and the new shape is only copied to the buffer it OS version has been updated since - /// last image driver received - /// - DWORD LastShapeId; - - /// - /// [in] Size of the cursor shape buffer pShapeBuffer - /// - UINT ShapeBufferSizeInBytes; - - /// - /// [out] Buffer provided by driver that the OS will copy any new cursor image data into - /// - _Field_size_bytes_(ShapeBufferSizeInBytes) PBYTE pShapeBuffer; -}; - -struct IDARG_OUT_QUERY_HWCURSOR -{ - /// - /// [out] Indicates if the cursor is visible or not. - /// - BOOL IsCursorVisible; - - /// - /// [out] If the cursor is viable then this is the screen co-ordinates of the top-left hand pixel in the cursor image. - /// NOTE : This can be negative eg hot-spot in center of cursor and is placed in top-left of screen - /// - INT X; - - /// - /// [out] If the cursor is viable then this is the screen co-ordinates of the top-left hand pixel in the cursor image. - /// NOTE : This can be negative eg hot-spot in center of cursor and is placed in top-left of screen - /// - INT Y; - - /// - /// [out] Indicates if the cursor shape has been updated since the last time the driver called, if it has been updated - /// then the OS updated the CursorShapeInfo structure and also copied the new cursor image data into the - /// IDARG_IN_QUERY_HWCURSOR.pShapeBuffer buffer - /// - BOOL IsCursorShapeUpdated; - - /// - /// [out] If cursor visible then OS will copy the current cursor info into this buffer, if cursor is not visible then - /// OS will zero this structure - /// - IDDCX_CURSOR_SHAPE_INFO CursorShapeInfo; -}; - -struct IDARG_IN_SETSWAPCHAIN -{ - /// - /// [in] Handle to indirect swapchain that will be used to pass the desktop image to the driver - /// for processing, transmission and display - /// - IDDCX_SWAPCHAIN hSwapChain; - - /// - /// [in] Handle to auto reset event that is signaled when new image to encode is ready - /// - HANDLE hNextSurfaceAvailable; - - /// - /// [In] Luid of the adapter were the desktop image was rendered - /// - LUID RenderAdapterLuid; -}; - -/// -/// Per frame meta-data -/// -struct IDDCX_METADATA -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Presentation frame number of this surface, if the frame number is the same as the previous frame then - /// that indicates that there has not been any image updates from the previous frame and is an opportunity - /// for the driver to re-encode the desktop image again to increase the visual quality. - /// Once there are no more updates the OS will present the same frame IDDCX_ADAPTER_CAPS.StaticDesktopReencodeFrameCount - /// times (a presentation internals) and then stop presenting until the next update - /// - UINT PresentationFrameNumber; - - /// - /// Number of dirty rects for this frame, call GetDirtyRects() to get the dirty rects - /// NOTE : A zero DirtyRectCount and MoveRegionCount value indicates there were no desktop updates and the - /// PresentationFrameNumber is the same as last frame - /// - UINT DirtyRectCount; - - /// - /// Number of move regions in this frame, call GetMoveRegions() to get the move regions - /// NOTE : A zero DirtyRectCount and MoveRegionCount value indicates there were no desktop updates and the - /// PresentationFrameNumber is the same as last frame - /// - UINT MoveRegionCount; - - /// - /// Indicates if the provided surface is hardware protected or not - /// - BOOL HwProtectedSurface; - - /// - /// System QPC time of when this surface should be displayed on the indirect display monitor - /// - UINT64 PresentDisplayQPCTime; - - /// - /// DX surface that contains the image to encode and transmit. - /// The driver can use this DX surface anytime until ReleaseAndAcquire is called again - /// NOTE : This surface is always a A8R8G8B8 formated surface - /// - IDXGIResource* pSurface; -}; - -struct IDARG_IN_SWAPCHAINSETDEVICE -{ - /// - /// The DXGI device used to process swap-chain frames. - /// - IDXGIDevice* pDevice; -}; - -struct IDARG_OUT_RELEASEANDACQUIREBUFFER -{ - /// - /// [out] Per-frame metadata and frame information - /// - IDDCX_METADATA MetaData; -}; - -struct IDARG_IN_GETDIRTYRECTS -{ - /// - /// [in] Number of dirty rects in the pDirtyRects array - /// - UINT DirtyRectInCount; - - /// - /// [out] Pointer to the buffer where the OS can copy the dirty rects that indicate which parts of the surface have been - /// changed since the last present. - /// - _Field_size_full_(DirtyRectCount) RECT* pDirtyRects; -}; - - -struct IDARG_OUT_GETDIRTYRECTS -{ - /// - /// [out] Number of dirty rects the OS copied into the pDirtyRects array - /// - UINT DirtyRectOutCount; -}; - -/// -/// Describes a move region within a surface -/// -struct IDDCX_MOVEREGION -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The location within the surface of the top left of the source rect, the source rect size is the same as the - /// destination rect size - /// - POINT SourcePoint; - - /// - /// Defines the destination rect of the move - /// - RECT DestRect; -}; - -struct IDARG_IN_GETMOVEREGIONS -{ - /// - /// [in] Number of move regions in the pMoveRegions array - /// - UINT MoveRegionInCount; - - /// - /// [out] Pointer to the buffer where the OS can copy the move regions - /// - _Field_size_full_(MoveRegionInCount) IDDCX_MOVEREGION* pMoveRegions; -}; - - -struct IDARG_OUT_GETMOVEREGIONS -{ - /// - /// [out] Number of move regions the OS copied into the pMoveRegions array - /// - UINT MoveRegionOutCount; -}; - -/// -/// Defines a single step of the frame processing -/// -struct IDDCX_FRAME_STATISTICS_STEP -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The type of frame processing step - /// - IDDCX_FRAME_STATISTICS_STEP_TYPE Type; - - /// - /// Provides the system QPC time of the step - /// - UINT64 QpcTime; - - /// - /// When driver defined processing part is used then driver can store additional data here - /// - UINT32 Data[2]; -}; - -/// -/// Holds the frame processing statics for a whole frame -/// -struct IDDCX_FRAME_STATISTICS -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The frame number provided in the ReleaseAndAcquireBuffer call - /// - UINT PresentationFrameNumber; - - /// - /// Indicates the overall status of processing this frame - /// - IDDCX_FRAME_STATUS FrameStatus; - - /// - /// Zero based number to indicates the number of times the same frame has been encoded and sent. - /// Re-encodes can be the result of the OS providing the sane frame (and frame number) to the driver to - /// encode or the driver having to re-encode outside of the normal OS presentation to satisfy the - /// protocol - /// - UINT ReEncodeNumber; - - /// - /// Indicates the number of slices the driver processes the frame in, if slices are not used - /// then this should be set to the value one - /// - UINT FrameSliceTotal; - - /// - /// Indicates the zero based slice number being reported, if slicing is not supported then the driver - /// should always set this to the value zero - /// - UINT CurrentSlice; - - /// - /// System Qpc time the driver acquired the buffer from the OS - /// - UINT64 FrameAcquireQpcTime; - - /// - /// The size of the frame step array pointed to by pFrameParts - /// - UINT FrameProcessingStepsCount; - - /// - /// Array of frame processing steps the driver performed - /// - _Field_size_(FrameProcessingStepsCount) IDDCX_FRAME_STATISTICS_STEP* pFrameProcessingStep; - - /// - /// Marks the time when the driver started transmission for this slice to the device - /// NOTE : This marks the time the driver started calling the transmit API's not when the data actually starts being transmitted - /// - UINT64 SendStartQpcTime; - - /// - /// Marks the time when the driver started transmission for this slice to the device - /// NOTE : This marks the time the driver started calling the transmit API's not when the data actually starts being transmitted - /// - UINT64 SendStopQpcTime; - - /// - /// Marks the time when the send was reported as complete by the OS - /// This is a optional time stamp that can be used if the driver uses asynchronous transmit API and uses a completion routine - /// in the event the driver does not have a asynchronous completion routine should set this value to zero - /// - UINT64 SendCompleteQpcTime; - - IDDCX_FRAME_STATISTICS_FLAGS Flags; - - /// - /// The total number of pixels processed in this frame - /// - UINT ProcessedPixelCount; - - /// - /// Total size of the data send to device for this frame, this includes all the slices - /// - UINT FrameSizeInBytes; -}; - -/// -/// Either IDDCX_SWAPCHAIN is a handle so we know when it is invalid or we have a driver callback -/// when the swapchain is destroyed so driver knows not to call this callback. -/// Need this resolve for the other swapchain callbacks as well -/// -struct IDARG_IN_REPORTFRAMESTATISTICS -{ - /// - /// [in] Frame statics being reported - /// - IDDCX_FRAME_STATISTICS FrameStatistics; -}; - -struct IDARG_IN_I2C_TRANSMIT -{ - /// - /// [in] The address of the I2C device from which data will be transmitted - /// - UINT SevenBitI2CAddress; - - /// - /// [in] The size, in bytes, of the buffer pointed to by pData, this parameter must be between 1 and 64, inclusive - /// - UINT DataSizeInBytes; - - /// - /// [in] A pointer to a buffer that holds the data to be transmitted - /// - _Field_size_full_(DataSizeInBytes) PVOID pData; -}; - -struct IDARG_IN_SET_GAMMARAMP -{ - /// - /// [in] The type of gamma ramp being set - /// - IDDCX_GAMMARAMP_TYPE Type; - - /// - /// [in] Size in bytes of the provided gamma ramp data. Set to zero for IDDCX_GAMMARAMP_TYPE_DEFAULT - /// - UINT GammaRampSizeInBytes; - - /// - /// [in] Pointer to gamma ramp data to set. Set to NULL for IDDCX_GAMMARAMP_TYPE_DEFAULT - /// - _Field_size_bytes_opt_(DataSizeInBytes) PVOID pGammaRampData; -}; - -struct IDARG_IN_I2C_RECEIVE -{ - /// - /// [in] The address of the I2C device from which data will be received - /// - UINT SevenBitI2CAddress; - - /// - /// [in] Flags for the receive operation - /// - UINT Flags; - - /// - /// [in] The size, in bytes, of the buffer pointed to by pData - /// - UINT DataSizeInBytes; - - /// - /// [out] A pointer to a buffer that receives the data. - /// - _Field_size_full_(DataSizeInBytes) PVOID pData; -}; - -struct IDARG_IN_OPM_GET_CERTIFICATE_SIZE -{ - /// - /// [in] Type of certificate the size request is for - /// - OPM_VIDEO_OUTPUT_SEMANTICS CertificateType; -}; - -struct IDARG_OUT_OPM_GET_CERTIFICATE_SIZE -{ - /// - /// [out] Size of certificate - /// - UINT CertificateSize; -}; - -struct IDARG_IN_OPM_GET_CERTIFICATE -{ - /// - /// [in] Type of certificate the size request is for - /// - OPM_VIDEO_OUTPUT_SEMANTICS CertificateType; - - /// - /// [in] Size of the buffer provided for the driver to copy the certificate to - /// - UINT CertificateBufferSizeInBytes; - - /// - /// [out] A pointer to a buffer that the driver copies the certificate to. - /// - _Field_size_full_(CertificateBufferSizeInBytes) PVOID pCertificate; -}; - -struct IDARG_IN_OPM_CREATE_PROTECTED_OUTPUT -{ - /// - /// [in] Type of semantics for this context - /// - OPM_VIDEO_OUTPUT_SEMANTICS VideoOutputSemantics; -}; - -struct IDDCX_OPM_GET_RANDOM_NUMBER -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The random number the driver generated - /// - OPM_RANDOM_NUMBER RandomNumber; -}; - -struct IDARG_OUT_OPM_GET_RANDOM_NUMBER -{ - /// - /// [out] The random number the driver generated - /// - IDDCX_OPM_GET_RANDOM_NUMBER RandomNumber; -}; - -struct IDDCX_OPM_ENCRYPTED_INITIALIZATION_PARAMETERS -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Initialization parameters - /// - OPM_ENCRYPTED_INITIALIZATION_PARAMETERS EncryptedParameters; -}; - -struct IDARG_IN_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS -{ - /// - /// [in] Initialization parameters - /// - IDDCX_OPM_ENCRYPTED_INITIALIZATION_PARAMETERS EncryptedParameters; -}; - -struct IDDCX_OPM_GET_INFO_PARAMETERS -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Parameters for the get information request - /// - OPM_GET_INFO_PARAMETERS GetInfoParameters; -}; - -struct IDARG_IN_OPM_GET_INFOMATION -{ - /// - /// [in] Parameters for the get information request - /// - IDDCX_OPM_GET_INFO_PARAMETERS GetInfoParameters; -}; - -struct IDDCX_OPM_REQUESTED_INFORMATION -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// The information that was requested - /// - OPM_REQUESTED_INFORMATION RequestedInformation; -}; - -struct IDARG_OUT_OPM_GET_INFOMATION -{ - /// - /// [out] The information that was requested - /// - IDDCX_OPM_REQUESTED_INFORMATION RequestedInformation; -}; - -struct IDDCX_OPM_CONFIGURE_PARAMETERS -{ - /// - /// Total size of the structure - /// - UINT Size; - - /// - /// Configuration parameters - /// - OPM_CONFIGURE_PARAMETERS ConfigParameters; -}; - -struct IDARG_IN_OPM_CONFIGURE_PROTECTED_OUTPUT -{ - /// - /// [in] Configuration parameters - /// - IDDCX_OPM_CONFIGURE_PARAMETERS ConfigParameters; - - /// - /// [in] Size of additional parameter buffer - /// - UINT AdditionalParametersSizeInBytes; - - /// - /// [in] A pointer to a buffer that the driver copies the certificate to. - /// - _Field_size_full_(AdditionalParametersSizeInBytes) PVOID pAdditionalParameters; -}; - -#pragma endregion - -#pragma region Structure Initialization - -VOID -FORCEINLINE -IDD_CX_CLIENT_CONFIG_INIT( - _Out_ IDD_CX_CLIENT_CONFIG* Config - ) -{ - RtlZeroMemory(Config, sizeof(IDD_CX_CLIENT_CONFIG)); - Config->Size = sizeof(IDD_CX_CLIENT_CONFIG); -} - -#pragma endregion - -#pragma region Indirect Display APIs - -// -// IDD Function: IddCxDeviceInitConfig -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXDEVICEINITCONFIG)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _Inout_ - PWDFDEVICE_INIT DeviceInit, - _In_ - CONST IDD_CX_CLIENT_CONFIG* Config - ); - -/// -/// Inits a WDFDEVICE initialization structure to allow indirect displays to be used. -/// -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxDeviceInitConfig( - _Inout_ - PWDFDEVICE_INIT DeviceInit, - _In_ - CONST IDD_CX_CLIENT_CONFIG* Config - ) -{ - return ((PFN_IDDCXDEVICEINITCONFIG) IddFunctions[IddCxDeviceInitConfigTableIndex])(IddDriverGlobals, DeviceInit, Config); -} - -// -// IDD Function: IddCxDeviceInitialize -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXDEVICEINITIALIZE)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - WDFDEVICE Device - ); - -/// -/// Initializes a WDF device -/// -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxDeviceInitialize( - _In_ - WDFDEVICE Device - ) -{ - return ((PFN_IDDCXDEVICEINITIALIZE) IddFunctions[IddCxDeviceInitializeTableIndex])(IddDriverGlobals, Device); -} - -// -// IDD Function: IddCxAdapterInitAsync -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXADAPTERINITASYNC)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - CONST IDARG_IN_ADAPTER_INIT* pInArgs, - _Out_ - IDARG_OUT_ADAPTER_INIT* pOutArgs - ); - -/// -/// This will be called by driver to create a WDDM graphics adapter -/// -/// The handle the driver provides so the OS can reference this adapter when calling the driver -/// Input arguments to the function -/// Output arguments to the function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxAdapterInitAsync( - _In_ - CONST IDARG_IN_ADAPTER_INIT* pInArgs, - _Out_ - IDARG_OUT_ADAPTER_INIT* pOutArgs - ) -{ - return ((PFN_IDDCXADAPTERINITASYNC) IddFunctions[IddCxAdapterInitAsyncTableIndex])(IddDriverGlobals, pInArgs, pOutArgs); -} - -// -// IDD Function: IddCxMonitorCreate -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXMONITORCREATE)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_ADAPTER AdapterObject, - _In_ - CONST IDARG_IN_MONITORCREATE* pInArgs, - _Out_ - IDARG_OUT_MONITORCREATE* pOutArgs - ); - -/// -/// An OS callback function the driver calls to create a monitor object that can later be used for arrival. -/// -/// The adapter object that is hosting the newly arrived monitor -/// Input arguments to the function -/// Output arguments to the function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxMonitorCreate( - _In_ - IDDCX_ADAPTER AdapterObject, - _In_ - CONST IDARG_IN_MONITORCREATE* pInArgs, - _Out_ - IDARG_OUT_MONITORCREATE* pOutArgs - ) -{ - return ((PFN_IDDCXMONITORCREATE) IddFunctions[IddCxMonitorCreateTableIndex])(IddDriverGlobals, AdapterObject, pInArgs, pOutArgs); -} - -// -// IDD Function: IddCxMonitorArrival -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXMONITORARRIVAL)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_MONITOR AdapterObject, - _Out_ - IDARG_OUT_MONITORARRIVAL* pOutArgs - ); - -/// -/// An OS callback function the driver calls report a monitor arrival on the WDDM graphics adapter -/// -/// The adapter object that is hosting the newly arrived monitor -/// Input arguments to the function -/// Output arguments to the function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxMonitorArrival( - _In_ - IDDCX_MONITOR AdapterObject, - _Out_ - IDARG_OUT_MONITORARRIVAL* pOutArgs - ) -{ - return ((PFN_IDDCXMONITORARRIVAL) IddFunctions[IddCxMonitorArrivalTableIndex])(IddDriverGlobals, AdapterObject, pOutArgs); -} - -// -// IDD Function: IddCxMonitorDeparture -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXMONITORDEPARTURE)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_MONITOR MonitorObject - ); - -/// -/// An OS callback function the driver calls report a monitor departure from the WDDM graphics adapter -/// -/// The monitor object that is departing -/// Input arguments to the function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxMonitorDeparture( - _In_ - IDDCX_MONITOR MonitorObject - ) -{ - return ((PFN_IDDCXMONITORDEPARTURE) IddFunctions[IddCxMonitorDepartureTableIndex])(IddDriverGlobals, MonitorObject); -} - -// -// IDD Function: IddCxMonitorUpdateModes -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXMONITORUPDATEMODES)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - CONST IDARG_IN_UPDATEMODES* pInArgs - ); - -/// -/// An OS callback function the driver calls to update the mode list -/// -/// The monitor object being updated -/// Input arguments of function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -/// -/// Input arguments of function -/// -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxMonitorUpdateModes( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - CONST IDARG_IN_UPDATEMODES* pInArgs - ) -{ - return ((PFN_IDDCXMONITORUPDATEMODES) IddFunctions[IddCxMonitorUpdateModesTableIndex])(IddDriverGlobals, MonitorObject, pInArgs); -} - -// -// IDD Function: IddCxAdapterUpdateMaxDisplayPipelineRate -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXADAPTERUPDATEMAXDISPLAYPIPELINERATE)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_ADAPTER hOsAdapterContext, - _In_ - CONST IDARG_IN_MAXDISPLAYPIPELINERATE* pInArgs - ); - -/// -/// An OS callback function the driver calls report that the max display pipeline rate has changed -/// -/// This is the OS context handle for this adapter returned by the IddCxSTart call -/// Input arguments to the function -/// Output arguments to the function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxAdapterUpdateMaxDisplayPipelineRate( - _In_ - IDDCX_ADAPTER hOsAdapterContext, - _In_ - CONST IDARG_IN_MAXDISPLAYPIPELINERATE* pInArgs - ) -{ - return ((PFN_IDDCXADAPTERUPDATEMAXDISPLAYPIPELINERATE) IddFunctions[IddCxAdapterUpdateMaxDisplayPipelineRateTableIndex])(IddDriverGlobals, hOsAdapterContext, pInArgs); -} - -// -// IDD Function: IddCxMonitorSetupHardwareCursor -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXMONITORSETUPHARDWARECURSOR)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - CONST IDARG_IN_SETUP_HWCURSOR* pInArgs - ); - -/// -/// An OS callback function the driver calls when it wants to setup hardware cursor support for the path. By default when a -/// mode is committed on a path software cursor is enabled, if the driver want to accelerate the cursor on that path it uses -/// this callback to enable hardware cursor support -/// -/// The handle the OS provided to identify the monitor -/// Input arguments of function -/// -/// If the routine succeeds it return S_OK otherwise an appropriate error code. -/// -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxMonitorSetupHardwareCursor( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - CONST IDARG_IN_SETUP_HWCURSOR* pInArgs - ) -{ - return ((PFN_IDDCXMONITORSETUPHARDWARECURSOR) IddFunctions[IddCxMonitorSetupHardwareCursorTableIndex])(IddDriverGlobals, MonitorObject, pInArgs); -} - -// -// IDD Function: IddCxMonitorQueryHardwareCursor -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXMONITORQUERYHARDWARECURSOR)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - CONST IDARG_IN_QUERY_HWCURSOR* pInArgs, - _Out_ - IDARG_OUT_QUERY_HWCURSOR* pOutArgs - ); - -/// -/// An OS callback function the driver calls when it wants obtain the updated cursor information, driver normally only calls -/// this when the event that signals cursor update has triggered -/// -/// This is the OS context handle for this monitor returned by the IddCxMonitorArrival call -/// Input arguments of function -/// /// Output arguments of function -/// -/// If the routine succeeds it return S_OK otherwise an appropriate error code. -/// -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxMonitorQueryHardwareCursor( - _In_ - IDDCX_MONITOR MonitorObject, - _In_ - CONST IDARG_IN_QUERY_HWCURSOR* pInArgs, - _Out_ - IDARG_OUT_QUERY_HWCURSOR* pOutArgs - ) -{ - return ((PFN_IDDCXMONITORQUERYHARDWARECURSOR) IddFunctions[IddCxMonitorQueryHardwareCursorTableIndex])(IddDriverGlobals, MonitorObject, pInArgs, pOutArgs); -} - -// -// IDD Function: IddCxSwapChainSetDevice -// -typedef -_Must_inspect_result_ -WDFAPI -HRESULT -(*PFN_IDDCXSWAPCHAINSETDEVICE)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - IDARG_IN_SWAPCHAINSETDEVICE* pInArgs - ); - -/// -/// An OS callback function the driver calls within its SetSwapChain routine to setup the swap-chain with a particular DXGI device. -/// -_Must_inspect_result_ -HRESULT -FORCEINLINE -IddCxSwapChainSetDevice( - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - IDARG_IN_SWAPCHAINSETDEVICE* pInArgs - ) -{ - return ((PFN_IDDCXSWAPCHAINSETDEVICE) IddFunctions[IddCxSwapChainSetDeviceTableIndex])(IddDriverGlobals, SwapChainObject, pInArgs); -} - -// -// IDD Function: IddCxSwapChainReleaseAndAcquireBuffer -// -typedef -_Must_inspect_result_ -WDFAPI -HRESULT -(*PFN_IDDCXSWAPCHAINRELEASEANDACQUIREBUFFER)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _Out_ - IDARG_OUT_RELEASEANDACQUIREBUFFER* pOutArgs - ); - -/// -/// An OS callback function the driver calls when it wants to release the current buffer in the swapchain and acquire a new one -/// The OS singles the IDARG_IN_SETSWAPCHAIN.hNextSurfaceAvailable event when the next buffer is ready to acquire. -/// -/// The swap-chain object passed to the EVT_IDD_CX_MONITOR_SET_SWAPCHAIN call. -/// Output arguments of function -/// -/// If the routine succeeds it return S_OK otherwise an appropriate error code. -/// E_PENDING indicates that there was not a new buffer to acquire, this should not occur if driver is only calling after the event is signaled -/// -_Must_inspect_result_ -HRESULT -FORCEINLINE -IddCxSwapChainReleaseAndAcquireBuffer( - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _Out_ - IDARG_OUT_RELEASEANDACQUIREBUFFER* pOutArgs - ) -{ - return ((PFN_IDDCXSWAPCHAINRELEASEANDACQUIREBUFFER) IddFunctions[IddCxSwapChainReleaseAndAcquireBufferTableIndex])(IddDriverGlobals, SwapChainObject, pOutArgs); -} - -// -// IDD Function: IddCxSwapChainGetDirtyRects -// -typedef -_Must_inspect_result_ -WDFAPI -HRESULT -(*PFN_IDDCXSWAPCHAINGETDIRTYRECTS)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - CONST IDARG_IN_GETDIRTYRECTS* pInArgs, - _Out_ - IDARG_OUT_GETDIRTYRECTS* pOutArgs - ); - -/// -/// An OS callback function the driver calls when it wants retrieve the dirty rects for the current frame -/// -/// The swap-chain object whose current frame is being queried. -/// Input arguments of function -/// Output arguments of function -/// -/// If the routine succeeds it return S_OK otherwise an appropriate error code. -/// -_Must_inspect_result_ -HRESULT -FORCEINLINE -IddCxSwapChainGetDirtyRects( - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - CONST IDARG_IN_GETDIRTYRECTS* pInArgs, - _Out_ - IDARG_OUT_GETDIRTYRECTS* pOutArgs - ) -{ - return ((PFN_IDDCXSWAPCHAINGETDIRTYRECTS) IddFunctions[IddCxSwapChainGetDirtyRectsTableIndex])(IddDriverGlobals, SwapChainObject, pInArgs, pOutArgs); -} - -// -// IDD Function: IddCxSwapChainGetMoveRegions -// -typedef -_Must_inspect_result_ -WDFAPI -HRESULT -(*PFN_IDDCXSWAPCHAINGETMOVEREGIONS)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - CONST IDARG_IN_GETMOVEREGIONS* pInArgs, - _Out_ - IDARG_OUT_GETMOVEREGIONS* pOutArgs - ); - -/// -/// An OS callback function the driver calls when it wants retrieve the move regions for the current frame -/// -/// The swap-chain object whose current frame is being queried. -/// Input arguments of function -/// Output arguments of function -/// -/// If the routine succeeds it return S_OK otherwise an appropriate error code. -/// -_Must_inspect_result_ -HRESULT -FORCEINLINE -IddCxSwapChainGetMoveRegions( - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - CONST IDARG_IN_GETMOVEREGIONS* pInArgs, - _Out_ - IDARG_OUT_GETMOVEREGIONS* pOutArgs - ) -{ - return ((PFN_IDDCXSWAPCHAINGETMOVEREGIONS) IddFunctions[IddCxSwapChainGetMoveRegionsTableIndex])(IddDriverGlobals, SwapChainObject, pInArgs, pOutArgs); -} - -// -// IDD Function: IddCxSwapChainFinishedProcessingFrame -// -typedef -_Must_inspect_result_ -WDFAPI -HRESULT -(*PFN_IDDCXSWAPCHAINFINISHEDPROCESSINGFRAME)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_SWAPCHAIN SwapChainObject - ); - -/// -/// An OS callback function the driver calls report all GPU command for processing this frame have been queue -/// For example if the driver copies the buffer to a staging surface so it can lock and copy the -/// pixel data to the CPU then the driver should call this callback once the copy from surface to staging surface -/// has been submitted (eg Dxgi CopyResource API called) -/// If the driver does not call this callback the desktop will not update, it is invalid to call ReleaseAndAcquireBuffer() -/// before calling FinishedProcessingFrame -/// -/// The swap-chain object whose current frame is being queried. -/// If the routine succeeds it return S_OK otherwise an appropriate error code. -_Must_inspect_result_ -HRESULT -FORCEINLINE -IddCxSwapChainFinishedProcessingFrame( - _In_ - IDDCX_SWAPCHAIN SwapChainObject - ) -{ - return ((PFN_IDDCXSWAPCHAINFINISHEDPROCESSINGFRAME) IddFunctions[IddCxSwapChainFinishedProcessingFrameTableIndex])(IddDriverGlobals, SwapChainObject); -} - -// -// IDD Function: IddCxSwapChainReportFrameStatistics -// -typedef -_Must_inspect_result_ -WDFAPI -NTSTATUS -(*PFN_IDDCXSWAPCHAINREPORTFRAMESTATISTICS)( - _In_ - PIDD_DRIVER_GLOBALS DriverGlobals, - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - CONST IDARG_IN_REPORTFRAMESTATISTICS* pInArgs - ); - -/// -/// An OS callback function the driver calls report the frame statics after it has processed a frame completely -/// -/// The swap-chain object whose current frame is being queried. -/// Input arguments to the function -/// Output arguments to the function -/// If the routine succeeds it return S_OK otherwise an appropriate error code -_Must_inspect_result_ -NTSTATUS -FORCEINLINE -IddCxSwapChainReportFrameStatistics( - _In_ - IDDCX_SWAPCHAIN SwapChainObject, - _In_ - CONST IDARG_IN_REPORTFRAMESTATISTICS* pInArgs - ) -{ - return ((PFN_IDDCXSWAPCHAINREPORTFRAMESTATISTICS) IddFunctions[IddCxSwapChainReportFrameStatisticsTableIndex])(IddDriverGlobals, SwapChainObject, pInArgs); -} - - - -#pragma endregion - -WDF_EXTERN_C_END - -#endif // _IDDCX_H_ - diff --git a/IddSampleDriver/IddSampleDriver.inf b/IddSampleDriver/IddSampleDriver.inf index 04b5d8a..a962d0e 100644 Binary files a/IddSampleDriver/IddSampleDriver.inf and b/IddSampleDriver/IddSampleDriver.inf differ diff --git a/IddSampleDriver/IddSampleDriver.sln b/IddSampleDriver/IddSampleDriver.sln index 25c766a..f45ea3f 100644 --- a/IddSampleDriver/IddSampleDriver.sln +++ b/IddSampleDriver/IddSampleDriver.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31129.286 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34622.214 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IddSampleDriver", "IddSampleDriver.vcxproj", "{2D54CB75-8B17-4F11-97DC-847B0244CD46}" EndProject @@ -37,7 +37,6 @@ Global {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Deploy.0 = Release|ARM64 {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.ActiveCfg = Release|x64 {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Build.0 = Release|x64 - {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Deploy.0 = Release|x64 {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.ActiveCfg = Release|Win32 {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Build.0 = Release|Win32 {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Deploy.0 = Release|Win32 diff --git a/IddSampleDriver/IddSampleDriver.vcxproj b/IddSampleDriver/IddSampleDriver.vcxproj index bc46ece..212bd88 100644 --- a/IddSampleDriver/IddSampleDriver.vcxproj +++ b/IddSampleDriver/IddSampleDriver.vcxproj @@ -38,6 +38,9 @@ + + true + @@ -251,7 +254,7 @@ trace.h Async true - /D_ATL_NO_WIN_SUPPORT /DUMDF_DRIVER /DIDDCX_VERSION_MAJOR=1 /DIDDCX_VERSION_MINOR=4 /DIDDCX_MINIMUM_VERSION_REQUIRED=4 %(AdditionalOptions) + /D_ATL_NO_WIN_SUPPORT /DUMDF_DRIVER /DIDDCX_VERSION_MAJOR=1 /DIDDCX_VERSION_MINOR=10 /DIDDCX_MINIMUM_VERSION_REQUIRED=3 %(AdditionalOptions) %(AdditionalDependencies);OneCoreUAP.lib;avrt.lib diff --git a/IddSampleDriver/IddSampleDriver.vcxproj.filters b/IddSampleDriver/IddSampleDriver.vcxproj.filters index ff0ef33..c2ba39d 100644 --- a/IddSampleDriver/IddSampleDriver.vcxproj.filters +++ b/IddSampleDriver/IddSampleDriver.vcxproj.filters @@ -30,6 +30,9 @@ Header Files + + Header Files + diff --git a/IddSampleDriver/readme.md b/IddSampleDriver/readme.md index 8b13789..e7fd0c0 100644 --- a/IddSampleDriver/readme.md +++ b/IddSampleDriver/readme.md @@ -1 +1,14 @@ +# Get 5 virtual monitors for the price of zero! +# Steps (for experienced pros only!!!) +1. Download the latest release as a zip file. + +2. As an administrator, Run the *.bat file to add the driver certificate as a trusted root certificate. + +3. Don't install the inf. Open device manager, click on any device, then click on the "Action" menu and click "Add Legacy Hardware" + +4. Select "Add hardware from a list (Advanced)" and then select Display adapters + +5. Click "Have Disk..." and click the "Browse..." button. Navigate to the extracted files and select the inf file. + +6. You are done! Go to display settings to customize the resolution of the additional displays. These displays show up in Oculus and should be able to be streamed from. \ No newline at end of file