Skip to content

Commit 1995e6d

Browse files
Revert "Test"
This reverts commit c6b1e89.
1 parent c6b1e89 commit 1995e6d

File tree

7 files changed

+14
-642
lines changed

7 files changed

+14
-642
lines changed

Virtual Display Driver (HDR)/MttVDD/Common.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

Virtual Display Driver (HDR)/MttVDD/Driver.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES2 VirtualDisplayDriverEvtIddCxMonitorQueryT
7979
EVT_IDD_CX_ADAPTER_COMMIT_MODES2 VirtualDisplayDriverEvtIddCxAdapterCommitModes2;
8080

8181
EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP VirtualDisplayDriverEvtIddCxMonitorSetGammaRamp;
82-
EVT_IDD_CX_DEVICE_IO_CONTROL MttVddEvtIoDeviceControl;
83-
84-
// Forward declaration for IOCTL queue setup function
85-
NTSTATUS SetupIoctlQueue(WDFDEVICE Device);
8682

8783
struct
8884
{
@@ -156,7 +152,16 @@ const char* XorCursorSupportLevelToString(IDDCX_XOR_CURSOR_SUPPORT level) {
156152

157153
vector<unsigned char> Microsoft::IndirectDisp::IndirectDeviceContext::s_KnownMonitorEdid; //Changed to support static vector
158154

155+
struct IndirectDeviceContextWrapper
156+
{
157+
IndirectDeviceContext* pContext;
159158

159+
void Cleanup()
160+
{
161+
delete pContext;
162+
pContext = nullptr;
163+
}
164+
};
160165
void LogQueries(const char* severity, const std::wstring& xmlName) {
161166
if (xmlName.find(L"logging") == std::wstring::npos) {
162167
int size_needed = WideCharToMultiByte(CP_UTF8, 0, xmlName.c_str(), (int)xmlName.size(), NULL, 0, NULL, NULL);
@@ -629,6 +634,10 @@ void InitializeD3DDeviceAndLogGPU() {
629634
vddlog("i", logtext.c_str());
630635
}
631636

637+
638+
// This macro creates the methods for accessing an IndirectDeviceContextWrapper as a context for a WDF object
639+
WDF_DECLARE_CONTEXT_TYPE(IndirectDeviceContextWrapper);
640+
632641
extern "C" BOOL WINAPI DllMain(
633642
_In_ HINSTANCE hInstance,
634643
_In_ UINT dwReason,
@@ -1774,9 +1783,6 @@ NTSTATUS VirtualDisplayDriverDeviceAdd(WDFDRIVER Driver, PWDFDEVICE_INIT pDevice
17741783
IddConfig.EvtIddCxMonitorAssignSwapChain = VirtualDisplayDriverMonitorAssignSwapChain;
17751784
IddConfig.EvtIddCxMonitorUnassignSwapChain = VirtualDisplayDriverMonitorUnassignSwapChain;
17761785

1777-
// Enable IOCTL handling
1778-
IddConfig.EvtIddCxDeviceIoControl = MttVddEvtIoDeviceControl;
1779-
17801786
if (IDD_IS_FIELD_AVAILABLE(IDD_CX_CLIENT_CONFIG, EvtIddCxAdapterQueryTargetInfo))
17811787
{
17821788
IddConfig.EvtIddCxAdapterQueryTargetInfo = VirtualDisplayDriverEvtIddCxAdapterQueryTargetInfo;

Virtual Display Driver (HDR)/MttVDD/Driver.h

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,6 @@
1616
#include <vector>
1717

1818
#include "Trace.h"
19-
#include "mttvdd-ioctl.h"
20-
#include "Common.h"
21-
22-
// Forward declaration for the IndirectDeviceContext class
23-
namespace Microsoft
24-
{
25-
namespace IndirectDisp
26-
{
27-
class IndirectDeviceContext;
28-
}
29-
}
30-
31-
// Forward declarations for driver-defined context type
32-
struct IndirectDeviceContextWrapper
33-
{
34-
Microsoft::IndirectDisp::IndirectDeviceContext* pContext;
35-
36-
void Cleanup(); // Just declare it, don't implement
37-
};
38-
39-
// The WDF context access function is defined by WDF_DECLARE_CONTEXT_TYPE macro
40-
WDF_DECLARE_CONTEXT_TYPE(IndirectDeviceContextWrapper);
4119

4220
namespace Microsoft
4321
{
@@ -107,26 +85,18 @@ namespace Microsoft
10785
void FinishInit();
10886

10987
void CreateMonitor(unsigned int index);
110-
NTSTATUS CreateMonitorWithParams(ULONG Width, ULONG Height, ULONG RefreshRate, GUID* MonitorId);
111-
NTSTATUS DestroyMonitor(ULONG MonitorIndex);
112-
NTSTATUS SetMonitorMode(ULONG MonitorIndex, ULONG Width, ULONG Height, ULONG RefreshRate);
113-
NTSTATUS SetPreferredMode(ULONG MonitorIndex, ULONG Width, ULONG Height, ULONG RefreshRate);
114-
NTSTATUS SetGpuPreference(LUID AdapterLuid);
115-
ULONG GetMonitorCount();
11688

11789
void AssignSwapChain(IDDCX_MONITOR& Monitor, IDDCX_SWAPCHAIN SwapChain, LUID RenderAdapter, HANDLE NewFrameEvent);
11890
void UnassignSwapChain();
11991

12092
protected:
93+
12194
WDFDEVICE m_WdfDevice;
12295
IDDCX_ADAPTER m_Adapter;
12396
IDDCX_MONITOR m_Monitor;
12497
IDDCX_MONITOR m_Monitor2;
12598

12699
std::unique_ptr<SwapChainProcessor> m_ProcessingThread;
127-
128-
// Store a list of connected monitors and their info
129-
std::vector<std::pair<IDDCX_MONITOR, GUID>> m_Monitors;
130100

131101
public:
132102
static const DISPLAYCONFIG_VIDEO_SIGNAL_INFO s_KnownMonitorModes[];
1.99 KB
Binary file not shown.

Virtual Display Driver (HDR)/MttVDD/MttVDD.vcxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,12 @@
3636
</ItemGroup>
3737
<ItemGroup>
3838
<ClCompile Include="Driver.cpp" />
39-
<ClCompile Include="mttioctl.cpp">
40-
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
41-
</ClCompile>
4239
</ItemGroup>
4340
<ItemGroup>
4441
<ClInclude Include="..\..\..\..\Downloads\wudfwdm.h">
4542
<DeploymentContent>true</DeploymentContent>
4643
</ClInclude>
4744
<ClInclude Include="Driver.h" />
48-
<ClInclude Include="mttvdd-ioctl.h" />
4945
<ClInclude Include="Trace.h" />
5046
</ItemGroup>
5147
<ItemGroup>

0 commit comments

Comments
 (0)