1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 /**********************************************************
3 * Copyright 1998-2020 VMware, Inc.
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without
8 * restriction, including without limitation the rights to use, copy,
9 * modify, merge, publish, distribute, sublicense, and/or sell copies
10 * of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 **********************************************************/
30 * SVGA 3d hardware cmd definitions
33 #ifndef _SVGA3D_CMD_H_
34 #define _SVGA3D_CMD_H_
36 #define INCLUDE_ALLOW_MODULE
37 #define INCLUDE_ALLOW_USERLEVEL
38 #define INCLUDE_ALLOW_VMCORE
40 #include "includeCheck.h"
41 #include "svga3d_types.h"
44 * Identifiers for commands in the command FIFO.
46 * IDs between 1000 and 1039 (inclusive) were used by obsolete versions of
47 * the SVGA3D protocol and remain reserved; they should not be used in the
50 * IDs between 1040 and 2999 (inclusive) are available for use by the
51 * current SVGA3D protocol.
53 * FIFO clients other than SVGA3D should stay below 1000, or at 3000
58 SVGA_3D_CMD_LEGACY_BASE
= 1000,
59 SVGA_3D_CMD_BASE
= 1040,
61 SVGA_3D_CMD_SURFACE_DEFINE
= 1040,
62 SVGA_3D_CMD_SURFACE_DESTROY
= 1041,
63 SVGA_3D_CMD_SURFACE_COPY
= 1042,
64 SVGA_3D_CMD_SURFACE_STRETCHBLT
= 1043,
65 SVGA_3D_CMD_SURFACE_DMA
= 1044,
66 SVGA_3D_CMD_CONTEXT_DEFINE
= 1045,
67 SVGA_3D_CMD_CONTEXT_DESTROY
= 1046,
68 SVGA_3D_CMD_SETTRANSFORM
= 1047,
69 SVGA_3D_CMD_SETZRANGE
= 1048,
70 SVGA_3D_CMD_SETRENDERSTATE
= 1049,
71 SVGA_3D_CMD_SETRENDERTARGET
= 1050,
72 SVGA_3D_CMD_SETTEXTURESTATE
= 1051,
73 SVGA_3D_CMD_SETMATERIAL
= 1052,
74 SVGA_3D_CMD_SETLIGHTDATA
= 1053,
75 SVGA_3D_CMD_SETLIGHTENABLED
= 1054,
76 SVGA_3D_CMD_SETVIEWPORT
= 1055,
77 SVGA_3D_CMD_SETCLIPPLANE
= 1056,
78 SVGA_3D_CMD_CLEAR
= 1057,
79 SVGA_3D_CMD_PRESENT
= 1058,
80 SVGA_3D_CMD_SHADER_DEFINE
= 1059,
81 SVGA_3D_CMD_SHADER_DESTROY
= 1060,
82 SVGA_3D_CMD_SET_SHADER
= 1061,
83 SVGA_3D_CMD_SET_SHADER_CONST
= 1062,
84 SVGA_3D_CMD_DRAW_PRIMITIVES
= 1063,
85 SVGA_3D_CMD_SETSCISSORRECT
= 1064,
86 SVGA_3D_CMD_BEGIN_QUERY
= 1065,
87 SVGA_3D_CMD_END_QUERY
= 1066,
88 SVGA_3D_CMD_WAIT_FOR_QUERY
= 1067,
89 SVGA_3D_CMD_PRESENT_READBACK
= 1068,
90 SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN
= 1069,
91 SVGA_3D_CMD_SURFACE_DEFINE_V2
= 1070,
92 SVGA_3D_CMD_GENERATE_MIPMAPS
= 1071,
93 SVGA_3D_CMD_DEAD4
= 1072,
94 SVGA_3D_CMD_DEAD5
= 1073,
95 SVGA_3D_CMD_DEAD6
= 1074,
96 SVGA_3D_CMD_DEAD7
= 1075,
97 SVGA_3D_CMD_DEAD8
= 1076,
98 SVGA_3D_CMD_DEAD9
= 1077,
99 SVGA_3D_CMD_DEAD10
= 1078,
100 SVGA_3D_CMD_DEAD11
= 1079,
101 SVGA_3D_CMD_ACTIVATE_SURFACE
= 1080,
102 SVGA_3D_CMD_DEACTIVATE_SURFACE
= 1081,
103 SVGA_3D_CMD_SCREEN_DMA
= 1082,
104 SVGA_3D_CMD_DEAD1
= 1083,
105 SVGA_3D_CMD_DEAD2
= 1084,
107 SVGA_3D_CMD_DEAD12
= 1085,
108 SVGA_3D_CMD_DEAD13
= 1086,
109 SVGA_3D_CMD_DEAD14
= 1087,
110 SVGA_3D_CMD_DEAD15
= 1088,
111 SVGA_3D_CMD_DEAD16
= 1089,
112 SVGA_3D_CMD_DEAD17
= 1090,
114 SVGA_3D_CMD_SET_OTABLE_BASE
= 1091,
115 SVGA_3D_CMD_READBACK_OTABLE
= 1092,
117 SVGA_3D_CMD_DEFINE_GB_MOB
= 1093,
118 SVGA_3D_CMD_DESTROY_GB_MOB
= 1094,
119 SVGA_3D_CMD_DEAD3
= 1095,
120 SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING
= 1096,
122 SVGA_3D_CMD_DEFINE_GB_SURFACE
= 1097,
123 SVGA_3D_CMD_DESTROY_GB_SURFACE
= 1098,
124 SVGA_3D_CMD_BIND_GB_SURFACE
= 1099,
125 SVGA_3D_CMD_COND_BIND_GB_SURFACE
= 1100,
126 SVGA_3D_CMD_UPDATE_GB_IMAGE
= 1101,
127 SVGA_3D_CMD_UPDATE_GB_SURFACE
= 1102,
128 SVGA_3D_CMD_READBACK_GB_IMAGE
= 1103,
129 SVGA_3D_CMD_READBACK_GB_SURFACE
= 1104,
130 SVGA_3D_CMD_INVALIDATE_GB_IMAGE
= 1105,
131 SVGA_3D_CMD_INVALIDATE_GB_SURFACE
= 1106,
133 SVGA_3D_CMD_DEFINE_GB_CONTEXT
= 1107,
134 SVGA_3D_CMD_DESTROY_GB_CONTEXT
= 1108,
135 SVGA_3D_CMD_BIND_GB_CONTEXT
= 1109,
136 SVGA_3D_CMD_READBACK_GB_CONTEXT
= 1110,
137 SVGA_3D_CMD_INVALIDATE_GB_CONTEXT
= 1111,
139 SVGA_3D_CMD_DEFINE_GB_SHADER
= 1112,
140 SVGA_3D_CMD_DESTROY_GB_SHADER
= 1113,
141 SVGA_3D_CMD_BIND_GB_SHADER
= 1114,
143 SVGA_3D_CMD_SET_OTABLE_BASE64
= 1115,
145 SVGA_3D_CMD_BEGIN_GB_QUERY
= 1116,
146 SVGA_3D_CMD_END_GB_QUERY
= 1117,
147 SVGA_3D_CMD_WAIT_FOR_GB_QUERY
= 1118,
149 SVGA_3D_CMD_NOP
= 1119,
151 SVGA_3D_CMD_ENABLE_GART
= 1120,
152 SVGA_3D_CMD_DISABLE_GART
= 1121,
153 SVGA_3D_CMD_MAP_MOB_INTO_GART
= 1122,
154 SVGA_3D_CMD_UNMAP_GART_RANGE
= 1123,
156 SVGA_3D_CMD_DEFINE_GB_SCREENTARGET
= 1124,
157 SVGA_3D_CMD_DESTROY_GB_SCREENTARGET
= 1125,
158 SVGA_3D_CMD_BIND_GB_SCREENTARGET
= 1126,
159 SVGA_3D_CMD_UPDATE_GB_SCREENTARGET
= 1127,
161 SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL
= 1128,
162 SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL
= 1129,
164 SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE
= 1130,
166 SVGA_3D_CMD_GB_SCREEN_DMA
= 1131,
167 SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH
= 1132,
168 SVGA_3D_CMD_GB_MOB_FENCE
= 1133,
169 SVGA_3D_CMD_DEFINE_GB_SURFACE_V2
= 1134,
170 SVGA_3D_CMD_DEFINE_GB_MOB64
= 1135,
171 SVGA_3D_CMD_REDEFINE_GB_MOB64
= 1136,
172 SVGA_3D_CMD_NOP_ERROR
= 1137,
174 SVGA_3D_CMD_SET_VERTEX_STREAMS
= 1138,
175 SVGA_3D_CMD_SET_VERTEX_DECLS
= 1139,
176 SVGA_3D_CMD_SET_VERTEX_DIVISORS
= 1140,
177 SVGA_3D_CMD_DRAW
= 1141,
178 SVGA_3D_CMD_DRAW_INDEXED
= 1142,
183 SVGA_3D_CMD_DX_MIN
= 1143,
184 SVGA_3D_CMD_DX_DEFINE_CONTEXT
= 1143,
185 SVGA_3D_CMD_DX_DESTROY_CONTEXT
= 1144,
186 SVGA_3D_CMD_DX_BIND_CONTEXT
= 1145,
187 SVGA_3D_CMD_DX_READBACK_CONTEXT
= 1146,
188 SVGA_3D_CMD_DX_INVALIDATE_CONTEXT
= 1147,
189 SVGA_3D_CMD_DX_SET_SINGLE_CONSTANT_BUFFER
= 1148,
190 SVGA_3D_CMD_DX_SET_SHADER_RESOURCES
= 1149,
191 SVGA_3D_CMD_DX_SET_SHADER
= 1150,
192 SVGA_3D_CMD_DX_SET_SAMPLERS
= 1151,
193 SVGA_3D_CMD_DX_DRAW
= 1152,
194 SVGA_3D_CMD_DX_DRAW_INDEXED
= 1153,
195 SVGA_3D_CMD_DX_DRAW_INSTANCED
= 1154,
196 SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED
= 1155,
197 SVGA_3D_CMD_DX_DRAW_AUTO
= 1156,
198 SVGA_3D_CMD_DX_SET_INPUT_LAYOUT
= 1157,
199 SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS
= 1158,
200 SVGA_3D_CMD_DX_SET_INDEX_BUFFER
= 1159,
201 SVGA_3D_CMD_DX_SET_TOPOLOGY
= 1160,
202 SVGA_3D_CMD_DX_SET_RENDERTARGETS
= 1161,
203 SVGA_3D_CMD_DX_SET_BLEND_STATE
= 1162,
204 SVGA_3D_CMD_DX_SET_DEPTHSTENCIL_STATE
= 1163,
205 SVGA_3D_CMD_DX_SET_RASTERIZER_STATE
= 1164,
206 SVGA_3D_CMD_DX_DEFINE_QUERY
= 1165,
207 SVGA_3D_CMD_DX_DESTROY_QUERY
= 1166,
208 SVGA_3D_CMD_DX_BIND_QUERY
= 1167,
209 SVGA_3D_CMD_DX_SET_QUERY_OFFSET
= 1168,
210 SVGA_3D_CMD_DX_BEGIN_QUERY
= 1169,
211 SVGA_3D_CMD_DX_END_QUERY
= 1170,
212 SVGA_3D_CMD_DX_READBACK_QUERY
= 1171,
213 SVGA_3D_CMD_DX_SET_PREDICATION
= 1172,
214 SVGA_3D_CMD_DX_SET_SOTARGETS
= 1173,
215 SVGA_3D_CMD_DX_SET_VIEWPORTS
= 1174,
216 SVGA_3D_CMD_DX_SET_SCISSORRECTS
= 1175,
217 SVGA_3D_CMD_DX_CLEAR_RENDERTARGET_VIEW
= 1176,
218 SVGA_3D_CMD_DX_CLEAR_DEPTHSTENCIL_VIEW
= 1177,
219 SVGA_3D_CMD_DX_PRED_COPY_REGION
= 1178,
220 SVGA_3D_CMD_DX_PRED_COPY
= 1179,
221 SVGA_3D_CMD_DX_PRESENTBLT
= 1180,
222 SVGA_3D_CMD_DX_GENMIPS
= 1181,
223 SVGA_3D_CMD_DX_UPDATE_SUBRESOURCE
= 1182,
224 SVGA_3D_CMD_DX_READBACK_SUBRESOURCE
= 1183,
225 SVGA_3D_CMD_DX_INVALIDATE_SUBRESOURCE
= 1184,
226 SVGA_3D_CMD_DX_DEFINE_SHADERRESOURCE_VIEW
= 1185,
227 SVGA_3D_CMD_DX_DESTROY_SHADERRESOURCE_VIEW
= 1186,
228 SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW
= 1187,
229 SVGA_3D_CMD_DX_DESTROY_RENDERTARGET_VIEW
= 1188,
230 SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW
= 1189,
231 SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_VIEW
= 1190,
232 SVGA_3D_CMD_DX_DEFINE_ELEMENTLAYOUT
= 1191,
233 SVGA_3D_CMD_DX_DESTROY_ELEMENTLAYOUT
= 1192,
234 SVGA_3D_CMD_DX_DEFINE_BLEND_STATE
= 1193,
235 SVGA_3D_CMD_DX_DESTROY_BLEND_STATE
= 1194,
236 SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_STATE
= 1195,
237 SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_STATE
= 1196,
238 SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE
= 1197,
239 SVGA_3D_CMD_DX_DESTROY_RASTERIZER_STATE
= 1198,
240 SVGA_3D_CMD_DX_DEFINE_SAMPLER_STATE
= 1199,
241 SVGA_3D_CMD_DX_DESTROY_SAMPLER_STATE
= 1200,
242 SVGA_3D_CMD_DX_DEFINE_SHADER
= 1201,
243 SVGA_3D_CMD_DX_DESTROY_SHADER
= 1202,
244 SVGA_3D_CMD_DX_BIND_SHADER
= 1203,
245 SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT
= 1204,
246 SVGA_3D_CMD_DX_DESTROY_STREAMOUTPUT
= 1205,
247 SVGA_3D_CMD_DX_SET_STREAMOUTPUT
= 1206,
248 SVGA_3D_CMD_DX_SET_COTABLE
= 1207,
249 SVGA_3D_CMD_DX_READBACK_COTABLE
= 1208,
250 SVGA_3D_CMD_DX_BUFFER_COPY
= 1209,
251 SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER
= 1210,
252 SVGA_3D_CMD_DX_SURFACE_COPY_AND_READBACK
= 1211,
253 SVGA_3D_CMD_DX_MOVE_QUERY
= 1212,
254 SVGA_3D_CMD_DX_BIND_ALL_QUERY
= 1213,
255 SVGA_3D_CMD_DX_READBACK_ALL_QUERY
= 1214,
256 SVGA_3D_CMD_DX_PRED_TRANSFER_FROM_BUFFER
= 1215,
257 SVGA_3D_CMD_DX_MOB_FENCE_64
= 1216,
258 SVGA_3D_CMD_DX_BIND_ALL_SHADER
= 1217,
259 SVGA_3D_CMD_DX_HINT
= 1218,
260 SVGA_3D_CMD_DX_BUFFER_UPDATE
= 1219,
261 SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET
= 1220,
262 SVGA_3D_CMD_DX_SET_PS_CONSTANT_BUFFER_OFFSET
= 1221,
263 SVGA_3D_CMD_DX_SET_GS_CONSTANT_BUFFER_OFFSET
= 1222,
264 SVGA_3D_CMD_DX_SET_HS_CONSTANT_BUFFER_OFFSET
= 1223,
265 SVGA_3D_CMD_DX_SET_DS_CONSTANT_BUFFER_OFFSET
= 1224,
266 SVGA_3D_CMD_DX_SET_CS_CONSTANT_BUFFER_OFFSET
= 1225,
268 SVGA_3D_CMD_DX_COND_BIND_ALL_SHADER
= 1226,
269 SVGA_3D_CMD_DX_MAX
= 1227,
271 SVGA_3D_CMD_SCREEN_COPY
= 1227,
273 SVGA_3D_CMD_RESERVED1
= 1228,
274 SVGA_3D_CMD_RESERVED2
= 1229,
275 SVGA_3D_CMD_RESERVED3
= 1230,
276 SVGA_3D_CMD_RESERVED4
= 1231,
277 SVGA_3D_CMD_RESERVED5
= 1232,
278 SVGA_3D_CMD_RESERVED6
= 1233,
279 SVGA_3D_CMD_RESERVED7
= 1234,
280 SVGA_3D_CMD_RESERVED8
= 1235,
282 SVGA_3D_CMD_GROW_OTABLE
= 1236,
283 SVGA_3D_CMD_DX_GROW_COTABLE
= 1237,
284 SVGA_3D_CMD_INTRA_SURFACE_COPY
= 1238,
286 SVGA_3D_CMD_DEFINE_GB_SURFACE_V3
= 1239,
288 SVGA_3D_CMD_DX_RESOLVE_COPY
= 1240,
289 SVGA_3D_CMD_DX_PRED_RESOLVE_COPY
= 1241,
290 SVGA_3D_CMD_DX_PRED_CONVERT_REGION
= 1242,
291 SVGA_3D_CMD_DX_PRED_CONVERT
= 1243,
292 SVGA_3D_CMD_WHOLE_SURFACE_COPY
= 1244,
294 SVGA_3D_CMD_DX_DEFINE_UA_VIEW
= 1245,
295 SVGA_3D_CMD_DX_DESTROY_UA_VIEW
= 1246,
296 SVGA_3D_CMD_DX_CLEAR_UA_VIEW_UINT
= 1247,
297 SVGA_3D_CMD_DX_CLEAR_UA_VIEW_FLOAT
= 1248,
298 SVGA_3D_CMD_DX_COPY_STRUCTURE_COUNT
= 1249,
299 SVGA_3D_CMD_DX_SET_UA_VIEWS
= 1250,
301 SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED_INDIRECT
= 1251,
302 SVGA_3D_CMD_DX_DRAW_INSTANCED_INDIRECT
= 1252,
303 SVGA_3D_CMD_DX_DISPATCH
= 1253,
304 SVGA_3D_CMD_DX_DISPATCH_INDIRECT
= 1254,
306 SVGA_3D_CMD_WRITE_ZERO_SURFACE
= 1255,
307 SVGA_3D_CMD_HINT_ZERO_SURFACE
= 1256,
308 SVGA_3D_CMD_DX_TRANSFER_TO_BUFFER
= 1257,
309 SVGA_3D_CMD_DX_SET_STRUCTURE_COUNT
= 1258,
311 SVGA_3D_CMD_LOGICOPS_BITBLT
= 1259,
312 SVGA_3D_CMD_LOGICOPS_TRANSBLT
= 1260,
313 SVGA_3D_CMD_LOGICOPS_STRETCHBLT
= 1261,
314 SVGA_3D_CMD_LOGICOPS_COLORFILL
= 1262,
315 SVGA_3D_CMD_LOGICOPS_ALPHABLEND
= 1263,
316 SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND
= 1264,
318 SVGA_3D_CMD_RESERVED2_1
= 1265,
320 SVGA_3D_CMD_RESERVED2_2
= 1266,
321 SVGA_3D_CMD_DEFINE_GB_SURFACE_V4
= 1267,
322 SVGA_3D_CMD_DX_SET_CS_UA_VIEWS
= 1268,
323 SVGA_3D_CMD_DX_SET_MIN_LOD
= 1269,
324 SVGA_3D_CMD_RESERVED2_3
= 1270,
325 SVGA_3D_CMD_RESERVED2_4
= 1271,
326 SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW_V2
= 1272,
327 SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT_WITH_MOB
= 1273,
328 SVGA_3D_CMD_DX_SET_SHADER_IFACE
= 1274,
329 SVGA_3D_CMD_DX_BIND_STREAMOUTPUT
= 1275,
330 SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS
= 1276,
331 SVGA_3D_CMD_DX_BIND_SHADER_IFACE
= 1277,
333 SVGA_3D_CMD_MAX
= 1278,
334 SVGA_3D_CMD_FUTURE_MAX
= 3000
337 #define SVGA_NUM_3D_CMD (SVGA_3D_CMD_MAX - SVGA_3D_CMD_BASE)
340 * FIFO command format definitions:
344 * The data size header following cmdNum for every 3d command
347 #include "vmware_pack_begin.h"
352 #include "vmware_pack_end.h"
356 #include "vmware_pack_begin.h"
360 #include "vmware_pack_end.h"
364 #include "vmware_pack_begin.h"
367 SVGA3dSurface1Flags surfaceFlags
;
368 SVGA3dSurfaceFormat format
;
371 * If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace
372 * structures must have the same value of numMipLevels field.
373 * Otherwise, all but the first SVGA3dSurfaceFace structures must have the
374 * numMipLevels set to 0.
376 SVGA3dSurfaceFace face
[SVGA3D_MAX_SURFACE_FACES
];
379 * Followed by an SVGA3dSize structure for each mip level in each face.
381 * A note on surface sizes: Sizes are always specified in pixels,
382 * even if the true surface size is not a multiple of the minimum
383 * block size of the surface's format. For example, a 3x3x1 DXT1
384 * compressed texture would actually be stored as a 4x4x1 image in
388 #include "vmware_pack_end.h"
389 SVGA3dCmdDefineSurface
; /* SVGA_3D_CMD_SURFACE_DEFINE */
392 #include "vmware_pack_begin.h"
395 SVGA3dSurface1Flags surfaceFlags
;
396 SVGA3dSurfaceFormat format
;
399 * If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace
400 * structures must have the same value of numMipLevels field.
401 * Otherwise, all but the first SVGA3dSurfaceFace structures must have the
402 * numMipLevels set to 0.
404 SVGA3dSurfaceFace face
[SVGA3D_MAX_SURFACE_FACES
];
405 uint32 multisampleCount
;
406 SVGA3dTextureFilter autogenFilter
;
409 * Followed by an SVGA3dSize structure for each mip level in each face.
411 * A note on surface sizes: Sizes are always specified in pixels,
412 * even if the true surface size is not a multiple of the minimum
413 * block size of the surface's format. For example, a 3x3x1 DXT1
414 * compressed texture would actually be stored as a 4x4x1 image in
418 #include "vmware_pack_end.h"
419 SVGA3dCmdDefineSurface_v2
; /* SVGA_3D_CMD_SURFACE_DEFINE_V2 */
422 #include "vmware_pack_begin.h"
426 #include "vmware_pack_end.h"
427 SVGA3dCmdDestroySurface
; /* SVGA_3D_CMD_SURFACE_DESTROY */
430 #include "vmware_pack_begin.h"
434 #include "vmware_pack_end.h"
435 SVGA3dCmdDefineContext
; /* SVGA_3D_CMD_CONTEXT_DEFINE */
438 #include "vmware_pack_begin.h"
442 #include "vmware_pack_end.h"
443 SVGA3dCmdDestroyContext
; /* SVGA_3D_CMD_CONTEXT_DESTROY */
446 #include "vmware_pack_begin.h"
449 SVGA3dClearFlag clearFlag
;
453 /* Followed by variable number of SVGA3dRect structures */
455 #include "vmware_pack_end.h"
456 SVGA3dCmdClear
; /* SVGA_3D_CMD_CLEAR */
459 #include "vmware_pack_begin.h"
461 SVGA3dLightType type
;
462 SVGA3dBool inWorldSpace
;
476 #include "vmware_pack_end.h"
480 #include "vmware_pack_begin.h"
483 /* Followed by variable number of SVGA3dCopyRect structures */
485 #include "vmware_pack_end.h"
486 SVGA3dCmdPresent
; /* SVGA_3D_CMD_PRESENT */
489 #include "vmware_pack_begin.h"
491 SVGA3dRenderStateName state
;
497 #include "vmware_pack_end.h"
501 #include "vmware_pack_begin.h"
504 /* Followed by variable number of SVGA3dRenderState structures */
506 #include "vmware_pack_end.h"
507 SVGA3dCmdSetRenderState
; /* SVGA_3D_CMD_SETRENDERSTATE */
510 #include "vmware_pack_begin.h"
513 SVGA3dRenderTargetType type
;
514 SVGA3dSurfaceImageId target
;
516 #include "vmware_pack_end.h"
517 SVGA3dCmdSetRenderTarget
; /* SVGA_3D_CMD_SETRENDERTARGET */
520 #include "vmware_pack_begin.h"
522 SVGA3dSurfaceImageId src
;
523 SVGA3dSurfaceImageId dest
;
524 /* Followed by variable number of SVGA3dCopyBox structures */
526 #include "vmware_pack_end.h"
527 SVGA3dCmdSurfaceCopy
; /* SVGA_3D_CMD_SURFACE_COPY */
530 * Perform a surface copy within the same image.
531 * The src/dest boxes are allowed to overlap.
534 #include "vmware_pack_begin.h"
536 SVGA3dSurfaceImageId surface
;
539 #include "vmware_pack_end.h"
540 SVGA3dCmdIntraSurfaceCopy
; /* SVGA_3D_CMD_INTRA_SURFACE_COPY */
543 #include "vmware_pack_begin.h"
548 #include "vmware_pack_end.h"
549 SVGA3dCmdWholeSurfaceCopy
; /* SVGA_3D_CMD_WHOLE_SURFACE_COPY */
552 #include "vmware_pack_begin.h"
554 SVGA3dSurfaceImageId src
;
555 SVGA3dSurfaceImageId dest
;
559 #include "vmware_pack_end.h"
560 SVGA3dCmdSurfaceStretchBltNonMSToMS
;
561 /* SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS */
564 #include "vmware_pack_begin.h"
566 SVGA3dSurfaceImageId src
;
567 SVGA3dSurfaceImageId dest
;
570 SVGA3dStretchBltMode mode
;
572 #include "vmware_pack_end.h"
573 SVGA3dCmdSurfaceStretchBlt
; /* SVGA_3D_CMD_SURFACE_STRETCHBLT */
576 #include "vmware_pack_begin.h"
579 * If the discard flag is present in a surface DMA operation, the host may
580 * discard the contents of the current mipmap level and face of the target
581 * surface before applying the surface DMA contents.
586 * If the unsynchronized flag is present, the host may perform this upload
587 * without syncing to pending reads on this surface.
589 uint32 unsynchronized
: 1;
592 * Guests *MUST* set the reserved bits to 0 before submitting the command
593 * suffix as future flags may occupy these bits.
595 uint32 reserved
: 30;
597 #include "vmware_pack_end.h"
598 SVGA3dSurfaceDMAFlags
;
601 #include "vmware_pack_begin.h"
603 SVGAGuestImage guest
;
604 SVGA3dSurfaceImageId host
;
605 SVGA3dTransferType transfer
;
608 * Followed by variable number of SVGA3dCopyBox structures. For consistency
609 * in all clipping logic and coordinate translation, we define the
610 * "source" in each copyBox as the guest image and the
611 * "destination" as the host image, regardless of transfer
614 * For efficiency, the SVGA3D device is free to copy more data than
615 * specified. For example, it may round copy boxes outwards such
616 * that they lie on particular alignment boundaries.
619 #include "vmware_pack_end.h"
620 SVGA3dCmdSurfaceDMA
; /* SVGA_3D_CMD_SURFACE_DMA */
623 * SVGA3dCmdSurfaceDMASuffix --
625 * This is a command suffix that will appear after a SurfaceDMA command in
626 * the FIFO. It contains some extra information that hosts may use to
627 * optimize performance or protect the guest. This suffix exists to preserve
628 * backwards compatibility while also allowing for new functionality to be
633 #include "vmware_pack_begin.h"
638 * The maximum offset is used to determine the maximum offset from the
639 * guestPtr base address that will be accessed or written to during this
640 * surfaceDMA. If the suffix is supported, the host will respect this
641 * boundary while performing surface DMAs.
643 * Defaults to MAX_UINT32
645 uint32 maximumOffset
;
648 * A set of flags that describes optimizations that the host may perform
649 * while performing this surface DMA operation. The guest should never rely
650 * on behaviour that is different when these flags are set for correctness.
654 SVGA3dSurfaceDMAFlags flags
;
656 #include "vmware_pack_end.h"
657 SVGA3dCmdSurfaceDMASuffix
;
660 * SVGA_3D_CMD_DRAW_PRIMITIVES --
662 * This command is the SVGA3D device's generic drawing entry point.
663 * It can draw multiple ranges of primitives, optionally using an
664 * index buffer, using an arbitrary collection of vertex buffers.
666 * Each SVGA3dVertexDecl defines a distinct vertex array to bind
667 * during this draw call. The declarations specify which surface
668 * the vertex data lives in, what that vertex data is used for,
669 * and how to interpret it.
671 * Each SVGA3dPrimitiveRange defines a collection of primitives
672 * to render using the same vertex arrays. An index buffer is
677 #include "vmware_pack_begin.h"
680 * A range hint is an optional specification for the range of indices
681 * in an SVGA3dArray that will be used. If 'last' is zero, it is assumed
682 * that the entire array will be used.
684 * These are only hints. The SVGA3D device may use them for
685 * performance optimization if possible, but it's also allowed to
686 * ignore these values.
691 #include "vmware_pack_end.h"
692 SVGA3dArrayRangeHint
;
695 #include "vmware_pack_begin.h"
698 * Define the origin and shape of a vertex or index array. Both
699 * 'offset' and 'stride' are in bytes. The provided surface will be
700 * reinterpreted as a flat array of bytes in the same format used
701 * by surface DMA operations. To avoid unnecessary conversions, the
702 * surface should be created with the SVGA3D_BUFFER format.
704 * Index 0 in the array starts 'offset' bytes into the surface.
705 * Index 1 begins at byte 'offset + stride', etc. Array indices may
712 #include "vmware_pack_end.h"
716 #include "vmware_pack_begin.h"
719 * Describe a vertex array's data type, and define how it is to be
720 * used by the fixed function pipeline or the vertex shader. It
721 * isn't useful to have two VertexDecls with the same
722 * VertexArrayIdentity in one draw call.
725 SVGA3dDeclMethod method
;
726 SVGA3dDeclUsage usage
;
729 #include "vmware_pack_end.h"
730 SVGA3dVertexArrayIdentity
;
733 #include "vmware_pack_begin.h"
734 struct SVGA3dVertexDecl
{
735 SVGA3dVertexArrayIdentity identity
;
737 SVGA3dArrayRangeHint rangeHint
;
739 #include "vmware_pack_end.h"
743 #include "vmware_pack_begin.h"
744 struct SVGA3dPrimitiveRange
{
746 * Define a group of primitives to render, from sequential indices.
748 * The value of 'primitiveType' and 'primitiveCount' imply the
749 * total number of vertices that will be rendered.
751 SVGA3dPrimitiveType primType
;
752 uint32 primitiveCount
;
755 * Optional index buffer. If indexArray.surfaceId is
756 * SVGA3D_INVALID_ID, we render without an index buffer. Rendering
757 * without an index buffer is identical to rendering with an index
758 * buffer containing the sequence [0, 1, 2, 3, ...].
760 * If an index buffer is in use, indexWidth specifies the width in
761 * bytes of each index value. It must be less than or equal to
764 * (Currently, the SVGA3D device requires index buffers to be tightly
765 * packed. In other words, indexWidth == indexArray.stride)
767 SVGA3dArray indexArray
;
771 * Optional index bias. This number is added to all indices from
772 * indexArray before they are used as vertex array indices. This
773 * can be used in multiple ways:
775 * - When not using an indexArray, this bias can be used to
776 * specify where in the vertex arrays to begin rendering.
778 * - A positive number here is equivalent to increasing the
779 * offset in each vertex array.
781 * - A negative number can be used to render using a small
782 * vertex array and an index buffer that contains large
783 * values. This may be used by some applications that
784 * crop a vertex buffer without modifying their index
787 * Note that rendering with a negative bias value may be slower and
788 * use more memory than rendering with a positive or zero bias.
792 #include "vmware_pack_end.h"
793 SVGA3dPrimitiveRange
;
796 #include "vmware_pack_begin.h"
799 uint32 numVertexDecls
;
803 * There are two variable size arrays after the
804 * SVGA3dCmdDrawPrimitives structure. In order,
807 * 1. SVGA3dVertexDecl, quantity 'numVertexDecls', but no more than
808 * SVGA3D_MAX_VERTEX_ARRAYS;
809 * 2. SVGA3dPrimitiveRange, quantity 'numRanges', but no more than
810 * SVGA3D_MAX_DRAW_PRIMITIVE_RANGES;
811 * 3. Optionally, SVGA3dVertexDivisor, quantity 'numVertexDecls' (contains
812 * the frequency divisor for the corresponding vertex decl).
815 #include "vmware_pack_end.h"
816 SVGA3dCmdDrawPrimitives
; /* SVGA_3D_CMD_DRAWPRIMITIVES */
819 #include "vmware_pack_begin.h"
823 uint32 primitiveCount
; /* How many primitives to render */
824 uint32 startVertexLocation
; /* Which vertex do we start rendering at. */
826 uint8 primitiveType
; /* SVGA3dPrimitiveType */
829 #include "vmware_pack_end.h"
833 #include "vmware_pack_begin.h"
837 uint8 primitiveType
; /* SVGA3dPrimitiveType */
839 uint32 indexBufferSid
; /* Valid index buffer sid. */
840 uint32 indexBufferOffset
; /* Byte offset into the vertex buffer, almost */
841 /* always 0 for pre SM guests, non-zero for OpenGL */
842 /* guests. We can't represent non-multiple of */
843 /* stride offsets in D3D9Renderer... */
844 uint8 indexBufferStride
; /* Allowable values = 1, 2, or 4 */
846 int32 baseVertexLocation
; /* Bias applied to the index when selecting a */
847 /* vertex from the streams, may be negative */
849 uint32 primitiveCount
; /* How many primitives to render */
853 #include "vmware_pack_end.h"
854 SVGA3dCmdDrawIndexed
;
857 #include "vmware_pack_begin.h"
860 * Describe a vertex array's data type, and define how it is to be
861 * used by the fixed function pipeline or the vertex shader. It
862 * isn't useful to have two VertexDecls with the same
863 * VertexArrayIdentity in one draw call.
867 uint8 type
; /* SVGA3dDeclType */
868 uint8 method
; /* SVGA3dDeclMethod */
869 uint8 usage
; /* SVGA3dDeclUsage */
874 #include "vmware_pack_end.h"
878 * Should the vertex element respect the stream value? The high bit of the
879 * stream should be set to indicate that the stream should be respected. If
880 * the high bit is not set, the stream will be ignored and replaced by the index
881 * of the position of the currently considered vertex element.
883 * All guests should set this bit and correctly specify the stream going
886 #define SVGA3D_VERTEX_ELEMENT_RESPECT_STREAM (1 << 7)
889 #include "vmware_pack_begin.h"
896 * Followed by numElements SVGA3dVertexElement structures.
898 * If numElements < SVGA3D_MAX_VERTEX_ARRAYS, the remaining elements
899 * are cleared and will not be used by following draws.
902 #include "vmware_pack_end.h"
903 SVGA3dCmdSetVertexDecls
;
906 #include "vmware_pack_begin.h"
912 #include "vmware_pack_end.h"
916 #include "vmware_pack_begin.h"
922 * Followed by numStream SVGA3dVertexStream structures.
924 * If numStreams < SVGA3D_MAX_VERTEX_ARRAYS, the remaining streams
925 * are cleared and will not be used by following draws.
928 #include "vmware_pack_end.h"
929 SVGA3dCmdSetVertexStreams
;
932 #include "vmware_pack_begin.h"
937 #include "vmware_pack_end.h"
938 SVGA3dCmdSetVertexDivisors
;
941 #include "vmware_pack_begin.h"
944 SVGA3dTextureStateName name
;
950 #include "vmware_pack_end.h"
954 #include "vmware_pack_begin.h"
957 /* Followed by variable number of SVGA3dTextureState structures */
959 #include "vmware_pack_end.h"
960 SVGA3dCmdSetTextureState
; /* SVGA_3D_CMD_SETTEXTURESTATE */
963 #include "vmware_pack_begin.h"
966 SVGA3dTransformType type
;
969 #include "vmware_pack_end.h"
970 SVGA3dCmdSetTransform
; /* SVGA_3D_CMD_SETTRANSFORM */
973 #include "vmware_pack_begin.h"
978 #include "vmware_pack_end.h"
982 #include "vmware_pack_begin.h"
987 #include "vmware_pack_end.h"
988 SVGA3dCmdSetZRange
; /* SVGA_3D_CMD_SETZRANGE */
991 #include "vmware_pack_begin.h"
999 #include "vmware_pack_end.h"
1003 #include "vmware_pack_begin.h"
1007 SVGA3dMaterial material
;
1009 #include "vmware_pack_end.h"
1010 SVGA3dCmdSetMaterial
; /* SVGA_3D_CMD_SETMATERIAL */
1013 #include "vmware_pack_begin.h"
1017 SVGA3dLightData data
;
1019 #include "vmware_pack_end.h"
1020 SVGA3dCmdSetLightData
; /* SVGA_3D_CMD_SETLIGHTDATA */
1023 #include "vmware_pack_begin.h"
1029 #include "vmware_pack_end.h"
1030 SVGA3dCmdSetLightEnabled
; /* SVGA_3D_CMD_SETLIGHTENABLED */
1033 #include "vmware_pack_begin.h"
1038 #include "vmware_pack_end.h"
1039 SVGA3dCmdSetViewport
; /* SVGA_3D_CMD_SETVIEWPORT */
1042 #include "vmware_pack_begin.h"
1047 #include "vmware_pack_end.h"
1048 SVGA3dCmdSetScissorRect
; /* SVGA_3D_CMD_SETSCISSORRECT */
1051 #include "vmware_pack_begin.h"
1057 #include "vmware_pack_end.h"
1058 SVGA3dCmdSetClipPlane
; /* SVGA_3D_CMD_SETCLIPPLANE */
1061 #include "vmware_pack_begin.h"
1065 SVGA3dShaderType type
;
1066 /* Followed by variable number of DWORDs for shader bycode */
1068 #include "vmware_pack_end.h"
1069 SVGA3dCmdDefineShader
; /* SVGA_3D_CMD_SHADER_DEFINE */
1072 #include "vmware_pack_begin.h"
1076 SVGA3dShaderType type
;
1078 #include "vmware_pack_end.h"
1079 SVGA3dCmdDestroyShader
; /* SVGA_3D_CMD_SHADER_DESTROY */
1082 #include "vmware_pack_begin.h"
1085 uint32 reg
; /* register number */
1086 SVGA3dShaderType type
;
1087 SVGA3dShaderConstType ctype
;
1091 * Followed by a variable number of additional values.
1094 #include "vmware_pack_end.h"
1095 SVGA3dCmdSetShaderConst
; /* SVGA_3D_CMD_SET_SHADER_CONST */
1098 #include "vmware_pack_begin.h"
1101 SVGA3dShaderType type
;
1104 #include "vmware_pack_end.h"
1105 SVGA3dCmdSetShader
; /* SVGA_3D_CMD_SET_SHADER */
1108 #include "vmware_pack_begin.h"
1111 SVGA3dQueryType type
;
1113 #include "vmware_pack_end.h"
1114 SVGA3dCmdBeginQuery
; /* SVGA_3D_CMD_BEGIN_QUERY */
1117 #include "vmware_pack_begin.h"
1120 SVGA3dQueryType type
;
1121 SVGAGuestPtr guestResult
; /* Points to an SVGA3dQueryResult structure */
1123 #include "vmware_pack_end.h"
1124 SVGA3dCmdEndQuery
; /* SVGA_3D_CMD_END_QUERY */
1128 * SVGA3D_CMD_WAIT_FOR_QUERY --
1130 * Will read the SVGA3dQueryResult structure pointed to by guestResult,
1131 * and if the state member is set to anything else than
1132 * SVGA3D_QUERYSTATE_PENDING, this command will always be a no-op.
1134 * Otherwise, in addition to the query explicitly waited for,
1135 * All queries with the same type and issued with the same cid, for which
1136 * an SVGA_3D_CMD_END_QUERY command has previously been sent, will
1137 * be finished after execution of this command.
1139 * A query will be identified by the gmrId and offset of the guestResult
1140 * member. If the device can't find an SVGA_3D_CMD_END_QUERY that has
1141 * been sent previously with an indentical gmrId and offset, it will
1142 * effectively end all queries with an identical type issued with the
1143 * same cid, and the SVGA3dQueryResult structure pointed to by
1144 * guestResult will not be written to. This property can be used to
1145 * implement a query barrier for a given cid and query type.
1149 #include "vmware_pack_begin.h"
1151 uint32 cid
; /* Same parameters passed to END_QUERY */
1152 SVGA3dQueryType type
;
1153 SVGAGuestPtr guestResult
;
1155 #include "vmware_pack_end.h"
1156 SVGA3dCmdWaitForQuery
; /* SVGA_3D_CMD_WAIT_FOR_QUERY */
1159 #include "vmware_pack_begin.h"
1161 uint32 totalSize
; /* Set by guest before query is ended. */
1162 SVGA3dQueryState state
; /* Set by host or guest. See SVGA3dQueryState. */
1163 union { /* Set by host on exit from PENDING state */
1165 uint32 queryCookie
; /* May be used to identify which QueryGetData this
1166 result corresponds to. */
1169 #include "vmware_pack_end.h"
1174 * SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN --
1176 * This is a blit from an SVGA3D surface to a Screen Object.
1177 * This blit must be directed at a specific screen.
1179 * The blit copies from a rectangular region of an SVGA3D surface
1180 * image to a rectangular region of a screen.
1182 * This command takes an optional variable-length list of clipping
1183 * rectangles after the body of the command. If no rectangles are
1184 * specified, there is no clipping region. The entire destRect is
1185 * drawn to. If one or more rectangles are included, they describe
1186 * a clipping region. The clip rectangle coordinates are measured
1187 * relative to the top-left corner of destRect.
1189 * The srcImage must be from mip=0 face=0.
1191 * This supports scaling if the src and dest are of different sizes.
1194 * SVGA_FIFO_CAP_SCREEN_OBJECT
1198 #include "vmware_pack_begin.h"
1200 SVGA3dSurfaceImageId srcImage
;
1201 SVGASignedRect srcRect
;
1202 uint32 destScreenId
; /* Screen Object ID */
1203 SVGASignedRect destRect
;
1204 /* Clipping: zero or more SVGASignedRects follow */
1206 #include "vmware_pack_end.h"
1207 SVGA3dCmdBlitSurfaceToScreen
; /* SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN */
1210 #include "vmware_pack_begin.h"
1213 SVGA3dTextureFilter filter
;
1215 #include "vmware_pack_end.h"
1216 SVGA3dCmdGenerateMipmaps
; /* SVGA_3D_CMD_GENERATE_MIPMAPS */
1219 #include "vmware_pack_begin.h"
1223 #include "vmware_pack_end.h"
1224 SVGA3dCmdActivateSurface
; /* SVGA_3D_CMD_ACTIVATE_SURFACE */
1227 #include "vmware_pack_begin.h"
1231 #include "vmware_pack_end.h"
1232 SVGA3dCmdDeactivateSurface
; /* SVGA_3D_CMD_DEACTIVATE_SURFACE */
1235 * Screen DMA command
1237 * Available with SVGA_FIFO_CAP_SCREEN_OBJECT_2. The SVGA_CAP_3D device
1238 * cap bit is not required.
1240 * - refBuffer and destBuffer are 32bit BGRX; refBuffer and destBuffer could
1241 * be different, but it is required that guest makes sure refBuffer has
1242 * exactly the same contents that were written to when last time screen DMA
1243 * command is received by host.
1245 * - changemap is generated by lib/blit, and it has the changes from last
1246 * received screen DMA or more.
1250 #include "vmware_pack_begin.h"
1251 struct SVGA3dCmdScreenDMA
{
1253 SVGAGuestImage refBuffer
;
1254 SVGAGuestImage destBuffer
;
1255 SVGAGuestImage changeMap
;
1257 #include "vmware_pack_end.h"
1258 SVGA3dCmdScreenDMA
; /* SVGA_3D_CMD_SCREEN_DMA */
1264 #define SVGA3D_LOTRANSBLT_HONORALPHA (0x01)
1265 #define SVGA3D_LOSTRETCHBLT_MIRRORX (0x01)
1266 #define SVGA3D_LOSTRETCHBLT_MIRRORY (0x02)
1267 #define SVGA3D_LOALPHABLEND_SRCHASALPHA (0x01)
1270 #include "vmware_pack_begin.h"
1271 struct SVGA3dCmdLogicOpsBitBlt
{
1273 * All LogicOps surfaces are one-level
1274 * surfaces so mipmap & face should always
1277 SVGA3dSurfaceImageId src
;
1278 SVGA3dSurfaceImageId dst
;
1279 SVGA3dLogicOp logicOp
;
1280 SVGA3dLogicOpRop3 logicOpRop3
;
1281 /* Followed by variable number of SVGA3dCopyBox structures */
1283 #include "vmware_pack_end.h"
1284 SVGA3dCmdLogicOpsBitBlt
; /* SVGA_3D_CMD_LOGICOPS_BITBLT */
1288 #include "vmware_pack_begin.h"
1289 struct SVGA3dCmdLogicOpsTransBlt
{
1291 * All LogicOps surfaces are one-level
1292 * surfaces so mipmap & face should always
1295 SVGA3dSurfaceImageId src
;
1296 SVGA3dSurfaceImageId dst
;
1300 SVGA3dSignedBox dstBox
;
1303 #include "vmware_pack_end.h"
1304 SVGA3dCmdLogicOpsTransBlt
; /* SVGA_3D_CMD_LOGICOPS_TRANSBLT */
1308 #include "vmware_pack_begin.h"
1309 struct SVGA3dCmdLogicOpsStretchBlt
{
1311 * All LogicOps surfaces are one-level
1312 * surfaces so mipmap & face should always
1315 SVGA3dSurfaceImageId src
;
1316 SVGA3dSurfaceImageId dst
;
1320 SVGA3dSignedBox dstBox
;
1323 #include "vmware_pack_end.h"
1324 SVGA3dCmdLogicOpsStretchBlt
; /* SVGA_3D_CMD_LOGICOPS_STRETCHBLT */
1328 #include "vmware_pack_begin.h"
1329 struct SVGA3dCmdLogicOpsColorFill
{
1331 * All LogicOps surfaces are one-level
1332 * surfaces so mipmap & face should always
1335 SVGA3dSurfaceImageId dst
;
1337 SVGA3dLogicOp logicOp
;
1338 SVGA3dLogicOpRop3 logicOpRop3
;
1339 /* Followed by variable number of SVGA3dRect structures. */
1341 #include "vmware_pack_end.h"
1342 SVGA3dCmdLogicOpsColorFill
; /* SVGA_3D_CMD_LOGICOPS_COLORFILL */
1346 #include "vmware_pack_begin.h"
1347 struct SVGA3dCmdLogicOpsAlphaBlend
{
1349 * All LogicOps surfaces are one-level
1350 * surfaces so mipmap & face should always
1353 SVGA3dSurfaceImageId src
;
1354 SVGA3dSurfaceImageId dst
;
1358 SVGA3dSignedBox dstBox
;
1361 #include "vmware_pack_end.h"
1362 SVGA3dCmdLogicOpsAlphaBlend
; /* SVGA_3D_CMD_LOGICOPS_ALPHABLEND */
1364 #define SVGA3D_CLEARTYPE_INVALID_GAMMA_INDEX 0xFFFFFFFF
1366 #define SVGA3D_CLEARTYPE_GAMMA_WIDTH 512
1367 #define SVGA3D_CLEARTYPE_GAMMA_HEIGHT 16
1370 #include "vmware_pack_begin.h"
1371 struct SVGA3dCmdLogicOpsClearTypeBlend
{
1373 * All LogicOps surfaces are one-level
1374 * surfaces so mipmap & face should always
1377 SVGA3dSurfaceImageId tmp
;
1378 SVGA3dSurfaceImageId dst
;
1379 SVGA3dSurfaceImageId gammaSurf
;
1380 SVGA3dSurfaceImageId alphaSurf
;
1386 /* Followed by variable number of SVGA3dBox structures */
1388 #include "vmware_pack_end.h"
1389 SVGA3dCmdLogicOpsClearTypeBlend
; /* SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND */
1393 * Guest-backed objects definitions.
1397 #include "vmware_pack_begin.h"
1399 SVGAMobFormat ptDepth
;
1403 #include "vmware_pack_end.h"
1405 #define SVGA3D_OTABLE_MOB_ENTRY_SIZE (sizeof(SVGAOTableMobEntry))
1408 #include "vmware_pack_begin.h"
1410 SVGA3dSurfaceFormat format
;
1411 SVGA3dSurface1Flags surface1Flags
;
1412 uint32 numMipLevels
;
1413 uint32 multisampleCount
;
1414 SVGA3dTextureFilter autogenFilter
;
1419 SVGA3dSurface2Flags surface2Flags
;
1420 uint8 multisamplePattern
;
1422 uint16 bufferByteStride
;
1426 #include "vmware_pack_end.h"
1427 SVGAOTableSurfaceEntry
;
1428 #define SVGA3D_OTABLE_SURFACE_ENTRY_SIZE (sizeof(SVGAOTableSurfaceEntry))
1431 #include "vmware_pack_begin.h"
1436 #include "vmware_pack_end.h"
1437 SVGAOTableContextEntry
;
1438 #define SVGA3D_OTABLE_CONTEXT_ENTRY_SIZE (sizeof(SVGAOTableContextEntry))
1441 #include "vmware_pack_begin.h"
1443 SVGA3dShaderType type
;
1445 uint32 offsetInBytes
;
1448 #include "vmware_pack_end.h"
1449 SVGAOTableShaderEntry
;
1450 #define SVGA3D_OTABLE_SHADER_ENTRY_SIZE (sizeof(SVGAOTableShaderEntry))
1452 #define SVGA_STFLAG_PRIMARY (1 << 0)
1453 #define SVGA_STFLAG_RESERVED (1 << 1) /* Added with cap SVGA_CAP_HP_CMD_QUEUE */
1454 typedef uint32 SVGAScreenTargetFlags
;
1457 #include "vmware_pack_begin.h"
1459 SVGA3dSurfaceImageId image
;
1464 SVGAScreenTargetFlags flags
;
1468 #include "vmware_pack_end.h"
1469 SVGAOTableScreenTargetEntry
;
1470 #define SVGA3D_OTABLE_SCREEN_TARGET_ENTRY_SIZE \
1471 (sizeof(SVGAOTableScreenTargetEntry))
1474 #include "vmware_pack_begin.h"
1478 #include "vmware_pack_end.h"
1479 SVGA3dShaderConstFloat
;
1482 #include "vmware_pack_begin.h"
1486 #include "vmware_pack_end.h"
1487 SVGA3dShaderConstInt
;
1490 #include "vmware_pack_begin.h"
1494 #include "vmware_pack_end.h"
1495 SVGA3dShaderConstBool
;
1498 #include "vmware_pack_begin.h"
1500 uint16 streamOffset
;
1506 #include "vmware_pack_end.h"
1507 SVGAGBVertexElement
;
1510 #include "vmware_pack_begin.h"
1516 #include "vmware_pack_end.h"
1519 #include "vmware_pack_begin.h"
1521 SVGA3dRect viewport
;
1522 SVGA3dRect scissorRect
;
1523 SVGA3dZRange zRange
;
1525 SVGA3dSurfaceImageId renderTargets
[SVGA3D_RT_MAX
];
1526 SVGAGBVertexElement decl1
[4];
1528 uint32 renderStates
[SVGA3D_RS_MAX
];
1529 SVGAGBVertexElement decl2
[18];
1534 SVGA3dMaterial material
;
1537 float clipPlanes
[SVGA3D_NUM_CLIPPLANES
][4];
1538 float matrices
[SVGA3D_TRANSFORM_MAX
][16];
1540 SVGA3dBool lightEnabled
[SVGA3D_NUM_LIGHTS
];
1541 SVGA3dLightData lightData
[SVGA3D_NUM_LIGHTS
];
1544 * Shaders currently bound
1546 uint32 shaders
[SVGA3D_NUM_SHADERTYPE_PREDX
];
1547 SVGAGBVertexElement decl3
[10];
1550 uint32 occQueryActive
;
1551 uint32 occQueryValue
;
1554 * Int/Bool Shader constants
1556 SVGA3dShaderConstInt pShaderIValues
[SVGA3D_CONSTINTREG_MAX
];
1557 SVGA3dShaderConstInt vShaderIValues
[SVGA3D_CONSTINTREG_MAX
];
1558 uint16 pShaderBValues
;
1559 uint16 vShaderBValues
;
1562 SVGAGBVertexStream streams
[SVGA3D_MAX_VERTEX_ARRAYS
];
1563 SVGA3dVertexDivisor divisors
[SVGA3D_MAX_VERTEX_ARRAYS
];
1564 uint32 numVertexDecls
;
1565 uint32 numVertexStreams
;
1566 uint32 numVertexDivisors
;
1572 * SVGA3D_TS_INVALID through SVGA3D_TS_CONSTANT are in the
1573 * textureStages array.
1574 * SVGA3D_TS_COLOR_KEY is in tsColorKey.
1576 uint32 tsColorKey
[SVGA3D_NUM_TEXTURE_UNITS
];
1577 uint32 textureStages
[SVGA3D_NUM_TEXTURE_UNITS
][SVGA3D_TS_CONSTANT
+ 1];
1578 uint32 tsColorKeyEnable
[SVGA3D_NUM_TEXTURE_UNITS
];
1581 * Float Shader constants.
1583 SVGA3dShaderConstFloat pShaderFValues
[SVGA3D_CONSTREG_MAX
];
1584 SVGA3dShaderConstFloat vShaderFValues
[SVGA3D_CONSTREG_MAX
];
1586 #include "vmware_pack_end.h"
1588 #define SVGA3D_CONTEXT_DATA_SIZE (sizeof(SVGAGBContextData))
1591 * SVGA3dCmdSetOTableBase --
1593 * This command allows the guest to specify the base PPN of the
1594 * specified object table.
1598 #include "vmware_pack_begin.h"
1600 SVGAOTableType type
;
1603 uint32 validSizeInBytes
;
1604 SVGAMobFormat ptDepth
;
1606 #include "vmware_pack_end.h"
1607 SVGA3dCmdSetOTableBase
; /* SVGA_3D_CMD_SET_OTABLE_BASE */
1610 #include "vmware_pack_begin.h"
1612 SVGAOTableType type
;
1615 uint32 validSizeInBytes
;
1616 SVGAMobFormat ptDepth
;
1618 #include "vmware_pack_end.h"
1619 SVGA3dCmdSetOTableBase64
; /* SVGA_3D_CMD_SET_OTABLE_BASE64 */
1622 * Guests using SVGA_3D_CMD_GROW_OTABLE are promising that
1623 * the new OTable contains the same contents as the old one, except possibly
1624 * for some new invalid entries at the end.
1626 * (Otherwise, guests should use one of the SetOTableBase commands.)
1629 #include "vmware_pack_begin.h"
1631 SVGAOTableType type
;
1634 uint32 validSizeInBytes
;
1635 SVGAMobFormat ptDepth
;
1637 #include "vmware_pack_end.h"
1638 SVGA3dCmdGrowOTable
; /* SVGA_3D_CMD_GROW_OTABLE */
1641 #include "vmware_pack_begin.h"
1643 SVGAOTableType type
;
1645 #include "vmware_pack_end.h"
1646 SVGA3dCmdReadbackOTable
; /* SVGA_3D_CMD_READBACK_OTABLE */
1649 * Define a memory object (Mob) in the OTable.
1653 #include "vmware_pack_begin.h"
1654 struct SVGA3dCmdDefineGBMob
{
1656 SVGAMobFormat ptDepth
;
1660 #include "vmware_pack_end.h"
1661 SVGA3dCmdDefineGBMob
; /* SVGA_3D_CMD_DEFINE_GB_MOB */
1665 * Destroys an object in the OTable.
1669 #include "vmware_pack_begin.h"
1670 struct SVGA3dCmdDestroyGBMob
{
1673 #include "vmware_pack_end.h"
1674 SVGA3dCmdDestroyGBMob
; /* SVGA_3D_CMD_DESTROY_GB_MOB */
1677 * Define a memory object (Mob) in the OTable with a PPN64 base.
1681 #include "vmware_pack_begin.h"
1682 struct SVGA3dCmdDefineGBMob64
{
1684 SVGAMobFormat ptDepth
;
1688 #include "vmware_pack_end.h"
1689 SVGA3dCmdDefineGBMob64
; /* SVGA_3D_CMD_DEFINE_GB_MOB64 */
1692 * Redefine an object in the OTable with PPN64 base.
1696 #include "vmware_pack_begin.h"
1697 struct SVGA3dCmdRedefineGBMob64
{
1699 SVGAMobFormat ptDepth
;
1703 #include "vmware_pack_end.h"
1704 SVGA3dCmdRedefineGBMob64
; /* SVGA_3D_CMD_REDEFINE_GB_MOB64 */
1707 * Notification that the page tables have been modified.
1711 #include "vmware_pack_begin.h"
1712 struct SVGA3dCmdUpdateGBMobMapping
{
1715 #include "vmware_pack_end.h"
1716 SVGA3dCmdUpdateGBMobMapping
; /* SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING */
1719 * Define a guest-backed surface.
1723 #include "vmware_pack_begin.h"
1724 struct SVGA3dCmdDefineGBSurface
{
1726 SVGA3dSurface1Flags surfaceFlags
;
1727 SVGA3dSurfaceFormat format
;
1728 uint32 numMipLevels
;
1729 uint32 multisampleCount
;
1730 SVGA3dTextureFilter autogenFilter
;
1733 #include "vmware_pack_end.h"
1734 SVGA3dCmdDefineGBSurface
; /* SVGA_3D_CMD_DEFINE_GB_SURFACE */
1737 * Defines a guest-backed surface, adding the arraySize field.
1740 #include "vmware_pack_begin.h"
1741 struct SVGA3dCmdDefineGBSurface_v2
{
1743 SVGA3dSurface1Flags surfaceFlags
;
1744 SVGA3dSurfaceFormat format
;
1745 uint32 numMipLevels
;
1746 uint32 multisampleCount
;
1747 SVGA3dTextureFilter autogenFilter
;
1752 #include "vmware_pack_end.h"
1753 SVGA3dCmdDefineGBSurface_v2
; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V2 */
1756 * Defines a guest-backed surface, adding the larger flags.
1759 #include "vmware_pack_begin.h"
1760 struct SVGA3dCmdDefineGBSurface_v3
{
1762 SVGA3dSurfaceAllFlags surfaceFlags
;
1763 SVGA3dSurfaceFormat format
;
1764 uint32 numMipLevels
;
1765 uint32 multisampleCount
;
1766 SVGA3dMSPattern multisamplePattern
;
1767 SVGA3dMSQualityLevel qualityLevel
;
1768 SVGA3dTextureFilter autogenFilter
;
1772 #include "vmware_pack_end.h"
1773 SVGA3dCmdDefineGBSurface_v3
; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V3 */
1776 * Defines a guest-backed surface, adding buffer byte stride.
1779 #include "vmware_pack_begin.h"
1780 struct SVGA3dCmdDefineGBSurface_v4
{
1782 SVGA3dSurfaceAllFlags surfaceFlags
;
1783 SVGA3dSurfaceFormat format
;
1784 uint32 numMipLevels
;
1785 uint32 multisampleCount
;
1786 SVGA3dMSPattern multisamplePattern
;
1787 SVGA3dMSQualityLevel qualityLevel
;
1788 SVGA3dTextureFilter autogenFilter
;
1791 uint32 bufferByteStride
;
1793 #include "vmware_pack_end.h"
1794 SVGA3dCmdDefineGBSurface_v4
; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V4 */
1797 * Destroy a guest-backed surface.
1801 #include "vmware_pack_begin.h"
1802 struct SVGA3dCmdDestroyGBSurface
{
1805 #include "vmware_pack_end.h"
1806 SVGA3dCmdDestroyGBSurface
; /* SVGA_3D_CMD_DESTROY_GB_SURFACE */
1809 * Bind a guest-backed surface to a mob.
1813 #include "vmware_pack_begin.h"
1814 struct SVGA3dCmdBindGBSurface
{
1818 #include "vmware_pack_end.h"
1819 SVGA3dCmdBindGBSurface
; /* SVGA_3D_CMD_BIND_GB_SURFACE */
1822 #include "vmware_pack_begin.h"
1823 struct SVGA3dCmdBindGBSurfaceWithPitch
{
1826 uint32 baseLevelPitch
;
1828 #include "vmware_pack_end.h"
1829 SVGA3dCmdBindGBSurfaceWithPitch
; /* SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH */
1832 * Conditionally bind a mob to a guest-backed surface if testMobid
1833 * matches the currently bound mob. Optionally issue a
1834 * readback/update on the surface while it is still bound to the old
1835 * mobid if the mobid is changed by this command.
1838 #define SVGA3D_COND_BIND_GB_SURFACE_FLAG_READBACK (1 << 0)
1839 #define SVGA3D_COND_BIND_GB_SURFACE_FLAG_UPDATE (1 << 1)
1842 #include "vmware_pack_begin.h"
1843 struct SVGA3dCmdCondBindGBSurface
{
1845 SVGAMobId testMobid
;
1849 #include "vmware_pack_end.h"
1850 SVGA3dCmdCondBindGBSurface
; /* SVGA_3D_CMD_COND_BIND_GB_SURFACE */
1853 * Update an image in a guest-backed surface.
1854 * (Inform the device that the guest-contents have been updated.)
1858 #include "vmware_pack_begin.h"
1859 struct SVGA3dCmdUpdateGBImage
{
1860 SVGA3dSurfaceImageId image
;
1863 #include "vmware_pack_end.h"
1864 SVGA3dCmdUpdateGBImage
; /* SVGA_3D_CMD_UPDATE_GB_IMAGE */
1867 * Update an entire guest-backed surface.
1868 * (Inform the device that the guest-contents have been updated.)
1872 #include "vmware_pack_begin.h"
1873 struct SVGA3dCmdUpdateGBSurface
{
1876 #include "vmware_pack_end.h"
1877 SVGA3dCmdUpdateGBSurface
; /* SVGA_3D_CMD_UPDATE_GB_SURFACE */
1880 * Readback an image in a guest-backed surface.
1881 * (Request the device to flush the dirty contents into the guest.)
1885 #include "vmware_pack_begin.h"
1886 struct SVGA3dCmdReadbackGBImage
{
1887 SVGA3dSurfaceImageId image
;
1889 #include "vmware_pack_end.h"
1890 SVGA3dCmdReadbackGBImage
; /* SVGA_3D_CMD_READBACK_GB_IMAGE */
1893 * Readback an entire guest-backed surface.
1894 * (Request the device to flush the dirty contents into the guest.)
1898 #include "vmware_pack_begin.h"
1899 struct SVGA3dCmdReadbackGBSurface
{
1902 #include "vmware_pack_end.h"
1903 SVGA3dCmdReadbackGBSurface
; /* SVGA_3D_CMD_READBACK_GB_SURFACE */
1906 * Readback a sub rect of an image in a guest-backed surface. After
1907 * issuing this command the driver is required to issue an update call
1908 * of the same region before issuing any other commands that reference
1909 * this surface or rendering is not guaranteed.
1913 #include "vmware_pack_begin.h"
1914 struct SVGA3dCmdReadbackGBImagePartial
{
1915 SVGA3dSurfaceImageId image
;
1919 #include "vmware_pack_end.h"
1920 SVGA3dCmdReadbackGBImagePartial
; /* SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL */
1924 * Invalidate an image in a guest-backed surface.
1925 * (Notify the device that the contents can be lost.)
1929 #include "vmware_pack_begin.h"
1930 struct SVGA3dCmdInvalidateGBImage
{
1931 SVGA3dSurfaceImageId image
;
1933 #include "vmware_pack_end.h"
1934 SVGA3dCmdInvalidateGBImage
; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE */
1937 * Invalidate an entire guest-backed surface.
1938 * (Notify the device that the contents if all images can be lost.)
1942 #include "vmware_pack_begin.h"
1943 struct SVGA3dCmdInvalidateGBSurface
{
1946 #include "vmware_pack_end.h"
1947 SVGA3dCmdInvalidateGBSurface
; /* SVGA_3D_CMD_INVALIDATE_GB_SURFACE */
1950 * Invalidate a sub rect of an image in a guest-backed surface. After
1951 * issuing this command the driver is required to issue an update call
1952 * of the same region before issuing any other commands that reference
1953 * this surface or rendering is not guaranteed.
1957 #include "vmware_pack_begin.h"
1958 struct SVGA3dCmdInvalidateGBImagePartial
{
1959 SVGA3dSurfaceImageId image
;
1963 #include "vmware_pack_end.h"
1964 SVGA3dCmdInvalidateGBImagePartial
; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL */
1968 * Define a guest-backed context.
1972 #include "vmware_pack_begin.h"
1973 struct SVGA3dCmdDefineGBContext
{
1976 #include "vmware_pack_end.h"
1977 SVGA3dCmdDefineGBContext
; /* SVGA_3D_CMD_DEFINE_GB_CONTEXT */
1980 * Destroy a guest-backed context.
1984 #include "vmware_pack_begin.h"
1985 struct SVGA3dCmdDestroyGBContext
{
1988 #include "vmware_pack_end.h"
1989 SVGA3dCmdDestroyGBContext
; /* SVGA_3D_CMD_DESTROY_GB_CONTEXT */
1992 * Bind a guest-backed context.
1994 * validContents should be set to 0 for new contexts,
1995 * and 1 if this is an old context which is getting paged
1996 * back on to the device.
1998 * For new contexts, it is recommended that the driver
1999 * issue commands to initialize all interesting state
2000 * prior to rendering.
2004 #include "vmware_pack_begin.h"
2005 struct SVGA3dCmdBindGBContext
{
2008 uint32 validContents
;
2010 #include "vmware_pack_end.h"
2011 SVGA3dCmdBindGBContext
; /* SVGA_3D_CMD_BIND_GB_CONTEXT */
2014 * Readback a guest-backed context.
2015 * (Request that the device flush the contents back into guest memory.)
2019 #include "vmware_pack_begin.h"
2020 struct SVGA3dCmdReadbackGBContext
{
2023 #include "vmware_pack_end.h"
2024 SVGA3dCmdReadbackGBContext
; /* SVGA_3D_CMD_READBACK_GB_CONTEXT */
2027 * Invalidate a guest-backed context.
2030 #include "vmware_pack_begin.h"
2031 struct SVGA3dCmdInvalidateGBContext
{
2034 #include "vmware_pack_end.h"
2035 SVGA3dCmdInvalidateGBContext
; /* SVGA_3D_CMD_INVALIDATE_GB_CONTEXT */
2038 * Define a guest-backed shader.
2042 #include "vmware_pack_begin.h"
2043 struct SVGA3dCmdDefineGBShader
{
2045 SVGA3dShaderType type
;
2048 #include "vmware_pack_end.h"
2049 SVGA3dCmdDefineGBShader
; /* SVGA_3D_CMD_DEFINE_GB_SHADER */
2052 * Bind a guest-backed shader.
2056 #include "vmware_pack_begin.h"
2057 struct SVGA3dCmdBindGBShader
{
2060 uint32 offsetInBytes
;
2062 #include "vmware_pack_end.h"
2063 SVGA3dCmdBindGBShader
; /* SVGA_3D_CMD_BIND_GB_SHADER */
2066 * Destroy a guest-backed shader.
2070 #include "vmware_pack_begin.h"
2071 struct SVGA3dCmdDestroyGBShader
{
2074 #include "vmware_pack_end.h"
2075 SVGA3dCmdDestroyGBShader
; /* SVGA_3D_CMD_DESTROY_GB_SHADER */
2078 #include "vmware_pack_begin.h"
2082 SVGA3dShaderType shaderType
;
2083 SVGA3dShaderConstType constType
;
2086 * Followed by a variable number of shader constants.
2088 * Note that FLOAT and INT constants are 4-dwords in length, while
2089 * BOOL constants are 1-dword in length.
2092 #include "vmware_pack_end.h"
2093 SVGA3dCmdSetGBShaderConstInline
; /* SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE */
2097 #include "vmware_pack_begin.h"
2100 SVGA3dQueryType type
;
2102 #include "vmware_pack_end.h"
2103 SVGA3dCmdBeginGBQuery
; /* SVGA_3D_CMD_BEGIN_GB_QUERY */
2106 #include "vmware_pack_begin.h"
2109 SVGA3dQueryType type
;
2113 #include "vmware_pack_end.h"
2114 SVGA3dCmdEndGBQuery
; /* SVGA_3D_CMD_END_GB_QUERY */
2118 * SVGA_3D_CMD_WAIT_FOR_GB_QUERY --
2120 * The semantics of this command are identical to the
2121 * SVGA_3D_CMD_WAIT_FOR_QUERY except that the results are written
2122 * to a Mob instead of a GMR.
2126 #include "vmware_pack_begin.h"
2129 SVGA3dQueryType type
;
2133 #include "vmware_pack_end.h"
2134 SVGA3dCmdWaitForGBQuery
; /* SVGA_3D_CMD_WAIT_FOR_GB_QUERY */
2138 #include "vmware_pack_begin.h"
2144 #include "vmware_pack_end.h"
2145 SVGA3dCmdEnableGart
; /* SVGA_3D_CMD_ENABLE_GART */
2148 #include "vmware_pack_begin.h"
2153 #include "vmware_pack_end.h"
2154 SVGA3dCmdMapMobIntoGart
; /* SVGA_3D_CMD_MAP_MOB_INTO_GART */
2158 #include "vmware_pack_begin.h"
2163 #include "vmware_pack_end.h"
2164 SVGA3dCmdUnmapGartRange
; /* SVGA_3D_CMD_UNMAP_GART_RANGE */
2172 #include "vmware_pack_begin.h"
2179 SVGAScreenTargetFlags flags
;
2182 * The physical DPI that the guest expects this screen displayed at.
2184 * Guests which are not DPI-aware should set this to zero.
2188 #include "vmware_pack_end.h"
2189 SVGA3dCmdDefineGBScreenTarget
; /* SVGA_3D_CMD_DEFINE_GB_SCREENTARGET */
2192 #include "vmware_pack_begin.h"
2196 #include "vmware_pack_end.h"
2197 SVGA3dCmdDestroyGBScreenTarget
; /* SVGA_3D_CMD_DESTROY_GB_SCREENTARGET */
2200 #include "vmware_pack_begin.h"
2203 SVGA3dSurfaceImageId image
;
2205 #include "vmware_pack_end.h"
2206 SVGA3dCmdBindGBScreenTarget
; /* SVGA_3D_CMD_BIND_GB_SCREENTARGET */
2209 #include "vmware_pack_begin.h"
2214 #include "vmware_pack_end.h"
2215 SVGA3dCmdUpdateGBScreenTarget
; /* SVGA_3D_CMD_UPDATE_GB_SCREENTARGET */
2218 #include "vmware_pack_begin.h"
2219 struct SVGA3dCmdGBScreenDMA
{
2222 SVGAMobId destMobID
;
2224 SVGAMobId changeMapMobID
;
2226 #include "vmware_pack_end.h"
2227 SVGA3dCmdGBScreenDMA
; /* SVGA_3D_CMD_GB_SCREEN_DMA */
2230 #include "vmware_pack_begin.h"
2236 #include "vmware_pack_end.h"
2237 SVGA3dCmdGBMobFence
; /* SVGA_3D_CMD_GB_MOB_FENCE */
2240 #include "vmware_pack_begin.h"
2243 SVGA3dSurfaceImageId dest
;
2246 uint32 statusMobOffset
;
2248 /* Reserved fields */
2249 uint32 mustBeInvalidId
;
2252 #include "vmware_pack_end.h"
2253 SVGA3dCmdScreenCopy
; /* SVGA_3D_CMD_SCREEN_COPY */
2255 #define SVGA_SCREEN_COPY_STATUS_FAILURE 0x00
2256 #define SVGA_SCREEN_COPY_STATUS_SUCCESS 0x01
2257 #define SVGA_SCREEN_COPY_STATUS_INVALID 0xFFFFFFFF
2260 #include "vmware_pack_begin.h"
2264 #include "vmware_pack_end.h"
2265 SVGA3dCmdWriteZeroSurface
; /* SVGA_3D_CMD_WRITE_ZERO_SURFACE */
2268 #include "vmware_pack_begin.h"
2272 #include "vmware_pack_end.h"
2273 SVGA3dCmdHintZeroSurface
; /* SVGA_3D_CMD_HINT_ZERO_SURFACE */
2275 #endif /* _SVGA3D_CMD_H_ */