1 | /*
|
---|
2 | * Copyright (C) 2010 Sun Microsystems, Inc.
|
---|
3 | *
|
---|
4 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
5 | * available from http://www.virtualbox.org. This file is free software;
|
---|
6 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
7 | * General Public License (GPL) as published by the Free Software
|
---|
8 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
9 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
10 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
11 | *
|
---|
12 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
13 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
14 | * additional information or have any questions.
|
---|
15 | */
|
---|
16 |
|
---|
17 | #include "../VBoxVideo.h"
|
---|
18 | #include "../Helper.h"
|
---|
19 |
|
---|
20 | #include <VBox/VBoxGuestLib.h>
|
---|
21 |
|
---|
22 | #define VBOXWDDM_MEMTAG 'MDBV'
|
---|
23 | PVOID vboxWddmMemAlloc(IN SIZE_T cbSize)
|
---|
24 | {
|
---|
25 | return ExAllocatePoolWithTag(NonPagedPool, cbSize, VBOXWDDM_MEMTAG);
|
---|
26 | }
|
---|
27 |
|
---|
28 | PVOID vboxWddmMemAllocZero(IN SIZE_T cbSize)
|
---|
29 | {
|
---|
30 | PVOID pvMem = vboxWddmMemAlloc(cbSize);
|
---|
31 | memset(pvMem, 0, cbSize);
|
---|
32 | return pvMem;
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|
36 | VOID vboxWddmMemFree(PVOID pvMem)
|
---|
37 | {
|
---|
38 | ExFreePool(pvMem);
|
---|
39 | }
|
---|
40 |
|
---|
41 | NTSTATUS vboxWddmPickResources(PDEVICE_EXTENSION pContext, PDXGK_DEVICE_INFO pDeviceInfo, PULONG pAdapterMemorySize)
|
---|
42 | {
|
---|
43 | NTSTATUS Status = STATUS_SUCCESS;
|
---|
44 | USHORT DispiId;
|
---|
45 | *pAdapterMemorySize = VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES;
|
---|
46 |
|
---|
47 | VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);
|
---|
48 | VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID2);
|
---|
49 | DispiId = VBoxVideoCmnPortReadUshort((PUSHORT)VBE_DISPI_IOPORT_DATA);
|
---|
50 | if (DispiId == VBE_DISPI_ID2)
|
---|
51 | {
|
---|
52 | dprintf(("VBoxVideoWddm: found the VBE card\n"));
|
---|
53 | /*
|
---|
54 | * Write some hardware information to registry, so that
|
---|
55 | * it's visible in Windows property dialog.
|
---|
56 | */
|
---|
57 |
|
---|
58 | /*
|
---|
59 | * Query the adapter's memory size. It's a bit of a hack, we just read
|
---|
60 | * an ULONG from the data port without setting an index before.
|
---|
61 | */
|
---|
62 | *pAdapterMemorySize = VBoxVideoCmnPortReadUlong((PULONG)VBE_DISPI_IOPORT_DATA);
|
---|
63 | if (VBoxHGSMIIsSupported (pContext))
|
---|
64 | {
|
---|
65 | pContext->u.primary.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
|
---|
66 | pContext->u.primary.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
|
---|
67 |
|
---|
68 | PCM_RESOURCE_LIST pRcList = pDeviceInfo->TranslatedResourceList;
|
---|
69 | /* @todo: verify resources */
|
---|
70 | for (ULONG i = 0; i < pRcList->Count; ++i)
|
---|
71 | {
|
---|
72 | PCM_FULL_RESOURCE_DESCRIPTOR pFRc = &pRcList->List[i];
|
---|
73 | for (ULONG j = 0; j < pFRc->PartialResourceList.Count; ++j)
|
---|
74 | {
|
---|
75 | PCM_PARTIAL_RESOURCE_DESCRIPTOR pPRc = &pFRc->PartialResourceList.PartialDescriptors[j];
|
---|
76 | switch (pPRc->Type)
|
---|
77 | {
|
---|
78 | case CmResourceTypePort:
|
---|
79 | break;
|
---|
80 | case CmResourceTypeInterrupt:
|
---|
81 | break;
|
---|
82 | case CmResourceTypeMemory:
|
---|
83 | break;
|
---|
84 | case CmResourceTypeDma:
|
---|
85 | break;
|
---|
86 | case CmResourceTypeDeviceSpecific:
|
---|
87 | break;
|
---|
88 | case CmResourceTypeBusNumber:
|
---|
89 | break;
|
---|
90 | default:
|
---|
91 | break;
|
---|
92 | }
|
---|
93 | }
|
---|
94 | }
|
---|
95 | }
|
---|
96 | else
|
---|
97 | {
|
---|
98 | drprintf(("VBoxVideoWddm: HGSMI unsupported, returning err\n"));
|
---|
99 | /* @todo: report a better status */
|
---|
100 | Status = STATUS_UNSUCCESSFUL;
|
---|
101 | }
|
---|
102 | }
|
---|
103 | else
|
---|
104 | {
|
---|
105 | drprintf(("VBoxVideoWddm:: VBE card not found, returning err\n"));
|
---|
106 | Status = STATUS_UNSUCCESSFUL;
|
---|
107 | }
|
---|
108 |
|
---|
109 |
|
---|
110 | return Status;
|
---|
111 | }
|
---|
112 |
|
---|
113 | /* driver callbacks */
|
---|
114 |
|
---|
115 | NTSTATUS DxgkDdiAddDevice(
|
---|
116 | IN CONST PDEVICE_OBJECT PhysicalDeviceObject,
|
---|
117 | OUT PVOID *MiniportDeviceContext
|
---|
118 | )
|
---|
119 | {
|
---|
120 | /* The DxgkDdiAddDevice function should be made pageable. */
|
---|
121 | PAGED_CODE();
|
---|
122 |
|
---|
123 | dfprintf(("==> "__FUNCTION__ ", pdo(0x%x)\n", PhysicalDeviceObject));
|
---|
124 | NTSTATUS Status = STATUS_UNSUCCESSFUL;
|
---|
125 |
|
---|
126 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)vboxWddmMemAllocZero(sizeof(DEVICE_EXTENSION));
|
---|
127 | if (pContext)
|
---|
128 | {
|
---|
129 | *MiniportDeviceContext = pContext;
|
---|
130 | }
|
---|
131 | else
|
---|
132 | {
|
---|
133 | Status = STATUS_INSUFFICIENT_RESOURCES;
|
---|
134 | drprintf(("VBoxVideoWddm: ERROR, failed to create context\n"));
|
---|
135 | }
|
---|
136 |
|
---|
137 | dfprintf(("<== "__FUNCTION__ ", status(0x%x), pContext(0x%x)\n", Status, pContext));
|
---|
138 |
|
---|
139 | return Status;
|
---|
140 | }
|
---|
141 |
|
---|
142 | NTSTATUS DxgkDdiStartDevice(
|
---|
143 | IN CONST PVOID MiniportDeviceContext,
|
---|
144 | IN PDXGK_START_INFO DxgkStartInfo,
|
---|
145 | IN PDXGKRNL_INTERFACE DxgkInterface,
|
---|
146 | OUT PULONG NumberOfVideoPresentSources,
|
---|
147 | OUT PULONG NumberOfChildren
|
---|
148 | )
|
---|
149 | {
|
---|
150 | /* The DxgkDdiStartDevice function should be made pageable. */
|
---|
151 | PAGED_CODE();
|
---|
152 |
|
---|
153 | NTSTATUS Status;
|
---|
154 |
|
---|
155 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
156 |
|
---|
157 | if ( ARGUMENT_PRESENT(MiniportDeviceContext) &&
|
---|
158 | ARGUMENT_PRESENT(DxgkInterface) &&
|
---|
159 | ARGUMENT_PRESENT(DxgkStartInfo) &&
|
---|
160 | ARGUMENT_PRESENT(NumberOfVideoPresentSources),
|
---|
161 | ARGUMENT_PRESENT(NumberOfChildren)
|
---|
162 | )
|
---|
163 | {
|
---|
164 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)MiniportDeviceContext;
|
---|
165 |
|
---|
166 | /* Save DeviceHandle and function pointers supplied by the DXGKRNL_INTERFACE structure passed to DxgkInterface. */
|
---|
167 | memcpy(&pContext->u.primary.DxgkInterface, DxgkInterface, sizeof(DXGKRNL_INTERFACE));
|
---|
168 |
|
---|
169 | /* Allocate a DXGK_DEVICE_INFO structure, and call DxgkCbGetDeviceInformation to fill in the members of that structure, which include the registry path, the PDO, and a list of translated resources for the display adapter represented by MiniportDeviceContext. Save selected members (ones that the display miniport driver will need later)
|
---|
170 | * of the DXGK_DEVICE_INFO structure in the context block represented by MiniportDeviceContext. */
|
---|
171 | DXGK_DEVICE_INFO DeviceInfo;
|
---|
172 | Status = pContext->u.primary.DxgkInterface.DxgkCbGetDeviceInformation (pContext->u.primary.DxgkInterface.DeviceHandle, &DeviceInfo);
|
---|
173 | if (Status == STATUS_SUCCESS)
|
---|
174 | {
|
---|
175 | ULONG AdapterMemorySize;
|
---|
176 | Status = vboxWddmPickResources(pContext, &DeviceInfo, &AdapterMemorySize);
|
---|
177 | if (Status == STATUS_SUCCESS)
|
---|
178 | {
|
---|
179 | /* Initialize VBoxGuest library, which is used for requests which go through VMMDev. */
|
---|
180 | VbglInit ();
|
---|
181 |
|
---|
182 | /* Guest supports only HGSMI, the old VBVA via VMMDev is not supported. Old
|
---|
183 | * code will be ifdef'ed and later removed.
|
---|
184 | * The host will however support both old and new interface to keep compatibility
|
---|
185 | * with old guest additions.
|
---|
186 | */
|
---|
187 | VBoxSetupDisplaysHGSMI(pContext, AdapterMemorySize);
|
---|
188 | if ((pContext)->u.primary.bHGSMI)
|
---|
189 | {
|
---|
190 | drprintf(("VBoxVideoWddm: using HGSMI\n"));
|
---|
191 | *NumberOfVideoPresentSources = pContext->u.primary.cDisplays;
|
---|
192 | *NumberOfChildren = pContext->u.primary.cDisplays;
|
---|
193 | dprintf(("VBoxVideoWddm: sources(%d), children(%d)\n", *NumberOfVideoPresentSources, *NumberOfChildren));
|
---|
194 | }
|
---|
195 | else
|
---|
196 | {
|
---|
197 | drprintf(("VBoxVideoWddm: HGSMI failed to initialize, returning err\n"));
|
---|
198 | /* @todo: report a better status */
|
---|
199 | Status = STATUS_UNSUCCESSFUL;
|
---|
200 | }
|
---|
201 | }
|
---|
202 | else
|
---|
203 | {
|
---|
204 | drprintf(("VBoxVideoWddm:: vboxWddmPickResources failed Status(0x%x), returning err\n", Status));
|
---|
205 | Status = STATUS_UNSUCCESSFUL;
|
---|
206 | }
|
---|
207 | }
|
---|
208 | else
|
---|
209 | {
|
---|
210 | drprintf(("VBoxVideoWddm: DxgkCbGetDeviceInformation failed Status(0x%x), returning err\n", Status));
|
---|
211 | }
|
---|
212 | }
|
---|
213 | else
|
---|
214 | {
|
---|
215 | drprintf(("VBoxVideoWddm: invalid parameter, returning err\n"));
|
---|
216 | Status = STATUS_INVALID_PARAMETER;
|
---|
217 | }
|
---|
218 |
|
---|
219 | dfprintf(("<== "__FUNCTION__ ", status(0x%x)\n", Status));
|
---|
220 |
|
---|
221 | return Status;
|
---|
222 | }
|
---|
223 |
|
---|
224 | NTSTATUS DxgkDdiStopDevice(
|
---|
225 | IN CONST PVOID MiniportDeviceContext
|
---|
226 | )
|
---|
227 | {
|
---|
228 | return STATUS_NOT_IMPLEMENTED;
|
---|
229 | }
|
---|
230 |
|
---|
231 | NTSTATUS DxgkDdiRemoveDevice(
|
---|
232 | IN CONST PVOID MiniportDeviceContext
|
---|
233 | )
|
---|
234 | {
|
---|
235 | return STATUS_NOT_IMPLEMENTED;
|
---|
236 | }
|
---|
237 |
|
---|
238 | NTSTATUS DxgkDdiDispatchIoRequest(
|
---|
239 | IN CONST PVOID MiniportDeviceContext,
|
---|
240 | IN ULONG VidPnSourceId,
|
---|
241 | IN PVIDEO_REQUEST_PACKET VideoRequestPacket
|
---|
242 | )
|
---|
243 | {
|
---|
244 | return STATUS_NOT_IMPLEMENTED;
|
---|
245 | }
|
---|
246 |
|
---|
247 | BOOLEAN DxgkDdiInterruptRoutine(
|
---|
248 | IN CONST PVOID MiniportDeviceContext,
|
---|
249 | IN ULONG MessageNumber
|
---|
250 | )
|
---|
251 | {
|
---|
252 | return false;
|
---|
253 | }
|
---|
254 |
|
---|
255 | VOID DxgkDdiDpcRoutine(
|
---|
256 | IN CONST PVOID MiniportDeviceContext
|
---|
257 | )
|
---|
258 | {
|
---|
259 |
|
---|
260 | }
|
---|
261 |
|
---|
262 | NTSTATUS DxgkDdiQueryChildRelations(
|
---|
263 | IN CONST PVOID MiniportDeviceContext,
|
---|
264 | IN OUT PDXGK_CHILD_DESCRIPTOR ChildRelations,
|
---|
265 | IN ULONG ChildRelationsSize
|
---|
266 | )
|
---|
267 | {
|
---|
268 | /* The DxgkDdiQueryChildRelations function should be made pageable. */
|
---|
269 | PAGED_CODE();
|
---|
270 |
|
---|
271 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
272 | for (ULONG i = 0; i < ChildRelationsSize; i++)
|
---|
273 | {
|
---|
274 | ChildRelations[i].ChildDeviceType = TypeVideoOutput;
|
---|
275 | ChildRelations[i].ChildCapabilities.Type.VideoOutput.InterfaceTechnology = D3DKMDT_VOT_OTHER;
|
---|
276 | ChildRelations[i].ChildCapabilities.Type.VideoOutput.MonitorOrientationAwareness = D3DKMDT_MOA_NONE;
|
---|
277 | ChildRelations[i].ChildCapabilities.Type.VideoOutput.SupportsSdtvModes = FALSE;
|
---|
278 | ChildRelations[i].ChildCapabilities.HpdAwareness = HpdAwarenessAlwaysConnected;
|
---|
279 | ChildRelations[i].AcpiUid = i+1; /* @todo: do we need it? could it be zero ? */
|
---|
280 | ChildRelations[i].ChildUid = i+1; /* could it be zero ? */
|
---|
281 | }
|
---|
282 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
283 | return STATUS_SUCCESS;
|
---|
284 | }
|
---|
285 |
|
---|
286 | NTSTATUS DxgkDdiQueryChildStatus(
|
---|
287 | IN CONST PVOID MiniportDeviceContext,
|
---|
288 | IN PDXGK_CHILD_STATUS ChildStatus,
|
---|
289 | IN BOOLEAN NonDestructiveOnly
|
---|
290 | )
|
---|
291 | {
|
---|
292 | /* The DxgkDdiQueryChildStatus should be made pageable. */
|
---|
293 | PAGED_CODE();
|
---|
294 |
|
---|
295 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
296 |
|
---|
297 | NTSTATUS Status = STATUS_SUCCESS;
|
---|
298 | switch (ChildStatus->Type)
|
---|
299 | {
|
---|
300 | case StatusConnection:
|
---|
301 | ChildStatus->HotPlug.Connected = TRUE;
|
---|
302 | dfprintf(("VBoxVideoWddm: StatusConnection\n"));
|
---|
303 | break;
|
---|
304 | case StatusRotation:
|
---|
305 | ChildStatus->Rotation.Angle = 0;
|
---|
306 | dfprintf(("VBoxVideoWddm: StatusRotation\n"));
|
---|
307 | break;
|
---|
308 | default:
|
---|
309 | drprintf(("VBoxVideoWddm: ERROR: status type: %d\n", ChildStatus->Type));
|
---|
310 | Status = STATUS_INVALID_PARAMETER;
|
---|
311 | break;
|
---|
312 | }
|
---|
313 |
|
---|
314 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
315 |
|
---|
316 | return Status;
|
---|
317 | }
|
---|
318 |
|
---|
319 | NTSTATUS DxgkDdiQueryDeviceDescriptor(
|
---|
320 | IN CONST PVOID MiniportDeviceContext,
|
---|
321 | IN ULONG ChildUid,
|
---|
322 | IN OUT PDXGK_DEVICE_DESCRIPTOR DeviceDescriptor
|
---|
323 | )
|
---|
324 | {
|
---|
325 | /* The DxgkDdiQueryDeviceDescriptor should be made pageable. */
|
---|
326 | PAGED_CODE();
|
---|
327 |
|
---|
328 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
329 |
|
---|
330 | /* we do not support EDID */
|
---|
331 | DeviceDescriptor->DescriptorOffset = 0;
|
---|
332 | DeviceDescriptor->DescriptorLength = 0;
|
---|
333 | DeviceDescriptor->DescriptorBuffer = NULL;
|
---|
334 |
|
---|
335 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
336 |
|
---|
337 | return STATUS_SUCCESS;
|
---|
338 | }
|
---|
339 |
|
---|
340 | NTSTATUS DxgkDdiSetPowerState(
|
---|
341 | IN CONST PVOID MiniportDeviceContext,
|
---|
342 | IN ULONG DeviceUid,
|
---|
343 | IN DEVICE_POWER_STATE DevicePowerState,
|
---|
344 | IN POWER_ACTION ActionType
|
---|
345 | )
|
---|
346 | {
|
---|
347 | /* The DxgkDdiSetPowerState function should be made pageable. */
|
---|
348 | PAGED_CODE();
|
---|
349 |
|
---|
350 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
351 |
|
---|
352 | /* @todo: */
|
---|
353 |
|
---|
354 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
355 |
|
---|
356 | return STATUS_SUCCESS;
|
---|
357 | }
|
---|
358 |
|
---|
359 | NTSTATUS DxgkDdiNotifyAcpiEvent(
|
---|
360 | IN CONST PVOID MiniportDeviceContext,
|
---|
361 | IN DXGK_EVENT_TYPE EventType,
|
---|
362 | IN ULONG Event,
|
---|
363 | IN PVOID Argument,
|
---|
364 | OUT PULONG AcpiFlags
|
---|
365 | )
|
---|
366 | {
|
---|
367 | return STATUS_NOT_IMPLEMENTED;
|
---|
368 | }
|
---|
369 |
|
---|
370 | VOID DxgkDdiResetDevice(
|
---|
371 | IN CONST PVOID MiniportDeviceContext
|
---|
372 | )
|
---|
373 | {
|
---|
374 | /* DxgkDdiResetDevice can be called at any IRQL, so it must be in nonpageable memory. */
|
---|
375 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
376 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
377 | }
|
---|
378 |
|
---|
379 | VOID DxgkDdiUnload(
|
---|
380 | VOID
|
---|
381 | )
|
---|
382 | {
|
---|
383 | /* DxgkDdiUnload should be made pageable. */
|
---|
384 | PAGED_CODE();
|
---|
385 | dfprintf(("==> "__FUNCTION__ "\n"));
|
---|
386 | dfprintf(("<== "__FUNCTION__ "\n"));
|
---|
387 | }
|
---|
388 |
|
---|
389 | NTSTATUS DxgkDdiQueryInterface(
|
---|
390 | IN CONST PVOID MiniportDeviceContext,
|
---|
391 | IN PQUERY_INTERFACE QueryInterface
|
---|
392 | )
|
---|
393 | {
|
---|
394 | return STATUS_NOT_IMPLEMENTED;
|
---|
395 | }
|
---|
396 |
|
---|
397 | VOID DxgkDdiControlEtwLogging(
|
---|
398 | IN BOOLEAN Enable,
|
---|
399 | IN ULONG Flags,
|
---|
400 | IN UCHAR Level
|
---|
401 | )
|
---|
402 | {
|
---|
403 |
|
---|
404 | }
|
---|
405 |
|
---|
406 | NTSTATUS APIENTRY DxgkDdiQueryAdapterInfo(
|
---|
407 | CONST HANDLE hAdapter,
|
---|
408 | CONST DXGKARG_QUERYADAPTERINFO* pQueryAdapterInfo)
|
---|
409 | {
|
---|
410 | return STATUS_NOT_IMPLEMENTED;
|
---|
411 | }
|
---|
412 |
|
---|
413 | NTSTATUS APIENTRY DxgkDdiCreateDevice(
|
---|
414 | CONST HANDLE hAdapter,
|
---|
415 | DXGKARG_CREATEDEVICE* pCreateDevice)
|
---|
416 | {
|
---|
417 | return STATUS_NOT_IMPLEMENTED;
|
---|
418 | }
|
---|
419 |
|
---|
420 | NTSTATUS APIENTRY DxgkDdiCreateAllocation(
|
---|
421 | CONST HANDLE hAdapter,
|
---|
422 | DXGKARG_CREATEALLOCATION* pCreateAllocation)
|
---|
423 | {
|
---|
424 | return STATUS_NOT_IMPLEMENTED;
|
---|
425 | }
|
---|
426 |
|
---|
427 | NTSTATUS
|
---|
428 | APIENTRY
|
---|
429 | DxgkDdiDestroyAllocation(
|
---|
430 | CONST HANDLE hAdapter,
|
---|
431 | CONST DXGKARG_DESTROYALLOCATION* pDestroyAllocation)
|
---|
432 | {
|
---|
433 | return STATUS_NOT_IMPLEMENTED;
|
---|
434 | }
|
---|
435 |
|
---|
436 |
|
---|
437 | NTSTATUS
|
---|
438 | APIENTRY
|
---|
439 | DxgkDdiDescribeAllocation(
|
---|
440 | CONST HANDLE hAdapter,
|
---|
441 | DXGKARG_DESCRIBEALLOCATION* pDescribeAllocation)
|
---|
442 | {
|
---|
443 | return STATUS_NOT_IMPLEMENTED;
|
---|
444 | }
|
---|
445 |
|
---|
446 | NTSTATUS
|
---|
447 | APIENTRY
|
---|
448 | DxgkDdiGetStandardAllocationDriverData(
|
---|
449 | CONST HANDLE hAdapter,
|
---|
450 | DXGKARG_GETSTANDARDALLOCATIONDRIVERDATA* pGetStandardAllocationDriverData)
|
---|
451 | {
|
---|
452 | return STATUS_NOT_IMPLEMENTED;
|
---|
453 | }
|
---|
454 |
|
---|
455 | NTSTATUS
|
---|
456 | APIENTRY
|
---|
457 | DxgkDdiAcquireSwizzlingRange(
|
---|
458 | CONST HANDLE hAdapter,
|
---|
459 | DXGKARG_ACQUIRESWIZZLINGRANGE* pAcquireSwizzlingRange)
|
---|
460 | {
|
---|
461 | return STATUS_NOT_IMPLEMENTED;
|
---|
462 | }
|
---|
463 |
|
---|
464 | NTSTATUS
|
---|
465 | APIENTRY
|
---|
466 | DxgkDdiReleaseSwizzlingRange(
|
---|
467 | CONST HANDLE hAdapter,
|
---|
468 | CONST DXGKARG_RELEASESWIZZLINGRANGE* pReleaseSwizzlingRange)
|
---|
469 | {
|
---|
470 | return STATUS_NOT_IMPLEMENTED;
|
---|
471 | }
|
---|
472 |
|
---|
473 | NTSTATUS
|
---|
474 | APIENTRY
|
---|
475 | DxgkDdiPatch(
|
---|
476 | CONST HANDLE hAdapter,
|
---|
477 | CONST DXGKARG_PATCH* pPatch)
|
---|
478 | {
|
---|
479 | return STATUS_NOT_IMPLEMENTED;
|
---|
480 | }
|
---|
481 |
|
---|
482 | NTSTATUS
|
---|
483 | APIENTRY
|
---|
484 | DxgkDdiSubmitCommand(
|
---|
485 | CONST HANDLE hAdapter,
|
---|
486 | CONST DXGKARG_SUBMITCOMMAND* pSubmitCommand)
|
---|
487 | {
|
---|
488 | return STATUS_NOT_IMPLEMENTED;
|
---|
489 | }
|
---|
490 |
|
---|
491 | NTSTATUS
|
---|
492 | APIENTRY
|
---|
493 | DxgkDdiPreemptCommand(
|
---|
494 | CONST HANDLE hAdapter,
|
---|
495 | CONST DXGKARG_PREEMPTCOMMAND* pPreemptCommand)
|
---|
496 | {
|
---|
497 | return STATUS_NOT_IMPLEMENTED;
|
---|
498 | }
|
---|
499 |
|
---|
500 | NTSTATUS
|
---|
501 | APIENTRY
|
---|
502 | DxgkDdiBuildPagingBuffer(
|
---|
503 | CONST HANDLE hAdapter,
|
---|
504 | DXGKARG_BUILDPAGINGBUFFER* pBuildPagingBuffer)
|
---|
505 | {
|
---|
506 | return STATUS_NOT_IMPLEMENTED;
|
---|
507 | }
|
---|
508 |
|
---|
509 | NTSTATUS
|
---|
510 | APIENTRY
|
---|
511 | DxgkDdiSetPalette(
|
---|
512 | CONST HANDLE hAdapter,
|
---|
513 | CONST DXGKARG_SETPALETTE* pSetPalette
|
---|
514 | )
|
---|
515 | {
|
---|
516 | return STATUS_NOT_IMPLEMENTED;
|
---|
517 | }
|
---|
518 |
|
---|
519 | NTSTATUS
|
---|
520 | APIENTRY
|
---|
521 | DxgkDdiSetPointerPosition(
|
---|
522 | CONST HANDLE hAdapter,
|
---|
523 | CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition)
|
---|
524 | {
|
---|
525 | return STATUS_NOT_IMPLEMENTED;
|
---|
526 | }
|
---|
527 |
|
---|
528 | NTSTATUS
|
---|
529 | APIENTRY
|
---|
530 | DxgkDdiSetPointerShape(
|
---|
531 | CONST HANDLE hAdapter,
|
---|
532 | CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape)
|
---|
533 | {
|
---|
534 | return STATUS_NOT_IMPLEMENTED;
|
---|
535 | }
|
---|
536 |
|
---|
537 | NTSTATUS
|
---|
538 | APIENTRY CALLBACK
|
---|
539 | DxgkDdiResetFromTimeout(
|
---|
540 | CONST HANDLE hAdapter)
|
---|
541 | {
|
---|
542 | return STATUS_NOT_IMPLEMENTED;
|
---|
543 | }
|
---|
544 |
|
---|
545 | NTSTATUS
|
---|
546 | APIENTRY
|
---|
547 | DxgkDdiEscape(
|
---|
548 | CONST HANDLE hAdapter,
|
---|
549 | CONST DXGKARG_ESCAPE* pEscape)
|
---|
550 | {
|
---|
551 | PAGED_CODE();
|
---|
552 |
|
---|
553 | return STATUS_INVALID_PARAMETER;
|
---|
554 | }
|
---|
555 |
|
---|
556 | NTSTATUS
|
---|
557 | APIENTRY
|
---|
558 | DxgkDdiCollectDbgInfo(
|
---|
559 | CONST HANDLE hAdapter,
|
---|
560 | CONST DXGKARG_COLLECTDBGINFO* pCollectDbgInfo
|
---|
561 | )
|
---|
562 | {
|
---|
563 | return STATUS_NOT_IMPLEMENTED;
|
---|
564 | }
|
---|
565 |
|
---|
566 | NTSTATUS
|
---|
567 | APIENTRY
|
---|
568 | DxgkDdiQueryCurrentFence(
|
---|
569 | CONST HANDLE hAdapter,
|
---|
570 | DXGKARG_QUERYCURRENTFENCE* pCurrentFence)
|
---|
571 | {
|
---|
572 | return STATUS_NOT_IMPLEMENTED;
|
---|
573 | }
|
---|
574 |
|
---|
575 | NTSTATUS
|
---|
576 | APIENTRY
|
---|
577 | DxgkDdiIsSupportedVidPn(
|
---|
578 | CONST HANDLE hAdapter,
|
---|
579 | OUT DXGKARG_ISSUPPORTEDVIDPN* pIsSupportedVidPnArg
|
---|
580 | )
|
---|
581 | {
|
---|
582 | /* The DxgkDdiIsSupportedVidPn should be made pageable. */
|
---|
583 | PAGED_CODE();
|
---|
584 |
|
---|
585 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
|
---|
586 |
|
---|
587 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
|
---|
588 | BOOLEAN bSupported = TRUE;
|
---|
589 | const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
|
---|
590 | NTSTATUS Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pIsSupportedVidPnArg->hDesiredVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
|
---|
591 | if (Status == STATUS_SUCCESS)
|
---|
592 | {
|
---|
593 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
|
---|
594 | const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
|
---|
595 | Status = pVidPnInterface->pfnGetTopology(pIsSupportedVidPnArg->hDesiredVidPn, &hVidPnTopology, &pVidPnTopologyInterface);
|
---|
596 | if (Status == STATUS_SUCCESS)
|
---|
597 | {
|
---|
598 | Status = vboxVidPnCheckTopology(pIsSupportedVidPnArg->hDesiredVidPn, hVidPnTopology, pVidPnTopologyInterface, &bSupported);
|
---|
599 | if (Status == STATUS_SUCCESS && bSupported)
|
---|
600 | {
|
---|
601 | for (int id = 0; id < pContext->u.primary.cDisplays; id++)
|
---|
602 | {
|
---|
603 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet;
|
---|
604 | const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface;
|
---|
605 | Status = pVidPnInterface->pfnAcquireSourceModeSet(pIsSupportedVidPnArg->hDesiredVidPn,
|
---|
606 | id,
|
---|
607 | &hNewVidPnSourceModeSet,
|
---|
608 | &pVidPnSourceModeSetInterface);
|
---|
609 | if (Status == STATUS_SUCCESS)
|
---|
610 | {
|
---|
611 | Status = vboxVidPnCheckSourceModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnSourceModeSet, pVidPnSourceModeSetInterface, &bSupported);
|
---|
612 |
|
---|
613 | pVidPnInterface->pfnReleaseSourceModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnSourceModeSet);
|
---|
614 |
|
---|
615 | if (Status != STATUS_SUCCESS || !bSupported)
|
---|
616 | break;
|
---|
617 | }
|
---|
618 | else if (Status == STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE)
|
---|
619 | {
|
---|
620 | drprintf(("VBoxVideoWddm: Warning: pfnAcquireSourceModeSet returned STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE, continuing\n"));
|
---|
621 | Status = STATUS_SUCCESS;
|
---|
622 | }
|
---|
623 | else
|
---|
624 | {
|
---|
625 | drprintf(("VBoxVideoWddm: pfnAcquireSourceModeSet failed Status(0x%x)\n"));
|
---|
626 | break;
|
---|
627 | }
|
---|
628 | }
|
---|
629 |
|
---|
630 | if (Status == STATUS_SUCCESS && bSupported)
|
---|
631 | {
|
---|
632 | for (int id = 0; id < pContext->u.primary.cDisplays; id++)
|
---|
633 | {
|
---|
634 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet;
|
---|
635 | CONST DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface;
|
---|
636 | Status = pVidPnInterface->pfnAcquireTargetModeSet(pIsSupportedVidPnArg->hDesiredVidPn,
|
---|
637 | id, /*__in CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId */
|
---|
638 | &hNewVidPnTargetModeSet,
|
---|
639 | &pVidPnTargetModeSetInterface);
|
---|
640 | if (Status == STATUS_SUCCESS)
|
---|
641 | {
|
---|
642 | Status = vboxVidPnCheckTargetModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnTargetModeSet, pVidPnTargetModeSetInterface, &bSupported);
|
---|
643 |
|
---|
644 | pVidPnInterface->pfnReleaseTargetModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnTargetModeSet);
|
---|
645 |
|
---|
646 | if (Status != STATUS_SUCCESS || !bSupported)
|
---|
647 | break;
|
---|
648 | }
|
---|
649 | else if (Status == STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE)
|
---|
650 | {
|
---|
651 | drprintf(("VBoxVideoWddm: Warning: pfnAcquireSourceModeSet returned STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE, continuing\n"));
|
---|
652 | Status = STATUS_SUCCESS;
|
---|
653 | }
|
---|
654 | else
|
---|
655 | {
|
---|
656 | drprintf(("VBoxVideoWddm: pfnAcquireSourceModeSet failed Status(0x%x)\n"));
|
---|
657 | break;
|
---|
658 | }
|
---|
659 | }
|
---|
660 | }
|
---|
661 | }
|
---|
662 | }
|
---|
663 | else
|
---|
664 | {
|
---|
665 | drprintf(("VBoxVideoWddm: pfnGetTopology failed Status(0x%x)\n"));
|
---|
666 | }
|
---|
667 | }
|
---|
668 | else
|
---|
669 | {
|
---|
670 | drprintf(("VBoxVideoWddm: DxgkCbQueryVidPnInterface failed Status(0x%x)\n"));
|
---|
671 | }
|
---|
672 | pIsSupportedVidPnArg->IsVidPnSupported = bSupported;
|
---|
673 |
|
---|
674 | dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
|
---|
675 |
|
---|
676 | return STATUS_SUCCESS;
|
---|
677 | }
|
---|
678 |
|
---|
679 | NTSTATUS
|
---|
680 | APIENTRY
|
---|
681 | DxgkDdiRecommendFunctionalVidPn(
|
---|
682 | CONST HANDLE hAdapter,
|
---|
683 | CONST DXGKARG_RECOMMENDFUNCTIONALVIDPN* CONST pRecommendFunctionalVidPnArg
|
---|
684 | )
|
---|
685 | {
|
---|
686 | /* The DxgkDdiRecommendFunctionalVidPn should be made pageable. */
|
---|
687 | PAGED_CODE();
|
---|
688 |
|
---|
689 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
|
---|
690 |
|
---|
691 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
|
---|
692 | const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
|
---|
693 | NTSTATUS Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
|
---|
694 | if (Status == STATUS_SUCCESS)
|
---|
695 | {
|
---|
696 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
|
---|
697 | const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
|
---|
698 | Status = pVidPnInterface->pfnGetTopology(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, &hVidPnTopology, &pVidPnTopologyInterface);
|
---|
699 | if (Status == STATUS_SUCCESS)
|
---|
700 | {
|
---|
701 | D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo;
|
---|
702 | Status = pVidPnTopologyInterface->pfnCreateNewPathInfo(hVidPnTopology, &pNewVidPnPresentPathInfo);
|
---|
703 | if (Status == STATUS_SUCCESS)
|
---|
704 | {
|
---|
705 | pNewVidPnPresentPathInfo->VidPnSourceId = 0;
|
---|
706 | pNewVidPnPresentPathInfo->VidPnTargetId = 0;
|
---|
707 | pNewVidPnPresentPathInfo->ImportanceOrdinal = D3DKMDT_VPPI_PRIMARY;
|
---|
708 | pNewVidPnPresentPathInfo->ContentTransformation.Scaling = D3DKMDT_VPPS_IDENTITY;
|
---|
709 | memset(&pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport,
|
---|
710 | 0, sizeof(pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport));
|
---|
711 | pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Identity = 1;
|
---|
712 | pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Centered = 1;
|
---|
713 | pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Stretched = 0;
|
---|
714 | pNewVidPnPresentPathInfo->ContentTransformation.Rotation = D3DKMDT_VPPR_IDENTITY;
|
---|
715 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Identity = 1;
|
---|
716 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate180 = 0;
|
---|
717 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate270 = 0;
|
---|
718 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate90 = 0;
|
---|
719 | pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx = 0;
|
---|
720 | pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy = 0;
|
---|
721 | pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx = 0;
|
---|
722 | pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy = 0;
|
---|
723 | pNewVidPnPresentPathInfo->VidPnTargetColorBasis = D3DKMDT_CB_SRGB; /* @todo: how does it matters? */
|
---|
724 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FirstChannel = 8;
|
---|
725 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.SecondChannel = 8;
|
---|
726 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.ThirdChannel = 8;
|
---|
727 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel = 0;
|
---|
728 | pNewVidPnPresentPathInfo->Content = D3DKMDT_VPPC_GRAPHICS;
|
---|
729 | pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType = D3DKMDT_VPPMT_NOPROTECTION;
|
---|
730 | pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits = 0;
|
---|
731 | memset(&pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport, 0, sizeof(pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport));
|
---|
732 | pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport.NoProtection = 1;
|
---|
733 | pNewVidPnPresentPathInfo->GammaRamp.Type = D3DDDI_GAMMARAMP_DEFAULT;
|
---|
734 | pNewVidPnPresentPathInfo->GammaRamp.DataSize = 0;
|
---|
735 | Status = pVidPnTopologyInterface->pfnAddPath(hVidPnTopology, pNewVidPnPresentPathInfo);
|
---|
736 | if (Status == STATUS_SUCCESS)
|
---|
737 | {
|
---|
738 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet;
|
---|
739 | const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface;
|
---|
740 | Status = pVidPnInterface->pfnCreateNewSourceModeSet(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn,
|
---|
741 | 0, /*__in CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId */
|
---|
742 | &hNewVidPnSourceModeSet,
|
---|
743 | &pVidPnSourceModeSetInterface);
|
---|
744 | if (Status == STATUS_SUCCESS)
|
---|
745 | {
|
---|
746 | D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo;
|
---|
747 | Status = pVidPnSourceModeSetInterface->pfnCreateNewModeInfo(hNewVidPnSourceModeSet, &pNewVidPnSourceModeInfo);
|
---|
748 | if (Status == STATUS_SUCCESS)
|
---|
749 | {
|
---|
750 | D3DKMDT_VIDEO_PRESENT_SOURCE_MODE_ID modeId = pNewVidPnSourceModeInfo->Id;
|
---|
751 | pNewVidPnSourceModeInfo->Type = D3DKMDT_RMT_GRAPHICS;
|
---|
752 | /* @todo: should we obtain the default mode from the host? */
|
---|
753 | pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx = 1024;
|
---|
754 | pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cy = 768;
|
---|
755 | pNewVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize = pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize;
|
---|
756 | pNewVidPnSourceModeInfo->Format.Graphics.Stride = pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx * 4;
|
---|
757 | pNewVidPnSourceModeInfo->Format.Graphics.PixelFormat = D3DDDIFMT_X8R8G8B8;
|
---|
758 | pNewVidPnSourceModeInfo->Format.Graphics.ColorBasis = D3DKMDT_CB_SRGB;
|
---|
759 | pNewVidPnSourceModeInfo->Format.Graphics.PixelValueAccessMode = D3DKMDT_PVAM_DIRECT;
|
---|
760 | Status = pVidPnSourceModeSetInterface->pfnAddMode(hNewVidPnSourceModeSet, pNewVidPnSourceModeInfo);
|
---|
761 | if (Status == STATUS_SUCCESS)
|
---|
762 | {
|
---|
763 | Status = pVidPnSourceModeSetInterface->pfnPinMode(hNewVidPnSourceModeSet, modeId);
|
---|
764 | if (Status == STATUS_SUCCESS)
|
---|
765 | {
|
---|
766 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet;
|
---|
767 | CONST DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface;
|
---|
768 | Status = pVidPnInterface->pfnCreateNewTargetModeSet(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn,
|
---|
769 | 0, /* __in CONST D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId */
|
---|
770 | &hNewVidPnTargetModeSet,
|
---|
771 | &pVidPnTargetModeSetInterface);
|
---|
772 | if (Status == STATUS_SUCCESS)
|
---|
773 | {
|
---|
774 | D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo;
|
---|
775 | Status = pVidPnTargetModeSetInterface->pfnCreateNewModeInfo(hNewVidPnTargetModeSet, &pNewVidPnTargetModeInfo);
|
---|
776 | if (Status == STATUS_SUCCESS)
|
---|
777 | {
|
---|
778 | D3DKMDT_VIDEO_PRESENT_TARGET_MODE_ID targetId = pNewVidPnTargetModeInfo->Id;
|
---|
779 | pNewVidPnTargetModeInfo->VideoSignalInfo.VideoStandard = D3DKMDT_VSS_OTHER;
|
---|
780 | pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cx = 1024;
|
---|
781 | pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cy = 768;
|
---|
782 | pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize = pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize;
|
---|
783 | pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Numerator = 60;
|
---|
784 | pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Denominator = 1;
|
---|
785 | pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Numerator = 63 * 768; /* @todo: do we need that? */
|
---|
786 | pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Denominator = 1;
|
---|
787 | pNewVidPnTargetModeInfo->VideoSignalInfo.PixelRate = 165000; /* ?? */
|
---|
788 | pNewVidPnTargetModeInfo->VideoSignalInfo.ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE;
|
---|
789 | pNewVidPnTargetModeInfo->Preference = D3DKMDT_MP_PREFERRED;
|
---|
790 | Status = pVidPnTargetModeSetInterface->pfnAddMode(hNewVidPnTargetModeSet, pNewVidPnTargetModeInfo);
|
---|
791 | if (Status == STATUS_SUCCESS)
|
---|
792 | {
|
---|
793 | Status = pVidPnTargetModeSetInterface->pfnPinMode(hNewVidPnTargetModeSet, targetId);
|
---|
794 | if (Status == STATUS_SUCCESS)
|
---|
795 | {
|
---|
796 |
|
---|
797 | }
|
---|
798 | else
|
---|
799 | {
|
---|
800 | drprintf(("VBoxVideoWddm: pfnPinMode (target) failed Status(0x%x)\n"));
|
---|
801 | }
|
---|
802 | }
|
---|
803 | else
|
---|
804 | {
|
---|
805 | drprintf(("VBoxVideoWddm: pfnAddMode (target) failed Status(0x%x)\n"));
|
---|
806 | pVidPnTargetModeSetInterface->pfnReleaseModeInfo(hNewVidPnTargetModeSet, pNewVidPnTargetModeInfo);
|
---|
807 | pNewVidPnTargetModeInfo = NULL;
|
---|
808 | }
|
---|
809 | }
|
---|
810 | else
|
---|
811 | {
|
---|
812 | drprintf(("VBoxVideoWddm: pfnCreateNewModeInfo (target) failed Status(0x%x)\n"));
|
---|
813 | }
|
---|
814 | }
|
---|
815 | else
|
---|
816 | {
|
---|
817 | drprintf(("VBoxVideoWddm: pfnCreateNewTargetModeSet failed Status(0x%x)\n"));
|
---|
818 | }
|
---|
819 | }
|
---|
820 | else
|
---|
821 | {
|
---|
822 | drprintf(("VBoxVideoWddm: pfnPinMode failed Status(0x%x)\n"));
|
---|
823 | }
|
---|
824 | }
|
---|
825 | else
|
---|
826 | {
|
---|
827 | drprintf(("VBoxVideoWddm: pfnAddMode failed Status(0x%x)\n"));
|
---|
828 | pVidPnSourceModeSetInterface->pfnReleaseModeInfo(hNewVidPnSourceModeSet, pNewVidPnSourceModeInfo);
|
---|
829 | pNewVidPnSourceModeInfo = NULL;
|
---|
830 | }
|
---|
831 | }
|
---|
832 | else
|
---|
833 | {
|
---|
834 | drprintf(("VBoxVideoWddm: pfnCreateNewModeInfo failed Status(0x%x)\n"));
|
---|
835 | }
|
---|
836 | }
|
---|
837 | else
|
---|
838 | {
|
---|
839 | drprintf(("VBoxVideoWddm: pfnCreateNewSourceModeSet failed Status(0x%x)\n"));
|
---|
840 | }
|
---|
841 | }
|
---|
842 | else
|
---|
843 | {
|
---|
844 | drprintf(("VBoxVideoWddm: pfnAddPath failed Status(0x%x)\n"));
|
---|
845 | pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo);
|
---|
846 | pNewVidPnPresentPathInfo = NULL;
|
---|
847 | }
|
---|
848 | }
|
---|
849 | else
|
---|
850 | {
|
---|
851 | drprintf(("VBoxVideoWddm: pfnCreateNewPathInfo failed Status(0x%x)\n"));
|
---|
852 | }
|
---|
853 | }
|
---|
854 | else
|
---|
855 | {
|
---|
856 | drprintf(("VBoxVideoWddm: pfnGetTopology failed Status(0x%x)\n"));
|
---|
857 | }
|
---|
858 | }
|
---|
859 | else
|
---|
860 | {
|
---|
861 | drprintf(("VBoxVideoWddm: DxgkCbQueryVidPnInterface failed Status(0x%x)\n"));
|
---|
862 | }
|
---|
863 |
|
---|
864 | dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
|
---|
865 |
|
---|
866 | return Status;
|
---|
867 | }
|
---|
868 |
|
---|
869 | NTSTATUS
|
---|
870 | APIENTRY
|
---|
871 | DxgkDdiEnumVidPnCofuncModality(
|
---|
872 | CONST HANDLE hAdapter,
|
---|
873 | CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModalityArg
|
---|
874 | )
|
---|
875 | {
|
---|
876 | /* The DxgkDdiEnumVidPnCofuncModality function should be made pageable. */
|
---|
877 | PAGED_CODE();
|
---|
878 |
|
---|
879 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
|
---|
880 |
|
---|
881 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
|
---|
882 |
|
---|
883 | const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
|
---|
884 | NTSTATUS Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pEnumCofuncModalityArg->hConstrainingVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
|
---|
885 | if (Status == STATUS_SUCCESS)
|
---|
886 | {
|
---|
887 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
|
---|
888 | const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
|
---|
889 | NTSTATUS Status = pVidPnInterface->pfnGetTopology(pEnumCofuncModalityArg->hConstrainingVidPn, &hVidPnTopology, &pVidPnTopologyInterface);
|
---|
890 | Assert(Status == STATUS_SUCCESS);
|
---|
891 | if (Status == STATUS_SUCCESS)
|
---|
892 | {
|
---|
893 | VBOXVIDPNCMCONTEXT CbContext = {0};
|
---|
894 | CbContext.pEnumCofuncModalityArg = pEnumCofuncModalityArg;
|
---|
895 | Status = vboxVidPnEnumPaths(pContext, pEnumCofuncModalityArg->hConstrainingVidPn, pVidPnInterface,
|
---|
896 | hVidPnTopology, pVidPnTopologyInterface,
|
---|
897 | vboxVidPnCofuncModalityPathEnum, &CbContext);
|
---|
898 | Assert(Status == STATUS_SUCCESS);
|
---|
899 | if (Status == STATUS_SUCCESS)
|
---|
900 | {
|
---|
901 | Status = CbContext.Status;
|
---|
902 | Assert(Status == STATUS_SUCCESS);
|
---|
903 | if (Status != STATUS_SUCCESS)
|
---|
904 | drprintf((__FUNCTION__ ": vboxVidPnAdjustSourcesTargetsCallback failed Status(0x%x)\n", Status));
|
---|
905 | }
|
---|
906 | else
|
---|
907 | drprintf((__FUNCTION__ ": vboxVidPnEnumPaths failed Status(0x%x)\n", Status));
|
---|
908 | }
|
---|
909 | else
|
---|
910 | drprintf((__FUNCTION__ ": pfnGetTopology failed Status(0x%x)\n", Status));
|
---|
911 | }
|
---|
912 | else
|
---|
913 | drprintf((__FUNCTION__ ": DxgkCbQueryVidPnInterface failed Status(0x%x)\n", Status));
|
---|
914 |
|
---|
915 | dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
|
---|
916 |
|
---|
917 | return STATUS_NOT_IMPLEMENTED;
|
---|
918 | }
|
---|
919 |
|
---|
920 | NTSTATUS
|
---|
921 | APIENTRY
|
---|
922 | DxgkDdiSetVidPnSourceAddress(
|
---|
923 | CONST HANDLE hAdapter,
|
---|
924 | CONST DXGKARG_SETVIDPNSOURCEADDRESS* pSetVidPnSourceAddress
|
---|
925 | )
|
---|
926 | {
|
---|
927 | return STATUS_NOT_IMPLEMENTED;
|
---|
928 | }
|
---|
929 |
|
---|
930 | NTSTATUS
|
---|
931 | APIENTRY
|
---|
932 | DxgkDdiSetVidPnSourceVisibility(
|
---|
933 | CONST HANDLE hAdapter,
|
---|
934 | CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility
|
---|
935 | )
|
---|
936 | {
|
---|
937 | return STATUS_NOT_IMPLEMENTED;
|
---|
938 | }
|
---|
939 |
|
---|
940 | NTSTATUS
|
---|
941 | APIENTRY
|
---|
942 | DxgkDdiCommitVidPn(
|
---|
943 | CONST HANDLE hAdapter,
|
---|
944 | CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPnArg
|
---|
945 | )
|
---|
946 | {
|
---|
947 | return STATUS_NOT_IMPLEMENTED;
|
---|
948 | }
|
---|
949 |
|
---|
950 | NTSTATUS
|
---|
951 | APIENTRY
|
---|
952 | DxgkDdiUpdateActiveVidPnPresentPath(
|
---|
953 | CONST HANDLE hAdapter,
|
---|
954 | CONST DXGKARG_UPDATEACTIVEVIDPNPRESENTPATH* CONST pUpdateActiveVidPnPresentPathArg
|
---|
955 | )
|
---|
956 | {
|
---|
957 | return STATUS_NOT_IMPLEMENTED;
|
---|
958 | }
|
---|
959 |
|
---|
960 | NTSTATUS
|
---|
961 | APIENTRY
|
---|
962 | DxgkDdiRecommendMonitorModes(
|
---|
963 | CONST HANDLE hAdapter,
|
---|
964 | CONST DXGKARG_RECOMMENDMONITORMODES* CONST pRecommendMonitorModesArg
|
---|
965 | )
|
---|
966 | {
|
---|
967 | return STATUS_NOT_IMPLEMENTED;
|
---|
968 | }
|
---|
969 |
|
---|
970 | NTSTATUS
|
---|
971 | APIENTRY
|
---|
972 | DxgkDdiRecommendVidPnTopology(
|
---|
973 | CONST HANDLE hAdapter,
|
---|
974 | CONST DXGKARG_RECOMMENDVIDPNTOPOLOGY* CONST pRecommendVidPnTopologyArg
|
---|
975 | )
|
---|
976 | {
|
---|
977 | return STATUS_NOT_IMPLEMENTED;
|
---|
978 | }
|
---|
979 |
|
---|
980 | NTSTATUS
|
---|
981 | APIENTRY
|
---|
982 | DxgkDdiGetScanLine(
|
---|
983 | CONST HANDLE hAdapter,
|
---|
984 | DXGKARG_GETSCANLINE* pGetScanLine)
|
---|
985 | {
|
---|
986 | return STATUS_NOT_IMPLEMENTED;
|
---|
987 | }
|
---|
988 |
|
---|
989 | NTSTATUS
|
---|
990 | APIENTRY
|
---|
991 | DxgkDdiStopCapture(
|
---|
992 | CONST HANDLE hAdapter,
|
---|
993 | CONST DXGKARG_STOPCAPTURE* pStopCapture)
|
---|
994 | {
|
---|
995 | return STATUS_NOT_IMPLEMENTED;
|
---|
996 | }
|
---|
997 |
|
---|
998 | NTSTATUS
|
---|
999 | APIENTRY
|
---|
1000 | DxgkDdiControlInterrupt(
|
---|
1001 | CONST HANDLE hAdapter,
|
---|
1002 | CONST DXGK_INTERRUPT_TYPE InterruptType,
|
---|
1003 | BOOLEAN Enable
|
---|
1004 | )
|
---|
1005 | {
|
---|
1006 | return STATUS_NOT_IMPLEMENTED;
|
---|
1007 | }
|
---|
1008 |
|
---|
1009 | NTSTATUS
|
---|
1010 | APIENTRY
|
---|
1011 | DxgkDdiCreateOverlay(
|
---|
1012 | CONST HANDLE hAdapter,
|
---|
1013 | DXGKARG_CREATEOVERLAY *pCreateOverlay)
|
---|
1014 | {
|
---|
1015 | return STATUS_NOT_IMPLEMENTED;
|
---|
1016 | }
|
---|
1017 |
|
---|
1018 | NTSTATUS
|
---|
1019 | APIENTRY
|
---|
1020 | DxgkDdiDestroyDevice(
|
---|
1021 | CONST HANDLE hDevice)
|
---|
1022 | {
|
---|
1023 | return STATUS_NOT_IMPLEMENTED;
|
---|
1024 | }
|
---|
1025 |
|
---|
1026 | NTSTATUS
|
---|
1027 | APIENTRY
|
---|
1028 | DxgkDdiOpenAllocation(
|
---|
1029 | CONST HANDLE hDevice,
|
---|
1030 | CONST DXGKARG_OPENALLOCATION *pOpenAllocation)
|
---|
1031 | {
|
---|
1032 | return STATUS_NOT_IMPLEMENTED;
|
---|
1033 | }
|
---|
1034 |
|
---|
1035 | NTSTATUS
|
---|
1036 | APIENTRY
|
---|
1037 | DxgkDdiCloseAllocation(
|
---|
1038 | CONST HANDLE hDevice,
|
---|
1039 | CONST DXGKARG_CLOSEALLOCATION* pCloseAllocation)
|
---|
1040 | {
|
---|
1041 | return STATUS_NOT_IMPLEMENTED;
|
---|
1042 | }
|
---|
1043 |
|
---|
1044 | NTSTATUS
|
---|
1045 | APIENTRY
|
---|
1046 | DxgkDdiRender(
|
---|
1047 | CONST HANDLE hContext,
|
---|
1048 | DXGKARG_RENDER *pRender)
|
---|
1049 | {
|
---|
1050 | return STATUS_NOT_IMPLEMENTED;
|
---|
1051 | }
|
---|
1052 |
|
---|
1053 | NTSTATUS
|
---|
1054 | APIENTRY
|
---|
1055 | DxgkDdiPresent(
|
---|
1056 | CONST HANDLE hContext,
|
---|
1057 | DXGKARG_PRESENT *pPresent)
|
---|
1058 | {
|
---|
1059 | return STATUS_NOT_IMPLEMENTED;
|
---|
1060 | }
|
---|
1061 |
|
---|
1062 | NTSTATUS
|
---|
1063 | APIENTRY
|
---|
1064 | DxgkDdiUpdateOverlay(
|
---|
1065 | CONST HANDLE hOverlay,
|
---|
1066 | CONST DXGKARG_UPDATEOVERLAY *pUpdateOverlay)
|
---|
1067 | {
|
---|
1068 | return STATUS_NOT_IMPLEMENTED;
|
---|
1069 | }
|
---|
1070 |
|
---|
1071 | NTSTATUS
|
---|
1072 | APIENTRY
|
---|
1073 | DxgkDdiFlipOverlay(
|
---|
1074 | CONST HANDLE hOverlay,
|
---|
1075 | CONST DXGKARG_FLIPOVERLAY *pFlipOverlay)
|
---|
1076 | {
|
---|
1077 | return STATUS_NOT_IMPLEMENTED;
|
---|
1078 | }
|
---|
1079 |
|
---|
1080 | NTSTATUS
|
---|
1081 | APIENTRY
|
---|
1082 | DxgkDdiDestroyOverlay(
|
---|
1083 | CONST HANDLE hOverlay)
|
---|
1084 | {
|
---|
1085 | return STATUS_NOT_IMPLEMENTED;
|
---|
1086 | }
|
---|
1087 |
|
---|
1088 | NTSTATUS
|
---|
1089 | APIENTRY
|
---|
1090 | DxgkDdiCreateContext(
|
---|
1091 | CONST HANDLE hDevice,
|
---|
1092 | DXGKARG_CREATECONTEXT *pCreateContext)
|
---|
1093 | {
|
---|
1094 | return STATUS_NOT_IMPLEMENTED;
|
---|
1095 | }
|
---|
1096 |
|
---|
1097 | NTSTATUS
|
---|
1098 | APIENTRY
|
---|
1099 | DxgkDdiDestroyContext(
|
---|
1100 | CONST HANDLE hContext)
|
---|
1101 | {
|
---|
1102 | return STATUS_NOT_IMPLEMENTED;
|
---|
1103 | }
|
---|
1104 |
|
---|
1105 | NTSTATUS
|
---|
1106 | APIENTRY
|
---|
1107 | DxgkDdiLinkDevice(
|
---|
1108 | __in CONST PDEVICE_OBJECT PhysicalDeviceObject,
|
---|
1109 | __in CONST PVOID MiniportDeviceContext,
|
---|
1110 | __inout PLINKED_DEVICE LinkedDevice
|
---|
1111 | )
|
---|
1112 | {
|
---|
1113 | return STATUS_NOT_IMPLEMENTED;
|
---|
1114 | }
|
---|
1115 |
|
---|
1116 | NTSTATUS
|
---|
1117 | APIENTRY
|
---|
1118 | DxgkDdiSetDisplayPrivateDriverFormat(
|
---|
1119 | CONST HANDLE hAdapter,
|
---|
1120 | /*CONST*/ DXGKARG_SETDISPLAYPRIVATEDRIVERFORMAT* pSetDisplayPrivateDriverFormat
|
---|
1121 | )
|
---|
1122 | {
|
---|
1123 | return STATUS_NOT_IMPLEMENTED;
|
---|
1124 | }
|
---|
1125 |
|
---|
1126 | NTSTATUS
|
---|
1127 | DriverEntry(
|
---|
1128 | IN PDRIVER_OBJECT DriverObject,
|
---|
1129 | IN PUNICODE_STRING RegistryPath
|
---|
1130 | )
|
---|
1131 | {
|
---|
1132 | dprintf(("VBoxVideoWddm::DriverEntry. Built %s %s\n", __DATE__, __TIME__));
|
---|
1133 |
|
---|
1134 | DRIVER_INITIALIZATION_DATA DriverInitializationData = {'\0'};
|
---|
1135 |
|
---|
1136 | PAGED_CODE();
|
---|
1137 |
|
---|
1138 | if (! ARGUMENT_PRESENT(DriverObject) ||
|
---|
1139 | ! ARGUMENT_PRESENT(RegistryPath))
|
---|
1140 | {
|
---|
1141 | return STATUS_INVALID_PARAMETER;
|
---|
1142 | }
|
---|
1143 |
|
---|
1144 | // Fill in the DriverInitializationData structure and call DxgkInitialize()
|
---|
1145 | DriverInitializationData.Version = DXGKDDI_INTERFACE_VERSION;
|
---|
1146 |
|
---|
1147 | DriverInitializationData.DxgkDdiAddDevice = DxgkDdiAddDevice;
|
---|
1148 | DriverInitializationData.DxgkDdiStartDevice = DxgkDdiStartDevice;
|
---|
1149 | DriverInitializationData.DxgkDdiStopDevice = DxgkDdiStopDevice;
|
---|
1150 | DriverInitializationData.DxgkDdiRemoveDevice = DxgkDdiRemoveDevice;
|
---|
1151 | DriverInitializationData.DxgkDdiDispatchIoRequest = DxgkDdiDispatchIoRequest;
|
---|
1152 | DriverInitializationData.DxgkDdiInterruptRoutine = DxgkDdiInterruptRoutine;
|
---|
1153 | DriverInitializationData.DxgkDdiDpcRoutine = DxgkDdiDpcRoutine;
|
---|
1154 | DriverInitializationData.DxgkDdiQueryChildRelations = DxgkDdiQueryChildRelations;
|
---|
1155 | DriverInitializationData.DxgkDdiQueryChildStatus = DxgkDdiQueryChildStatus;
|
---|
1156 | DriverInitializationData.DxgkDdiQueryDeviceDescriptor = DxgkDdiQueryDeviceDescriptor;
|
---|
1157 | DriverInitializationData.DxgkDdiSetPowerState = DxgkDdiSetPowerState;
|
---|
1158 | DriverInitializationData.DxgkDdiNotifyAcpiEvent = DxgkDdiNotifyAcpiEvent;
|
---|
1159 | DriverInitializationData.DxgkDdiResetDevice = DxgkDdiResetDevice;
|
---|
1160 | DriverInitializationData.DxgkDdiUnload = DxgkDdiUnload;
|
---|
1161 | DriverInitializationData.DxgkDdiQueryInterface = DxgkDdiQueryInterface;
|
---|
1162 | DriverInitializationData.DxgkDdiControlEtwLogging = DxgkDdiControlEtwLogging;
|
---|
1163 |
|
---|
1164 | DriverInitializationData.DxgkDdiQueryAdapterInfo = DxgkDdiQueryAdapterInfo;
|
---|
1165 | DriverInitializationData.DxgkDdiCreateDevice = DxgkDdiCreateDevice;
|
---|
1166 | DriverInitializationData.DxgkDdiCreateAllocation = DxgkDdiCreateAllocation;
|
---|
1167 | DriverInitializationData.DxgkDdiDestroyAllocation = DxgkDdiDestroyAllocation ;
|
---|
1168 |
|
---|
1169 | DriverInitializationData.DxgkDdiDescribeAllocation = DxgkDdiDescribeAllocation;
|
---|
1170 | DriverInitializationData.DxgkDdiGetStandardAllocationDriverData = DxgkDdiGetStandardAllocationDriverData;
|
---|
1171 |
|
---|
1172 | DriverInitializationData.DxgkDdiAcquireSwizzlingRange = DxgkDdiAcquireSwizzlingRange;
|
---|
1173 | DriverInitializationData.DxgkDdiReleaseSwizzlingRange = DxgkDdiReleaseSwizzlingRange;
|
---|
1174 |
|
---|
1175 | DriverInitializationData.DxgkDdiPatch = DxgkDdiPatch;
|
---|
1176 |
|
---|
1177 | DriverInitializationData.DxgkDdiSubmitCommand = DxgkDdiSubmitCommand;
|
---|
1178 | DriverInitializationData.DxgkDdiPreemptCommand = DxgkDdiPreemptCommand;
|
---|
1179 | DriverInitializationData.DxgkDdiBuildPagingBuffer = DxgkDdiBuildPagingBuffer;
|
---|
1180 |
|
---|
1181 | DriverInitializationData.DxgkDdiSetPalette = DxgkDdiSetPalette;
|
---|
1182 | DriverInitializationData.DxgkDdiSetPointerPosition = DxgkDdiSetPointerPosition;
|
---|
1183 | DriverInitializationData.DxgkDdiSetPointerShape = DxgkDdiSetPointerShape;
|
---|
1184 |
|
---|
1185 | DriverInitializationData.DxgkDdiResetFromTimeout = DxgkDdiResetFromTimeout;
|
---|
1186 |
|
---|
1187 | DriverInitializationData.DxgkDdiEscape = DxgkDdiEscape;
|
---|
1188 |
|
---|
1189 | DriverInitializationData.DxgkDdiCollectDbgInfo = DxgkDdiCollectDbgInfo;
|
---|
1190 |
|
---|
1191 | DriverInitializationData.DxgkDdiQueryCurrentFence = DxgkDdiQueryCurrentFence;
|
---|
1192 |
|
---|
1193 | DriverInitializationData.DxgkDdiIsSupportedVidPn = DxgkDdiIsSupportedVidPn;
|
---|
1194 | DriverInitializationData.DxgkDdiRecommendFunctionalVidPn = DxgkDdiRecommendFunctionalVidPn;
|
---|
1195 | DriverInitializationData.DxgkDdiEnumVidPnCofuncModality = DxgkDdiEnumVidPnCofuncModality;
|
---|
1196 | DriverInitializationData.DxgkDdiSetVidPnSourceAddress = DxgkDdiSetVidPnSourceAddress;
|
---|
1197 | DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = DxgkDdiSetVidPnSourceVisibility;
|
---|
1198 | DriverInitializationData.DxgkDdiCommitVidPn = DxgkDdiCommitVidPn;
|
---|
1199 | DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = DxgkDdiUpdateActiveVidPnPresentPath;
|
---|
1200 |
|
---|
1201 | DriverInitializationData.DxgkDdiRecommendMonitorModes = DxgkDdiRecommendMonitorModes;
|
---|
1202 | DriverInitializationData.DxgkDdiRecommendVidPnTopology = DxgkDdiRecommendVidPnTopology;
|
---|
1203 |
|
---|
1204 | DriverInitializationData.DxgkDdiGetScanLine = DxgkDdiGetScanLine;
|
---|
1205 |
|
---|
1206 | DriverInitializationData.DxgkDdiStopCapture = DxgkDdiStopCapture;
|
---|
1207 |
|
---|
1208 | DriverInitializationData.DxgkDdiControlInterrupt = DxgkDdiControlInterrupt;
|
---|
1209 |
|
---|
1210 | DriverInitializationData.DxgkDdiCreateOverlay = DxgkDdiCreateOverlay;
|
---|
1211 |
|
---|
1212 | DriverInitializationData.DxgkDdiDestroyDevice = DxgkDdiDestroyDevice;
|
---|
1213 |
|
---|
1214 | DriverInitializationData.DxgkDdiOpenAllocation = DxgkDdiOpenAllocation;
|
---|
1215 | DriverInitializationData.DxgkDdiCloseAllocation = DxgkDdiCloseAllocation;
|
---|
1216 |
|
---|
1217 | DriverInitializationData.DxgkDdiRender = DxgkDdiRender;
|
---|
1218 | DriverInitializationData.DxgkDdiPresent = DxgkDdiPresent;
|
---|
1219 |
|
---|
1220 | DriverInitializationData.DxgkDdiUpdateOverlay = DxgkDdiUpdateOverlay;
|
---|
1221 | DriverInitializationData.DxgkDdiFlipOverlay = DxgkDdiFlipOverlay;
|
---|
1222 | DriverInitializationData.DxgkDdiDestroyOverlay = DxgkDdiDestroyOverlay;
|
---|
1223 |
|
---|
1224 | DriverInitializationData.DxgkDdiCreateContext = DxgkDdiCreateContext;
|
---|
1225 | DriverInitializationData.DxgkDdiDestroyContext = DxgkDdiDestroyContext;
|
---|
1226 |
|
---|
1227 | DriverInitializationData.DxgkDdiLinkDevice = DxgkDdiLinkDevice;
|
---|
1228 | DriverInitializationData.DxgkDdiSetDisplayPrivateDriverFormat = DxgkDdiSetDisplayPrivateDriverFormat;
|
---|
1229 |
|
---|
1230 | //#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7)
|
---|
1231 | // DriverInitializationData.DxgkDdiRenderKm = D3DDDIRenderKm;
|
---|
1232 | // DriverInitializationData.DxgkDdiRestartFromTimeout = D3DDDIRestartFromTimeout;
|
---|
1233 | // DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = DxgkDdiSetVidPnSourceVisibility;
|
---|
1234 | // DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = D3DDDIUpdateActiveVidPnPresentPath;
|
---|
1235 | // DriverInitializationData.DxgkDdiQueryVidPnHWCapability = D3DDDI DxgkDdiQueryVidPnHWCapability;
|
---|
1236 | //#endif
|
---|
1237 |
|
---|
1238 | return DxgkInitialize(DriverObject,
|
---|
1239 | RegistryPath,
|
---|
1240 | &DriverInitializationData);
|
---|
1241 | }
|
---|