VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h@ 86110

Last change on this file since 86110 was 86025, checked in by vboxsync, 4 years ago

Devices/Graphics: use current VMSVGA headers (GCC tweaks)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.1 KB
Line 
1/* $Id: DevVGA-SVGA.h 86025 2020-09-03 16:00:44Z vboxsync $ */
2/** @file
3 * VMware SVGA device
4 */
5/*
6 * Copyright (C) 2013-2020 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA_h
18#define VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA_h
19#ifndef RT_WITHOUT_PRAGMA_ONCE
20# pragma once
21#endif
22
23#ifndef VBOX_WITH_VMSVGA
24# error "VBOX_WITH_VMSVGA is not defined"
25#endif
26
27#include <VBox/pci.h>
28#include <VBox/vmm/pdmifs.h>
29#include <VBox/vmm/pdmthread.h>
30#include <VBox/vmm/stam.h>
31
32/*
33 * PCI device IDs.
34 */
35#ifndef PCI_VENDOR_ID_VMWARE
36# define PCI_VENDOR_ID_VMWARE 0x15AD
37#endif
38#ifndef PCI_DEVICE_ID_VMWARE_SVGA2
39# define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
40#endif
41
42/* For "svga_overlay.h" */
43#ifndef TRUE
44# define TRUE 1
45#endif
46#ifndef FALSE
47# define FALSE 0
48#endif
49
50/* GCC complains that 'ISO C++ prohibits anonymous structs' when "-Wpedantic" is enabled. */
51#if RT_GNUC_PREREQ(4, 6)
52# pragma GCC diagnostic push
53# pragma GCC diagnostic ignored "-Wpedantic"
54#endif
55/* VMSVGA headers from SVGA Gallium driver. */
56#include <svga3d_caps.h>
57#include <svga3d_reg.h>
58#include <svga3d_shaderdefs.h>
59#include <svga_escape.h>
60#include <svga_overlay.h>
61#if RT_GNUC_PREREQ(4, 6)
62# pragma GCC diagnostic pop
63#endif
64
65/* Deprecated commands. They are not included in the VMSVGA headers anymore. */
66#define SVGA_CMD_RECT_FILL 2
67#define SVGA_CMD_DISPLAY_CURSOR 20
68#define SVGA_CMD_MOVE_CURSOR 21
69
70/*
71 * SVGA_CMD_RECT_FILL --
72 *
73 * Fill a rectangular area in the the GFB, and copy the result
74 * to any screens which intersect it.
75 *
76 * Deprecated?
77 *
78 * Availability:
79 * SVGA_CAP_RECT_FILL
80 */
81
82typedef
83struct {
84 uint32_t pixel;
85 uint32_t destX;
86 uint32_t destY;
87 uint32_t width;
88 uint32_t height;
89} SVGAFifoCmdRectFill;
90
91/*
92 * SVGA_CMD_DISPLAY_CURSOR --
93 *
94 * Turn the cursor on or off.
95 *
96 * Deprecated.
97 *
98 * Availability:
99 * SVGA_CAP_CURSOR?
100 */
101
102typedef
103struct {
104 uint32_t id; // Reserved, must be zero.
105 uint32_t state; // 0=off
106} SVGAFifoCmdDisplayCursor;
107
108/*
109 * SVGA_CMD_MOVE_CURSOR --
110 *
111 * Set the cursor position.
112 *
113 * Deprecated.
114 *
115 * Availability:
116 * SVGA_CAP_CURSOR?
117 */
118
119typedef
120struct {
121 SVGASignedPoint pos;
122} SVGAFifoCmdMoveCursor;
123
124
125/** Default FIFO size. */
126#define VMSVGA_FIFO_SIZE _2M
127/** The old FIFO size. */
128#define VMSVGA_FIFO_SIZE_OLD _128K
129
130/** Default scratch region size. */
131#define VMSVGA_SCRATCH_SIZE 0x100
132/** Surface memory available to the guest. */
133#define VMSVGA_SURFACE_SIZE (512*1024*1024)
134/** Maximum GMR pages. */
135#define VMSVGA_MAX_GMR_PAGES 0x100000
136/** Maximum nr of GMR ids. */
137#define VMSVGA_MAX_GMR_IDS _8K
138/** Maximum number of GMR descriptors. */
139#define VMSVGA_MAX_GMR_DESC_LOOP_COUNT VMSVGA_MAX_GMR_PAGES
140
141#define VMSVGA_VAL_UNINITIALIZED (unsigned)-1
142
143/** For validating X and width values.
144 * The code assumes it's at least an order of magnitude less than UINT32_MAX. */
145#define VMSVGA_MAX_X _1M
146/** For validating Y and height values.
147 * The code assumes it's at least an order of magnitude less than UINT32_MAX. */
148#define VMSVGA_MAX_Y _1M
149
150/* u32ActionFlags */
151#define VMSVGA_ACTION_CHANGEMODE_BIT 0
152#define VMSVGA_ACTION_CHANGEMODE RT_BIT(VMSVGA_ACTION_CHANGEMODE_BIT)
153
154
155#ifdef DEBUG
156/* Enable to log FIFO register accesses. */
157//# define DEBUG_FIFO_ACCESS
158/* Enable to log GMR page accesses. */
159//# define DEBUG_GMR_ACCESS
160#endif
161
162#define VMSVGA_FIFO_EXTCMD_NONE 0
163#define VMSVGA_FIFO_EXTCMD_TERMINATE 1
164#define VMSVGA_FIFO_EXTCMD_SAVESTATE 2
165#define VMSVGA_FIFO_EXTCMD_LOADSTATE 3
166#define VMSVGA_FIFO_EXTCMD_RESET 4
167#define VMSVGA_FIFO_EXTCMD_UPDATE_SURFACE_HEAP_BUFFERS 5
168#define VMSVGA_FIFO_EXTCMD_POWEROFF 6
169
170/** Size of the region to backup when switching into svga mode. */
171#define VMSVGA_VGA_FB_BACKUP_SIZE _512K
172
173/** @def VMSVGA_WITH_VGA_FB_BACKUP
174 * Enables correct VGA MMIO read/write handling when VMSVGA is enabled. It
175 * is SLOW and probably not entirely right, but it helps with getting 3dmark
176 * output and other stuff. */
177#define VMSVGA_WITH_VGA_FB_BACKUP 1
178
179/** @def VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RING3
180 * defined(VMSVGA_WITH_VGA_FB_BACKUP) && defined(IN_RING3) */
181#if (defined(VMSVGA_WITH_VGA_FB_BACKUP) && defined(IN_RING3)) || defined(DOXYGEN_RUNNING)
182# define VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RING3 1
183#else
184# undef VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RING3
185#endif
186
187/** @def VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RZ
188 * defined(VMSVGA_WITH_VGA_FB_BACKUP) && !defined(IN_RING3) */
189#if (defined(VMSVGA_WITH_VGA_FB_BACKUP) && !defined(IN_RING3)) || defined(DOXYGEN_RUNNING)
190# define VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RZ 1
191#else
192# undef VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RZ
193#endif
194
195
196typedef struct
197{
198 PSSMHANDLE pSSM;
199 uint32_t uVersion;
200 uint32_t uPass;
201} VMSVGA_STATE_LOAD;
202typedef VMSVGA_STATE_LOAD *PVMSVGA_STATE_LOAD;
203
204/** Host screen viewport.
205 * (4th quadrant with negated Y values - usual Windows and X11 world view.) */
206typedef struct VMSVGAVIEWPORT
207{
208 uint32_t x; /**< x coordinate (left). */
209 uint32_t y; /**< y coordinate (top). */
210 uint32_t cx; /**< width. */
211 uint32_t cy; /**< height. */
212 /** Right side coordinate (exclusive). Same as x + cx. */
213 uint32_t xRight;
214 /** First quadrant low y coordinate.
215 * Same as y + cy - 1 in window coordinates. */
216 uint32_t yLowWC;
217 /** First quadrant high y coordinate (exclusive) - yLowWC + cy.
218 * Same as y - 1 in window coordinates. */
219 uint32_t yHighWC;
220 /** Alignment padding. */
221 uint32_t uAlignment;
222} VMSVGAVIEWPORT;
223
224#ifdef VBOX_WITH_VMSVGA3D
225typedef struct VMSVGAHWSCREEN *PVMSVGAHWSCREEN;
226#endif
227
228/**
229 * Screen object state.
230 */
231typedef struct VMSVGASCREENOBJECT
232{
233 /** SVGA_SCREEN_* flags. */
234 uint32_t fuScreen;
235 /** The screen object id. */
236 uint32_t idScreen;
237 /** The screen dimensions. */
238 int32_t xOrigin;
239 int32_t yOrigin;
240 uint32_t cWidth;
241 uint32_t cHeight;
242 /** Offset of the screen buffer in the guest VRAM. */
243 uint32_t offVRAM;
244 /** Scanline pitch. */
245 uint32_t cbPitch;
246 /** Bits per pixel. */
247 uint32_t cBpp;
248 bool fDefined;
249 bool fModified;
250#ifdef VBOX_WITH_VMSVGA3D
251 /** Pointer to the HW accelerated (3D) screen data. */
252 R3PTRTYPE(PVMSVGAHWSCREEN) pHwScreen;
253#endif
254} VMSVGASCREENOBJECT;
255
256/** Pointer to the private VMSVGA ring-3 state structure.
257 * @todo Still not entirely satisfired with the type name, but better than
258 * the previous lower/upper case only distinction. */
259typedef struct VMSVGAR3STATE *PVMSVGAR3STATE;
260/** Pointer to the private (implementation specific) VMSVGA3d state. */
261typedef struct VMSVGA3DSTATE *PVMSVGA3DSTATE;
262
263
264/**
265 * The VMSVGA device state.
266 *
267 * This instantatiated as VGASTATE::svga.
268 */
269typedef struct VMSVGAState
270{
271 /** Guest physical address of the FIFO memory range. */
272 RTGCPHYS GCPhysFIFO;
273 /** Size in bytes of the FIFO memory range.
274 * This may be smaller than cbFIFOConfig after restoring an old VM state. */
275 uint32_t cbFIFO;
276 /** The configured FIFO size. */
277 uint32_t cbFIFOConfig;
278 /** SVGA id. */
279 uint32_t u32SVGAId;
280 /** SVGA extensions enabled or not. */
281 uint32_t fEnabled;
282 /** SVGA memory area configured status. */
283 uint32_t fConfigured;
284 /** Device is busy handling FIFO requests (VMSVGA_BUSY_F_FIFO,
285 * VMSVGA_BUSY_F_EMT_FORCE). */
286 uint32_t volatile fBusy;
287#define VMSVGA_BUSY_F_FIFO RT_BIT_32(0) /**< The normal true/false busy FIFO bit. */
288#define VMSVGA_BUSY_F_EMT_FORCE RT_BIT_32(1) /**< Bit preventing race status flickering when EMT kicks the FIFO thread. */
289 /** Traces (dirty page detection) enabled or not. */
290 uint32_t fTraces;
291 /** Guest OS identifier. */
292 uint32_t u32GuestId;
293 /** Scratch region size (VMSVGAState::au32ScratchRegion). */
294 uint32_t cScratchRegion;
295 /** Irq status. */
296 uint32_t u32IrqStatus;
297 /** Irq mask. */
298 uint32_t u32IrqMask;
299 /** Pitch lock. */
300 uint32_t u32PitchLock;
301 /** Current GMR id. (SVGA_REG_GMR_ID) */
302 uint32_t u32CurrentGMRId;
303 /** Register caps. */
304 uint32_t u32RegCaps;
305 uint32_t Padding0; /* Used to be I/O port base address. */
306 /** Port io index register. */
307 uint32_t u32IndexReg;
308 /** FIFO request semaphore. */
309 SUPSEMEVENT hFIFORequestSem;
310 /** The last seen SVGA_FIFO_CURSOR_COUNT value.
311 * Used by the FIFO thread and its watchdog. */
312 uint32_t uLastCursorUpdateCount;
313 /** Indicates that the FIFO thread is sleeping and might need waking up. */
314 bool volatile fFIFOThreadSleeping;
315 /** The legacy GFB mode registers. If used, they correspond to screen 0. */
316 /** True when the guest modifies the GFB mode registers. */
317 bool fGFBRegisters;
318 /** SVGA 3D overlay enabled or not. */
319 bool f3DOverlayEnabled;
320 bool afPadding[5];
321 uint32_t uWidth;
322 uint32_t uHeight;
323 uint32_t uBpp;
324 uint32_t cbScanline;
325 uint32_t uHostBpp;
326 /** Maximum width supported. */
327 uint32_t u32MaxWidth;
328 /** Maximum height supported. */
329 uint32_t u32MaxHeight;
330 /** Viewport rectangle, i.e. what's currently visible of the target host
331 * window. This is usually (0,0)(uWidth,uHeight), but if the window is
332 * shrunk and scrolling applied, both the origin and size may differ. */
333 VMSVGAVIEWPORT viewport;
334 /** Action flags */
335 uint32_t u32ActionFlags;
336 /** SVGA 3d extensions enabled or not. */
337 bool f3DEnabled;
338 /** VRAM page monitoring enabled or not. */
339 bool fVRAMTracking;
340 /** External command to be executed in the FIFO thread. */
341 uint8_t volatile u8FIFOExtCommand;
342 /** Set by vmsvgaR3RunExtCmdOnFifoThread when it temporarily resumes the FIFO
343 * thread and does not want it do anything but the command. */
344 bool volatile fFifoExtCommandWakeup;
345#ifdef DEBUG_GMR_ACCESS
346 /** GMR debug access handler type handle. */
347 PGMPHYSHANDLERTYPE hGmrAccessHandlerType;
348#endif
349#if defined(VMSVGA_USE_FIFO_ACCESS_HANDLER) || defined(DEBUG_FIFO_ACCESS)
350 /** FIFO debug access handler type handle. */
351 PGMPHYSHANDLERTYPE hFifoAccessHandlerType;
352#elif defined(DEBUG_GMR_ACCESS)
353 uint32_t uPadding1;
354#endif
355 /** Number of GMRs. */
356 uint32_t cGMR;
357 uint32_t uScreenOffset; /* Used only for loading older saved states. */
358
359 /** Legacy cursor state. */
360 uint32_t uCursorX;
361 uint32_t uCursorY;
362 uint32_t uCursorID;
363 uint32_t uCursorOn;
364
365 /** Scratch array.
366 * Putting this at the end since it's big it probably not . */
367 uint32_t au32ScratchRegion[VMSVGA_SCRATCH_SIZE];
368
369 STAMCOUNTER StatRegBitsPerPixelWr;
370 STAMCOUNTER StatRegBusyWr;
371 STAMCOUNTER StatRegCursorXWr;
372 STAMCOUNTER StatRegCursorYWr;
373 STAMCOUNTER StatRegCursorIdWr;
374 STAMCOUNTER StatRegCursorOnWr;
375 STAMCOUNTER StatRegDepthWr;
376 STAMCOUNTER StatRegDisplayHeightWr;
377 STAMCOUNTER StatRegDisplayIdWr;
378 STAMCOUNTER StatRegDisplayIsPrimaryWr;
379 STAMCOUNTER StatRegDisplayPositionXWr;
380 STAMCOUNTER StatRegDisplayPositionYWr;
381 STAMCOUNTER StatRegDisplayWidthWr;
382 STAMCOUNTER StatRegEnableWr;
383 STAMCOUNTER StatRegGmrIdWr;
384 STAMCOUNTER StatRegGuestIdWr;
385 STAMCOUNTER StatRegHeightWr;
386 STAMCOUNTER StatRegIdWr;
387 STAMCOUNTER StatRegIrqMaskWr;
388 STAMCOUNTER StatRegNumDisplaysWr;
389 STAMCOUNTER StatRegNumGuestDisplaysWr;
390 STAMCOUNTER StatRegPaletteWr;
391 STAMCOUNTER StatRegPitchLockWr;
392 STAMCOUNTER StatRegPseudoColorWr;
393 STAMCOUNTER StatRegReadOnlyWr;
394 STAMCOUNTER StatRegScratchWr;
395 STAMCOUNTER StatRegSyncWr;
396 STAMCOUNTER StatRegTopWr;
397 STAMCOUNTER StatRegTracesWr;
398 STAMCOUNTER StatRegUnknownWr;
399 STAMCOUNTER StatRegWidthWr;
400
401 STAMCOUNTER StatRegBitsPerPixelRd;
402 STAMCOUNTER StatRegBlueMaskRd;
403 STAMCOUNTER StatRegBusyRd;
404 STAMCOUNTER StatRegBytesPerLineRd;
405 STAMCOUNTER StatRegCapabilitesRd;
406 STAMCOUNTER StatRegConfigDoneRd;
407 STAMCOUNTER StatRegCursorXRd;
408 STAMCOUNTER StatRegCursorYRd;
409 STAMCOUNTER StatRegCursorIdRd;
410 STAMCOUNTER StatRegCursorOnRd;
411 STAMCOUNTER StatRegDepthRd;
412 STAMCOUNTER StatRegDisplayHeightRd;
413 STAMCOUNTER StatRegDisplayIdRd;
414 STAMCOUNTER StatRegDisplayIsPrimaryRd;
415 STAMCOUNTER StatRegDisplayPositionXRd;
416 STAMCOUNTER StatRegDisplayPositionYRd;
417 STAMCOUNTER StatRegDisplayWidthRd;
418 STAMCOUNTER StatRegEnableRd;
419 STAMCOUNTER StatRegFbOffsetRd;
420 STAMCOUNTER StatRegFbSizeRd;
421 STAMCOUNTER StatRegFbStartRd;
422 STAMCOUNTER StatRegGmrIdRd;
423 STAMCOUNTER StatRegGmrMaxDescriptorLengthRd;
424 STAMCOUNTER StatRegGmrMaxIdsRd;
425 STAMCOUNTER StatRegGmrsMaxPagesRd;
426 STAMCOUNTER StatRegGreenMaskRd;
427 STAMCOUNTER StatRegGuestIdRd;
428 STAMCOUNTER StatRegHeightRd;
429 STAMCOUNTER StatRegHostBitsPerPixelRd;
430 STAMCOUNTER StatRegIdRd;
431 STAMCOUNTER StatRegIrqMaskRd;
432 STAMCOUNTER StatRegMaxHeightRd;
433 STAMCOUNTER StatRegMaxWidthRd;
434 STAMCOUNTER StatRegMemorySizeRd;
435 STAMCOUNTER StatRegMemRegsRd;
436 STAMCOUNTER StatRegMemSizeRd;
437 STAMCOUNTER StatRegMemStartRd;
438 STAMCOUNTER StatRegNumDisplaysRd;
439 STAMCOUNTER StatRegNumGuestDisplaysRd;
440 STAMCOUNTER StatRegPaletteRd;
441 STAMCOUNTER StatRegPitchLockRd;
442 STAMCOUNTER StatRegPsuedoColorRd;
443 STAMCOUNTER StatRegRedMaskRd;
444 STAMCOUNTER StatRegScratchRd;
445 STAMCOUNTER StatRegScratchSizeRd;
446 STAMCOUNTER StatRegSyncRd;
447 STAMCOUNTER StatRegTopRd;
448 STAMCOUNTER StatRegTracesRd;
449 STAMCOUNTER StatRegUnknownRd;
450 STAMCOUNTER StatRegVramSizeRd;
451 STAMCOUNTER StatRegWidthRd;
452 STAMCOUNTER StatRegWriteOnlyRd;
453} VMSVGAState, VMSVGASTATE;
454
455
456/**
457 * The VMSVGA device state for ring-3
458 *
459 * This instantatiated as VGASTATER3::svga.
460 */
461typedef struct VMSVGASTATER3
462{
463 /** The R3 FIFO pointer. */
464 R3PTRTYPE(uint32_t *) pau32FIFO;
465 /** R3 Opaque pointer to svga state. */
466 R3PTRTYPE(PVMSVGAR3STATE) pSvgaR3State;
467 /** R3 Opaque pointer to 3d state. */
468 R3PTRTYPE(PVMSVGA3DSTATE) p3dState;
469 /** The separate VGA frame buffer in svga mode.
470 * Unlike the the boch-based VGA device implementation, VMSVGA seems to have a
471 * separate frame buffer for VGA and allows concurrent use of both. The SVGA
472 * SDK is making use of this to do VGA text output while testing other things in
473 * SVGA mode, displaying the result by switching back to VGA text mode. So,
474 * when entering SVGA mode we copy the first part of the frame buffer here and
475 * direct VGA accesses here instead. It is copied back when leaving SVGA mode. */
476 R3PTRTYPE(uint8_t *) pbVgaFrameBufferR3;
477 /** R3 Opaque pointer to an external fifo cmd parameter. */
478 R3PTRTYPE(void * volatile) pvFIFOExtCmdParam;
479
480 /** FIFO external command semaphore. */
481 R3PTRTYPE(RTSEMEVENT) hFIFOExtCmdSem;
482 /** FIFO IO Thread. */
483 R3PTRTYPE(PPDMTHREAD) pFIFOIOThread;
484} VMSVGASTATER3;
485
486
487/**
488 * The VMSVGA device state for ring-0
489 *
490 * This instantatiated as VGASTATER0::svga.
491 */
492typedef struct VMSVGASTATER0
493{
494 /** The R0 FIFO pointer.
495 * @note This only points to the _first_ _page_ of the FIFO! */
496 R0PTRTYPE(uint32_t *) pau32FIFO;
497} VMSVGASTATER0;
498
499
500typedef struct VGAState *PVGASTATE;
501typedef struct VGASTATER3 *PVGASTATER3;
502typedef struct VGASTATER0 *PVGASTATER0;
503typedef struct VGASTATERC *PVGASTATERC;
504typedef CTX_SUFF(PVGASTATE) PVGASTATECC;
505
506DECLCALLBACK(int) vmsvgaR3PciIORegionFifoMapUnmap(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion,
507 RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType);
508DECLCALLBACK(VBOXSTRICTRC) vmsvgaIORead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT offPort, uint32_t *pu32, unsigned cb);
509DECLCALLBACK(VBOXSTRICTRC) vmsvgaIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT offPort, uint32_t u32, unsigned cb);
510
511DECLCALLBACK(void) vmsvgaR3PortSetViewport(PPDMIDISPLAYPORT pInterface, uint32_t uScreenId,
512 uint32_t x, uint32_t y, uint32_t cx, uint32_t cy);
513DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PCRTPOINT paPositions);
514
515int vmsvgaR3Init(PPDMDEVINS pDevIns);
516int vmsvgaR3Reset(PPDMDEVINS pDevIns);
517int vmsvgaR3Destruct(PPDMDEVINS pDevIns);
518int vmsvgaR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
519int vmsvgaR3LoadDone(PPDMDEVINS pDevIns);
520int vmsvgaR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
521DECLCALLBACK(void) vmsvgaR3PowerOn(PPDMDEVINS pDevIns);
522DECLCALLBACK(void) vmsvgaR3PowerOff(PPDMDEVINS pDevIns);
523void vmsvgaR3FifoWatchdogTimer(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC);
524
525#ifdef IN_RING3
526VMSVGASCREENOBJECT *vmsvgaR3GetScreenObject(PVGASTATECC pThisCC, uint32_t idScreen);
527int vmsvgaR3UpdateScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, int x, int y, int w, int h);
528#endif
529
530int vmsvgaR3GmrTransfer(PVGASTATE pThis, PVGASTATECC pThisCC, const SVGA3dTransferType enmTransferType,
531 uint8_t *pbHstBuf, uint32_t cbHstBuf, uint32_t offHst, int32_t cbHstPitch,
532 SVGAGuestPtr gstPtr, uint32_t offGst, int32_t cbGstPitch,
533 uint32_t cbWidth, uint32_t cHeight);
534
535void vmsvgaR3ClipCopyBox(const SVGA3dSize *pSizeSrc, const SVGA3dSize *pSizeDest, SVGA3dCopyBox *pBox);
536void vmsvgaR3ClipBox(const SVGA3dSize *pSize, SVGA3dBox *pBox);
537void vmsvgaR3ClipRect(SVGASignedRect const *pBound, SVGASignedRect *pRect);
538
539#endif /* !VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette