1 | /* $Id: DevVGASavedState.h 95008 2022-05-13 16:20:40Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DevVGA - Saved state versions.
|
---|
4 | *
|
---|
5 | * @remarks HGSMI needs this but doesn't want to deal with DevVGA.h, thus this
|
---|
6 | * dedicated header.
|
---|
7 | */
|
---|
8 |
|
---|
9 | /*
|
---|
10 | * Copyright (C) 2006-2022 Oracle Corporation
|
---|
11 | *
|
---|
12 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
13 | * available from http://www.virtualbox.org. This file is free software;
|
---|
14 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
15 | * General Public License (GPL) as published by the Free Software
|
---|
16 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
17 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
18 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef VBOX_INCLUDED_SRC_Graphics_DevVGASavedState_h
|
---|
22 | #define VBOX_INCLUDED_SRC_Graphics_DevVGASavedState_h
|
---|
23 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
24 | # pragma once
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | /** Creates an eyecatching marker in the VGA saved state ("<uSub>Marker\n"). */
|
---|
28 | #define VGA_SAVED_STATE_MAKE_MARKER(uSub) (UINT64_C(0x0a72656b72614d30) + (uint64_t)(uSub))
|
---|
29 |
|
---|
30 | /** Puts a marker. Status code is not checked. */
|
---|
31 | #define VGA_SAVED_STATE_PUT_MARKER(pSSM, uSub) \
|
---|
32 | do { pHlp->pfnSSMPutU64(pSSM, VGA_SAVED_STATE_MAKE_MARKER(uSub)); } while (0)
|
---|
33 |
|
---|
34 | /** Retrieves a VGA saved state marker and checks that it matches, if it
|
---|
35 | * doesn't assert/LogRel and return. */
|
---|
36 | #define VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, uSub) \
|
---|
37 | do { \
|
---|
38 | if (uVersion >= VGA_SAVEDSTATE_VERSION_MARKERS) \
|
---|
39 | { \
|
---|
40 | uint64_t uMarker; \
|
---|
41 | int rcMarker = pHlp->pfnSSMGetU64(pSSM, &uMarker); \
|
---|
42 | AssertLogRelRCReturn(rcMarker, rcMarker); \
|
---|
43 | AssertLogRelMsgReturn(uMarker == VGA_SAVED_STATE_MAKE_MARKER(uSub), \
|
---|
44 | ("Bad VGA marker: expected %llx, got %llx\n", VGA_SAVED_STATE_MAKE_MARKER(uSub), uMarker), \
|
---|
45 | VERR_SSM_DATA_UNIT_FORMAT_CHANGED); \
|
---|
46 | } \
|
---|
47 | } while (0)
|
---|
48 |
|
---|
49 | #define VGA_SAVEDSTATE_VERSION 26
|
---|
50 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_DX_SFLAGS 26 /* SVGA3dSurfaceAllFlags. */
|
---|
51 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_DX_CMDBUF 25 /* Command buffers capability is not tied to VGPU10 setting. */
|
---|
52 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_DX 24 /* VGPU10. */
|
---|
53 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_MIPLEVELS 23 /* Surface struct with number of miplevels. */
|
---|
54 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_CURSOR 22 /* Legacy cursor registers. */
|
---|
55 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_SCREENS 21 /* Screen objects. */
|
---|
56 | #define VGA_SAVEDSTATE_VERSION_VMSVGA 20 /* Multiple updates and fixes for VMSVGA saved state. */
|
---|
57 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_TEX_STAGES 19
|
---|
58 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_GMR_COUNT 18
|
---|
59 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_VGA_FB_FIX 17
|
---|
60 | #define VGA_SAVEDSTATE_VERSION_MARKERS 16
|
---|
61 | #define VGA_SAVEDSTATE_VERSION_MODE_HINTS 15
|
---|
62 | #define VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA 14
|
---|
63 | #define VGA_SAVEDSTATE_VERSION_3D 13
|
---|
64 | #define VGA_SAVEDSTATE_VERSION_HGSMIMA 12 /* HGSMI memory allocator. */
|
---|
65 | #define VGA_SAVEDSTATE_VERSION_VMSVGA_2D 10 /* <- internal build with 2d state only */
|
---|
66 | #define VGA_SAVEDSTATE_VERSION_WITH_PENDVHWA 10
|
---|
67 | #define VGA_SAVEDSTATE_VERSION_INV_GCMDFIFO 8 /* <- states upto and including this version may contain invalid completed Guest Commands fifo entries */
|
---|
68 | #define VGA_SAVEDSTATE_VERSION_INV_VHEIGHT 8 /* <- states upto and including this version may contain invalid vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] value */
|
---|
69 | #define VGA_SAVEDSTATE_VERSION_WDDM 7
|
---|
70 | #define VGA_SAVEDSTATE_VERSION_PRE_WDDM 6
|
---|
71 | #define VGA_SAVEDSTATE_VERSION_HOST_HEAP 5
|
---|
72 | #define VGA_SAVEDSTATE_VERSION_WITH_CONFIG 4
|
---|
73 | #define VGA_SAVEDSTATE_VERSION_HGSMI 3
|
---|
74 | #define VGA_SAVEDSTATE_VERSION_PRE_HGSMI 2
|
---|
75 | #define VGA_SAVEDSTATE_VERSION_ANCIENT 1
|
---|
76 |
|
---|
77 | #endif /* !VBOX_INCLUDED_SRC_Graphics_DevVGASavedState_h */
|
---|
78 |
|
---|