1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 #ifndef _SVGA3D_CMD_H_
34 #define _SVGA3D_CMD_H_
35
36 #define INCLUDE_ALLOW_MODULE
37 #define INCLUDE_ALLOW_USERLEVEL
38 #define INCLUDE_ALLOW_VMCORE
39
40 #include "includeCheck.h"
41 #include "svga3d_types.h"
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 typedef enum {
58 SVGA_3D_CMD_LEGACY_BASE = 1000,
59 SVGA_3D_CMD_BASE = 1040,
60
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,
106
107 SVGA_3D_CMD_LOGICOPS_BITBLT = 1085,
108 SVGA_3D_CMD_LOGICOPS_TRANSBLT = 1086,
109 SVGA_3D_CMD_LOGICOPS_STRETCHBLT = 1087,
110 SVGA_3D_CMD_LOGICOPS_COLORFILL = 1088,
111 SVGA_3D_CMD_LOGICOPS_ALPHABLEND = 1089,
112 SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND = 1090,
113
114 SVGA_3D_CMD_SET_OTABLE_BASE = 1091,
115 SVGA_3D_CMD_READBACK_OTABLE = 1092,
116
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,
121
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,
132
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,
138
139 SVGA_3D_CMD_DEFINE_GB_SHADER = 1112,
140 SVGA_3D_CMD_DESTROY_GB_SHADER = 1113,
141 SVGA_3D_CMD_BIND_GB_SHADER = 1114,
142
143 SVGA_3D_CMD_SET_OTABLE_BASE64 = 1115,
144
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,
148
149 SVGA_3D_CMD_NOP = 1119,
150
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,
155
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,
160
161 SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL = 1128,
162 SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL = 1129,
163
164 SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE = 1130,
165
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,
173
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,
179
180
181
182
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
265
266
267
268 SVGA_3D_CMD_DX_RESERVED1 = 1223,
269 SVGA_3D_CMD_DX_RESERVED2 = 1224,
270 SVGA_3D_CMD_DX_RESERVED3 = 1225,
271
272 SVGA_3D_CMD_DX_COND_BIND_ALL_SHADER = 1226,
273 SVGA_3D_CMD_DX_MAX = 1227,
274
275 SVGA_3D_CMD_SCREEN_COPY = 1227,
276
277
278
279
280 SVGA_3D_CMD_VIDEO_RESERVED1 = 1228,
281 SVGA_3D_CMD_VIDEO_RESERVED2 = 1229,
282 SVGA_3D_CMD_VIDEO_RESERVED3 = 1230,
283 SVGA_3D_CMD_VIDEO_RESERVED4 = 1231,
284 SVGA_3D_CMD_VIDEO_RESERVED5 = 1232,
285 SVGA_3D_CMD_VIDEO_RESERVED6 = 1233,
286 SVGA_3D_CMD_VIDEO_RESERVED7 = 1234,
287 SVGA_3D_CMD_VIDEO_RESERVED8 = 1235,
288
289 SVGA_3D_CMD_GROW_OTABLE = 1236,
290 SVGA_3D_CMD_DX_GROW_COTABLE = 1237,
291 SVGA_3D_CMD_INTRA_SURFACE_COPY = 1238,
292
293 SVGA_3D_CMD_DEFINE_GB_SURFACE_V3 = 1239,
294
295 SVGA_3D_CMD_DX_RESOLVE_COPY = 1240,
296 SVGA_3D_CMD_DX_PRED_RESOLVE_COPY = 1241,
297 SVGA_3D_CMD_DX_PRED_CONVERT_REGION = 1242,
298 SVGA_3D_CMD_DX_PRED_CONVERT = 1243,
299 SVGA_3D_CMD_WHOLE_SURFACE_COPY = 1244,
300
301 SVGA_3D_CMD_MAX = 1245,
302 SVGA_3D_CMD_FUTURE_MAX = 3000
303 } SVGAFifo3dCmdId;
304
305 #define SVGA_NUM_3D_CMD (SVGA_3D_CMD_MAX - SVGA_3D_CMD_BASE)
306
307
308
309
310
311
312
313
314 typedef
315 #include "vmware_pack_begin.h"
316 struct {
317 uint32 id;
318 uint32 size;
319 }
320 #include "vmware_pack_end.h"
321 SVGA3dCmdHeader;
322
323 typedef
324 #include "vmware_pack_begin.h"
325 struct {
326 uint32 numMipLevels;
327 }
328 #include "vmware_pack_end.h"
329 SVGA3dSurfaceFace;
330
331 typedef
332 #include "vmware_pack_begin.h"
333 struct {
334 uint32 sid;
335 SVGA3dSurface1Flags surfaceFlags;
336 SVGA3dSurfaceFormat format;
337
338
339
340
341
342
343 SVGA3dSurfaceFace face[SVGA3D_MAX_SURFACE_FACES];
344
345
346
347
348
349
350
351
352
353 }
354 #include "vmware_pack_end.h"
355 SVGA3dCmdDefineSurface;
356
357 typedef
358 #include "vmware_pack_begin.h"
359 struct {
360 uint32 sid;
361 SVGA3dSurface1Flags surfaceFlags;
362 SVGA3dSurfaceFormat format;
363
364
365
366
367
368
369 SVGA3dSurfaceFace face[SVGA3D_MAX_SURFACE_FACES];
370 uint32 multisampleCount;
371 SVGA3dTextureFilter autogenFilter;
372
373
374
375
376
377
378
379
380
381 }
382 #include "vmware_pack_end.h"
383 SVGA3dCmdDefineSurface_v2;
384
385 typedef
386 #include "vmware_pack_begin.h"
387 struct {
388 uint32 sid;
389 }
390 #include "vmware_pack_end.h"
391 SVGA3dCmdDestroySurface;
392
393 typedef
394 #include "vmware_pack_begin.h"
395 struct {
396 uint32 cid;
397 }
398 #include "vmware_pack_end.h"
399 SVGA3dCmdDefineContext;
400
401 typedef
402 #include "vmware_pack_begin.h"
403 struct {
404 uint32 cid;
405 }
406 #include "vmware_pack_end.h"
407 SVGA3dCmdDestroyContext;
408
409 typedef
410 #include "vmware_pack_begin.h"
411 struct {
412 uint32 cid;
413 SVGA3dClearFlag clearFlag;
414 uint32 color;
415 float depth;
416 uint32 stencil;
417
418 }
419 #include "vmware_pack_end.h"
420 SVGA3dCmdClear;
421
422 typedef
423 #include "vmware_pack_begin.h"
424 struct {
425 SVGA3dLightType type;
426 SVGA3dBool inWorldSpace;
427 float diffuse[4];
428 float specular[4];
429 float ambient[4];
430 float position[4];
431 float direction[4];
432 float range;
433 float falloff;
434 float attenuation0;
435 float attenuation1;
436 float attenuation2;
437 float theta;
438 float phi;
439 }
440 #include "vmware_pack_end.h"
441 SVGA3dLightData;
442
443 typedef
444 #include "vmware_pack_begin.h"
445 struct {
446 uint32 sid;
447
448 }
449 #include "vmware_pack_end.h"
450 SVGA3dCmdPresent;
451
452 typedef
453 #include "vmware_pack_begin.h"
454 struct {
455 SVGA3dRenderStateName state;
456 union {
457 uint32 uintValue;
458 float floatValue;
459 };
460 }
461 #include "vmware_pack_end.h"
462 SVGA3dRenderState;
463
464 typedef
465 #include "vmware_pack_begin.h"
466 struct {
467 uint32 cid;
468
469 }
470 #include "vmware_pack_end.h"
471 SVGA3dCmdSetRenderState;
472
473 typedef
474 #include "vmware_pack_begin.h"
475 struct {
476 uint32 cid;
477 SVGA3dRenderTargetType type;
478 SVGA3dSurfaceImageId target;
479 }
480 #include "vmware_pack_end.h"
481 SVGA3dCmdSetRenderTarget;
482
483 typedef
484 #include "vmware_pack_begin.h"
485 struct {
486 SVGA3dSurfaceImageId src;
487 SVGA3dSurfaceImageId dest;
488
489 }
490 #include "vmware_pack_end.h"
491 SVGA3dCmdSurfaceCopy;
492
493
494
495
496
497 typedef
498 #include "vmware_pack_begin.h"
499 struct {
500 SVGA3dSurfaceImageId surface;
501 SVGA3dCopyBox box;
502 }
503 #include "vmware_pack_end.h"
504 SVGA3dCmdIntraSurfaceCopy;
505
506 typedef
507 #include "vmware_pack_begin.h"
508 struct {
509 uint32 srcSid;
510 uint32 destSid;
511 }
512 #include "vmware_pack_end.h"
513 SVGA3dCmdWholeSurfaceCopy;
514
515 typedef
516 #include "vmware_pack_begin.h"
517 struct {
518 SVGA3dSurfaceImageId src;
519 SVGA3dSurfaceImageId dest;
520 SVGA3dBox boxSrc;
521 SVGA3dBox boxDest;
522 SVGA3dStretchBltMode mode;
523 }
524 #include "vmware_pack_end.h"
525 SVGA3dCmdSurfaceStretchBlt;
526
527 typedef
528 #include "vmware_pack_begin.h"
529 struct {
530
531
532
533
534
535 uint32 discard : 1;
536
537
538
539
540
541 uint32 unsynchronized : 1;
542
543
544
545
546
547 uint32 reserved : 30;
548 }
549 #include "vmware_pack_end.h"
550 SVGA3dSurfaceDMAFlags;
551
552 typedef
553 #include "vmware_pack_begin.h"
554 struct {
555 SVGAGuestImage guest;
556 SVGA3dSurfaceImageId host;
557 SVGA3dTransferType transfer;
558
559
560
561
562
563
564
565
566
567
568
569 }
570 #include "vmware_pack_end.h"
571 SVGA3dCmdSurfaceDMA;
572
573
574
575
576
577
578
579
580
581
582
583 typedef
584 #include "vmware_pack_begin.h"
585 struct {
586 uint32 suffixSize;
587
588
589
590
591
592
593
594
595
596 uint32 maximumOffset;
597
598
599
600
601
602
603
604
605 SVGA3dSurfaceDMAFlags flags;
606 }
607 #include "vmware_pack_end.h"
608 SVGA3dCmdSurfaceDMASuffix;
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627 typedef
628 #include "vmware_pack_begin.h"
629 struct {
630
631
632
633
634
635
636
637
638
639 uint32 first;
640 uint32 last;
641 }
642 #include "vmware_pack_end.h"
643 SVGA3dArrayRangeHint;
644
645 typedef
646 #include "vmware_pack_begin.h"
647 struct {
648
649
650
651
652
653
654
655
656
657
658
659 uint32 surfaceId;
660 uint32 offset;
661 uint32 stride;
662 }
663 #include "vmware_pack_end.h"
664 SVGA3dArray;
665
666 typedef
667 #include "vmware_pack_begin.h"
668 struct {
669
670
671
672
673
674
675 SVGA3dDeclType type;
676 SVGA3dDeclMethod method;
677 SVGA3dDeclUsage usage;
678 uint32 usageIndex;
679 }
680 #include "vmware_pack_end.h"
681 SVGA3dVertexArrayIdentity;
682
683 typedef
684 #include "vmware_pack_begin.h"
685 struct SVGA3dVertexDecl {
686 SVGA3dVertexArrayIdentity identity;
687 SVGA3dArray array;
688 SVGA3dArrayRangeHint rangeHint;
689 }
690 #include "vmware_pack_end.h"
691 SVGA3dVertexDecl;
692
693 typedef
694 #include "vmware_pack_begin.h"
695 struct SVGA3dPrimitiveRange {
696
697
698
699
700
701
702 SVGA3dPrimitiveType primType;
703 uint32 primitiveCount;
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718 SVGA3dArray indexArray;
719 uint32 indexWidth;
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741 int32 indexBias;
742 }
743 #include "vmware_pack_end.h"
744 SVGA3dPrimitiveRange;
745
746 typedef
747 #include "vmware_pack_begin.h"
748 struct {
749 uint32 cid;
750 uint32 numVertexDecls;
751 uint32 numRanges;
752
753
754
755
756
757
758
759
760
761
762
763
764
765 }
766 #include "vmware_pack_end.h"
767 SVGA3dCmdDrawPrimitives;
768
769 typedef
770 #include "vmware_pack_begin.h"
771 struct {
772 uint32 cid;
773
774 uint32 primitiveCount;
775 uint32 startVertexLocation;
776
777 uint8 primitiveType;
778 uint8 padding[3];
779 }
780 #include "vmware_pack_end.h"
781 SVGA3dCmdDraw;
782
783 typedef
784 #include "vmware_pack_begin.h"
785 struct {
786 uint32 cid;
787
788 uint8 primitiveType;
789
790 uint32 indexBufferSid;
791 uint32 indexBufferOffset;
792
793
794
795 uint8 indexBufferStride;
796
797 int32 baseVertexLocation;
798
799
800 uint32 primitiveCount;
801 uint32 pad0;
802 uint16 pad1;
803 }
804 #include "vmware_pack_end.h"
805 SVGA3dCmdDrawIndexed;
806
807 typedef
808 #include "vmware_pack_begin.h"
809 struct {
810
811
812
813
814
815
816 uint16 streamOffset;
817 uint8 stream;
818 uint8 type;
819 uint8 method;
820 uint8 usage;
821 uint8 usageIndex;
822 uint8 padding;
823
824 }
825 #include "vmware_pack_end.h"
826 SVGA3dVertexElement;
827
828
829
830
831
832
833
834
835
836
837 #define SVGA3D_VERTEX_ELEMENT_RESPECT_STREAM (1 << 7)
838
839 typedef
840 #include "vmware_pack_begin.h"
841 struct {
842 uint32 cid;
843
844 uint32 numElements;
845
846
847
848
849
850
851
852 }
853 #include "vmware_pack_end.h"
854 SVGA3dCmdSetVertexDecls;
855
856 typedef
857 #include "vmware_pack_begin.h"
858 struct {
859 uint32 sid;
860 uint32 stride;
861 uint32 offset;
862 }
863 #include "vmware_pack_end.h"
864 SVGA3dVertexStream;
865
866 typedef
867 #include "vmware_pack_begin.h"
868 struct {
869 uint32 cid;
870
871 uint32 numStreams;
872
873
874
875
876
877
878 }
879 #include "vmware_pack_end.h"
880 SVGA3dCmdSetVertexStreams;
881
882 typedef
883 #include "vmware_pack_begin.h"
884 struct {
885 uint32 cid;
886 uint32 numDivisors;
887 }
888 #include "vmware_pack_end.h"
889 SVGA3dCmdSetVertexDivisors;
890
891 typedef
892 #include "vmware_pack_begin.h"
893 struct {
894 uint32 stage;
895 SVGA3dTextureStateName name;
896 union {
897 uint32 value;
898 float floatValue;
899 };
900 }
901 #include "vmware_pack_end.h"
902 SVGA3dTextureState;
903
904 typedef
905 #include "vmware_pack_begin.h"
906 struct {
907 uint32 cid;
908
909 }
910 #include "vmware_pack_end.h"
911 SVGA3dCmdSetTextureState;
912
913 typedef
914 #include "vmware_pack_begin.h"
915 struct {
916 uint32 cid;
917 SVGA3dTransformType type;
918 float matrix[16];
919 }
920 #include "vmware_pack_end.h"
921 SVGA3dCmdSetTransform;
922
923 typedef
924 #include "vmware_pack_begin.h"
925 struct {
926 float min;
927 float max;
928 }
929 #include "vmware_pack_end.h"
930 SVGA3dZRange;
931
932 typedef
933 #include "vmware_pack_begin.h"
934 struct {
935 uint32 cid;
936 SVGA3dZRange zRange;
937 }
938 #include "vmware_pack_end.h"
939 SVGA3dCmdSetZRange;
940
941 typedef
942 #include "vmware_pack_begin.h"
943 struct {
944 float diffuse[4];
945 float ambient[4];
946 float specular[4];
947 float emissive[4];
948 float shininess;
949 }
950 #include "vmware_pack_end.h"
951 SVGA3dMaterial;
952
953 typedef
954 #include "vmware_pack_begin.h"
955 struct {
956 uint32 cid;
957 SVGA3dFace face;
958 SVGA3dMaterial material;
959 }
960 #include "vmware_pack_end.h"
961 SVGA3dCmdSetMaterial;
962
963 typedef
964 #include "vmware_pack_begin.h"
965 struct {
966 uint32 cid;
967 uint32 index;
968 SVGA3dLightData data;
969 }
970 #include "vmware_pack_end.h"
971 SVGA3dCmdSetLightData;
972
973 typedef
974 #include "vmware_pack_begin.h"
975 struct {
976 uint32 cid;
977 uint32 index;
978 uint32 enabled;
979 }
980 #include "vmware_pack_end.h"
981 SVGA3dCmdSetLightEnabled;
982
983 typedef
984 #include "vmware_pack_begin.h"
985 struct {
986 uint32 cid;
987 SVGA3dRect rect;
988 }
989 #include "vmware_pack_end.h"
990 SVGA3dCmdSetViewport;
991
992 typedef
993 #include "vmware_pack_begin.h"
994 struct {
995 uint32 cid;
996 SVGA3dRect rect;
997 }
998 #include "vmware_pack_end.h"
999 SVGA3dCmdSetScissorRect;
1000
1001 typedef
1002 #include "vmware_pack_begin.h"
1003 struct {
1004 uint32 cid;
1005 uint32 index;
1006 float plane[4];
1007 }
1008 #include "vmware_pack_end.h"
1009 SVGA3dCmdSetClipPlane;
1010
1011 typedef
1012 #include "vmware_pack_begin.h"
1013 struct {
1014 uint32 cid;
1015 uint32 shid;
1016 SVGA3dShaderType type;
1017
1018 }
1019 #include "vmware_pack_end.h"
1020 SVGA3dCmdDefineShader;
1021
1022 typedef
1023 #include "vmware_pack_begin.h"
1024 struct {
1025 uint32 cid;
1026 uint32 shid;
1027 SVGA3dShaderType type;
1028 }
1029 #include "vmware_pack_end.h"
1030 SVGA3dCmdDestroyShader;
1031
1032 typedef
1033 #include "vmware_pack_begin.h"
1034 struct {
1035 uint32 cid;
1036 uint32 reg;
1037 SVGA3dShaderType type;
1038 SVGA3dShaderConstType ctype;
1039 uint32 values[4];
1040
1041
1042
1043
1044 }
1045 #include "vmware_pack_end.h"
1046 SVGA3dCmdSetShaderConst;
1047
1048 typedef
1049 #include "vmware_pack_begin.h"
1050 struct {
1051 uint32 cid;
1052 SVGA3dShaderType type;
1053 uint32 shid;
1054 }
1055 #include "vmware_pack_end.h"
1056 SVGA3dCmdSetShader;
1057
1058 typedef
1059 #include "vmware_pack_begin.h"
1060 struct {
1061 uint32 cid;
1062 SVGA3dQueryType type;
1063 }
1064 #include "vmware_pack_end.h"
1065 SVGA3dCmdBeginQuery;
1066
1067 typedef
1068 #include "vmware_pack_begin.h"
1069 struct {
1070 uint32 cid;
1071 SVGA3dQueryType type;
1072 SVGAGuestPtr guestResult;
1073 }
1074 #include "vmware_pack_end.h"
1075 SVGA3dCmdEndQuery;
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099 typedef
1100 #include "vmware_pack_begin.h"
1101 struct {
1102 uint32 cid;
1103 SVGA3dQueryType type;
1104 SVGAGuestPtr guestResult;
1105 }
1106 #include "vmware_pack_end.h"
1107 SVGA3dCmdWaitForQuery;
1108
1109 typedef
1110 #include "vmware_pack_begin.h"
1111 struct {
1112 uint32 totalSize;
1113 SVGA3dQueryState state;
1114 union {
1115 uint32 result32;
1116 uint32 queryCookie;
1117
1118 };
1119 }
1120 #include "vmware_pack_end.h"
1121 SVGA3dQueryResult;
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148 typedef
1149 #include "vmware_pack_begin.h"
1150 struct {
1151 SVGA3dSurfaceImageId srcImage;
1152 SVGASignedRect srcRect;
1153 uint32 destScreenId;
1154 SVGASignedRect destRect;
1155
1156 }
1157 #include "vmware_pack_end.h"
1158 SVGA3dCmdBlitSurfaceToScreen;
1159
1160 typedef
1161 #include "vmware_pack_begin.h"
1162 struct {
1163 uint32 sid;
1164 SVGA3dTextureFilter filter;
1165 }
1166 #include "vmware_pack_end.h"
1167 SVGA3dCmdGenerateMipmaps;
1168
1169 typedef
1170 #include "vmware_pack_begin.h"
1171 struct {
1172 uint32 sid;
1173 }
1174 #include "vmware_pack_end.h"
1175 SVGA3dCmdActivateSurface;
1176
1177 typedef
1178 #include "vmware_pack_begin.h"
1179 struct {
1180 uint32 sid;
1181 }
1182 #include "vmware_pack_end.h"
1183 SVGA3dCmdDeactivateSurface;
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200 typedef
1201 #include "vmware_pack_begin.h"
1202 struct SVGA3dCmdScreenDMA {
1203 uint32 screenId;
1204 SVGAGuestImage refBuffer;
1205 SVGAGuestImage destBuffer;
1206 SVGAGuestImage changeMap;
1207 }
1208 #include "vmware_pack_end.h"
1209 SVGA3dCmdScreenDMA;
1210
1211
1212
1213
1214
1215 #define SVGA3D_LOTRANSBLT_HONORALPHA (0x01)
1216 #define SVGA3D_LOSTRETCHBLT_MIRRORX (0x01)
1217 #define SVGA3D_LOSTRETCHBLT_MIRRORY (0x02)
1218 #define SVGA3D_LOALPHABLEND_SRCHASALPHA (0x01)
1219
1220 typedef
1221 #include "vmware_pack_begin.h"
1222 struct SVGA3dCmdLogicOpsBitBlt {
1223
1224
1225
1226
1227
1228 SVGA3dSurfaceImageId src;
1229 SVGA3dSurfaceImageId dst;
1230 SVGA3dLogicOp logicOp;
1231
1232 }
1233 #include "vmware_pack_end.h"
1234 SVGA3dCmdLogicOpsBitBlt;
1235
1236
1237 typedef
1238 #include "vmware_pack_begin.h"
1239 struct SVGA3dCmdLogicOpsTransBlt {
1240
1241
1242
1243
1244
1245 SVGA3dSurfaceImageId src;
1246 SVGA3dSurfaceImageId dst;
1247 uint32 color;
1248 uint32 flags;
1249 SVGA3dBox srcBox;
1250 SVGA3dBox dstBox;
1251 }
1252 #include "vmware_pack_end.h"
1253 SVGA3dCmdLogicOpsTransBlt;
1254
1255
1256 typedef
1257 #include "vmware_pack_begin.h"
1258 struct SVGA3dCmdLogicOpsStretchBlt {
1259
1260
1261
1262
1263
1264 SVGA3dSurfaceImageId src;
1265 SVGA3dSurfaceImageId dst;
1266 uint16 mode;
1267 uint16 flags;
1268 SVGA3dBox srcBox;
1269 SVGA3dBox dstBox;
1270 }
1271 #include "vmware_pack_end.h"
1272 SVGA3dCmdLogicOpsStretchBlt;
1273
1274
1275 typedef
1276 #include "vmware_pack_begin.h"
1277 struct SVGA3dCmdLogicOpsColorFill {
1278
1279
1280
1281
1282
1283 SVGA3dSurfaceImageId dst;
1284 uint32 color;
1285 SVGA3dLogicOp logicOp;
1286
1287 }
1288 #include "vmware_pack_end.h"
1289 SVGA3dCmdLogicOpsColorFill;
1290
1291
1292 typedef
1293 #include "vmware_pack_begin.h"
1294 struct SVGA3dCmdLogicOpsAlphaBlend {
1295
1296
1297
1298
1299
1300 SVGA3dSurfaceImageId src;
1301 SVGA3dSurfaceImageId dst;
1302 uint32 alphaVal;
1303 uint32 flags;
1304 SVGA3dBox srcBox;
1305 SVGA3dBox dstBox;
1306 }
1307 #include "vmware_pack_end.h"
1308 SVGA3dCmdLogicOpsAlphaBlend;
1309
1310 #define SVGA3D_CLEARTYPE_INVALID_GAMMA_INDEX 0xFFFFFFFF
1311
1312 #define SVGA3D_CLEARTYPE_GAMMA_WIDTH 512
1313 #define SVGA3D_CLEARTYPE_GAMMA_HEIGHT 16
1314
1315 typedef
1316 #include "vmware_pack_begin.h"
1317 struct SVGA3dCmdLogicOpsClearTypeBlend {
1318
1319
1320
1321
1322
1323 SVGA3dSurfaceImageId tmp;
1324 SVGA3dSurfaceImageId dst;
1325 SVGA3dSurfaceImageId gammaSurf;
1326 SVGA3dSurfaceImageId alphaSurf;
1327 uint32 gamma;
1328 uint32 color;
1329 uint32 color2;
1330 int32 alphaOffsetX;
1331 int32 alphaOffsetY;
1332
1333 }
1334 #include "vmware_pack_end.h"
1335 SVGA3dCmdLogicOpsClearTypeBlend;
1336
1337
1338
1339
1340
1341
1342 typedef
1343 #include "vmware_pack_begin.h"
1344 struct {
1345 SVGAMobFormat ptDepth;
1346 uint32 sizeInBytes;
1347 PPN64 base;
1348 }
1349 #include "vmware_pack_end.h"
1350 SVGAOTableMobEntry;
1351 #define SVGA3D_OTABLE_MOB_ENTRY_SIZE (sizeof(SVGAOTableMobEntry))
1352
1353 typedef
1354 #include "vmware_pack_begin.h"
1355 struct {
1356 SVGA3dSurfaceFormat format;
1357 SVGA3dSurface1Flags surface1Flags;
1358 uint32 numMipLevels;
1359 uint32 multisampleCount;
1360 SVGA3dTextureFilter autogenFilter;
1361 SVGA3dSize size;
1362 SVGAMobId mobid;
1363 uint32 arraySize;
1364 uint32 mobPitch;
1365 SVGA3dSurface2Flags surface2Flags;
1366 uint8 multisamplePattern;
1367 uint8 qualityLevel;
1368 uint8 pad0[2];
1369 uint32 pad1[3];
1370 }
1371 #include "vmware_pack_end.h"
1372 SVGAOTableSurfaceEntry;
1373 #define SVGA3D_OTABLE_SURFACE_ENTRY_SIZE (sizeof(SVGAOTableSurfaceEntry))
1374
1375 typedef
1376 #include "vmware_pack_begin.h"
1377 struct {
1378 uint32 cid;
1379 SVGAMobId mobid;
1380 }
1381 #include "vmware_pack_end.h"
1382 SVGAOTableContextEntry;
1383 #define SVGA3D_OTABLE_CONTEXT_ENTRY_SIZE (sizeof(SVGAOTableContextEntry))
1384
1385 typedef
1386 #include "vmware_pack_begin.h"
1387 struct {
1388 SVGA3dShaderType type;
1389 uint32 sizeInBytes;
1390 uint32 offsetInBytes;
1391 SVGAMobId mobid;
1392 }
1393 #include "vmware_pack_end.h"
1394 SVGAOTableShaderEntry;
1395 #define SVGA3D_OTABLE_SHADER_ENTRY_SIZE (sizeof(SVGAOTableShaderEntry))
1396
1397 #define SVGA_STFLAG_PRIMARY (1 << 0)
1398 #define SVGA_STFLAG_RESERVED (1 << 1)
1399 typedef uint32 SVGAScreenTargetFlags;
1400
1401 typedef
1402 #include "vmware_pack_begin.h"
1403 struct {
1404 SVGA3dSurfaceImageId image;
1405 uint32 width;
1406 uint32 height;
1407 int32 xRoot;
1408 int32 yRoot;
1409 SVGAScreenTargetFlags flags;
1410 uint32 dpi;
1411 uint32 pad[7];
1412 }
1413 #include "vmware_pack_end.h"
1414 SVGAOTableScreenTargetEntry;
1415 #define SVGA3D_OTABLE_SCREEN_TARGET_ENTRY_SIZE \
1416 (sizeof(SVGAOTableScreenTargetEntry))
1417
1418 typedef
1419 #include "vmware_pack_begin.h"
1420 struct {
1421 float value[4];
1422 }
1423 #include "vmware_pack_end.h"
1424 SVGA3dShaderConstFloat;
1425
1426 typedef
1427 #include "vmware_pack_begin.h"
1428 struct {
1429 int32 value[4];
1430 }
1431 #include "vmware_pack_end.h"
1432 SVGA3dShaderConstInt;
1433
1434 typedef
1435 #include "vmware_pack_begin.h"
1436 struct {
1437 uint32 value;
1438 }
1439 #include "vmware_pack_end.h"
1440 SVGA3dShaderConstBool;
1441
1442 typedef
1443 #include "vmware_pack_begin.h"
1444 struct {
1445 uint16 streamOffset;
1446 uint8 stream;
1447 uint8 type;
1448 uint8 methodUsage;
1449 uint8 usageIndex;
1450 }
1451 #include "vmware_pack_end.h"
1452 SVGAGBVertexElement;
1453
1454 typedef
1455 #include "vmware_pack_begin.h"
1456 struct {
1457 uint32 sid;
1458 uint16 stride;
1459 uint32 offset;
1460 }
1461 #include "vmware_pack_end.h"
1462 SVGAGBVertexStream;
1463 typedef
1464 #include "vmware_pack_begin.h"
1465 struct {
1466 SVGA3dRect viewport;
1467 SVGA3dRect scissorRect;
1468 SVGA3dZRange zRange;
1469
1470 SVGA3dSurfaceImageId renderTargets[SVGA3D_RT_MAX];
1471 SVGAGBVertexElement decl1[4];
1472
1473 uint32 renderStates[SVGA3D_RS_MAX];
1474 SVGAGBVertexElement decl2[18];
1475 uint32 pad0[2];
1476
1477 struct {
1478 SVGA3dFace face;
1479 SVGA3dMaterial material;
1480 } material;
1481
1482 float clipPlanes[SVGA3D_NUM_CLIPPLANES][4];
1483 float matrices[SVGA3D_TRANSFORM_MAX][16];
1484
1485 SVGA3dBool lightEnabled[SVGA3D_NUM_LIGHTS];
1486 SVGA3dLightData lightData[SVGA3D_NUM_LIGHTS];
1487
1488
1489
1490
1491 uint32 shaders[SVGA3D_NUM_SHADERTYPE_PREDX];
1492 SVGAGBVertexElement decl3[10];
1493 uint32 pad1[3];
1494
1495 uint32 occQueryActive;
1496 uint32 occQueryValue;
1497
1498
1499
1500
1501 SVGA3dShaderConstInt pShaderIValues[SVGA3D_CONSTINTREG_MAX];
1502 SVGA3dShaderConstInt vShaderIValues[SVGA3D_CONSTINTREG_MAX];
1503 uint16 pShaderBValues;
1504 uint16 vShaderBValues;
1505
1506
1507 SVGAGBVertexStream streams[SVGA3D_MAX_VERTEX_ARRAYS];
1508 SVGA3dVertexDivisor divisors[SVGA3D_MAX_VERTEX_ARRAYS];
1509 uint32 numVertexDecls;
1510 uint32 numVertexStreams;
1511 uint32 numVertexDivisors;
1512 uint32 pad2[30];
1513
1514
1515
1516
1517
1518
1519
1520
1521 uint32 tsColorKey[SVGA3D_NUM_TEXTURE_UNITS];
1522 uint32 textureStages[SVGA3D_NUM_TEXTURE_UNITS][SVGA3D_TS_CONSTANT + 1];
1523 uint32 tsColorKeyEnable[SVGA3D_NUM_TEXTURE_UNITS];
1524
1525
1526
1527
1528 SVGA3dShaderConstFloat pShaderFValues[SVGA3D_CONSTREG_MAX];
1529 SVGA3dShaderConstFloat vShaderFValues[SVGA3D_CONSTREG_MAX];
1530 }
1531 #include "vmware_pack_end.h"
1532 SVGAGBContextData;
1533 #define SVGA3D_CONTEXT_DATA_SIZE (sizeof(SVGAGBContextData))
1534
1535
1536
1537
1538
1539
1540
1541
1542 typedef
1543 #include "vmware_pack_begin.h"
1544 struct {
1545 SVGAOTableType type;
1546 PPN baseAddress;
1547 uint32 sizeInBytes;
1548 uint32 validSizeInBytes;
1549 SVGAMobFormat ptDepth;
1550 }
1551 #include "vmware_pack_end.h"
1552 SVGA3dCmdSetOTableBase;
1553
1554 typedef
1555 #include "vmware_pack_begin.h"
1556 struct {
1557 SVGAOTableType type;
1558 PPN64 baseAddress;
1559 uint32 sizeInBytes;
1560 uint32 validSizeInBytes;
1561 SVGAMobFormat ptDepth;
1562 }
1563 #include "vmware_pack_end.h"
1564 SVGA3dCmdSetOTableBase64;
1565
1566
1567
1568
1569
1570
1571
1572
1573 typedef
1574 #include "vmware_pack_begin.h"
1575 struct {
1576 SVGAOTableType type;
1577 PPN64 baseAddress;
1578 uint32 sizeInBytes;
1579 uint32 validSizeInBytes;
1580 SVGAMobFormat ptDepth;
1581 }
1582 #include "vmware_pack_end.h"
1583 SVGA3dCmdGrowOTable;
1584
1585 typedef
1586 #include "vmware_pack_begin.h"
1587 struct {
1588 SVGAOTableType type;
1589 }
1590 #include "vmware_pack_end.h"
1591 SVGA3dCmdReadbackOTable;
1592
1593
1594
1595
1596
1597 typedef
1598 #include "vmware_pack_begin.h"
1599 struct SVGA3dCmdDefineGBMob {
1600 SVGAMobId mobid;
1601 SVGAMobFormat ptDepth;
1602 PPN base;
1603 uint32 sizeInBytes;
1604 }
1605 #include "vmware_pack_end.h"
1606 SVGA3dCmdDefineGBMob;
1607
1608
1609
1610
1611
1612
1613 typedef
1614 #include "vmware_pack_begin.h"
1615 struct SVGA3dCmdDestroyGBMob {
1616 SVGAMobId mobid;
1617 }
1618 #include "vmware_pack_end.h"
1619 SVGA3dCmdDestroyGBMob;
1620
1621
1622
1623
1624
1625
1626 typedef
1627 #include "vmware_pack_begin.h"
1628 struct SVGA3dCmdDefineGBMob64 {
1629 SVGAMobId mobid;
1630 SVGAMobFormat ptDepth;
1631 PPN64 base;
1632 uint32 sizeInBytes;
1633 }
1634 #include "vmware_pack_end.h"
1635 SVGA3dCmdDefineGBMob64;
1636
1637
1638
1639
1640
1641 typedef
1642 #include "vmware_pack_begin.h"
1643 struct SVGA3dCmdRedefineGBMob64 {
1644 SVGAMobId mobid;
1645 SVGAMobFormat ptDepth;
1646 PPN64 base;
1647 uint32 sizeInBytes;
1648 }
1649 #include "vmware_pack_end.h"
1650 SVGA3dCmdRedefineGBMob64;
1651
1652
1653
1654
1655
1656 typedef
1657 #include "vmware_pack_begin.h"
1658 struct SVGA3dCmdUpdateGBMobMapping {
1659 SVGAMobId mobid;
1660 }
1661 #include "vmware_pack_end.h"
1662 SVGA3dCmdUpdateGBMobMapping;
1663
1664
1665
1666
1667
1668 typedef
1669 #include "vmware_pack_begin.h"
1670 struct SVGA3dCmdDefineGBSurface {
1671 uint32 sid;
1672 SVGA3dSurface1Flags surfaceFlags;
1673 SVGA3dSurfaceFormat format;
1674 uint32 numMipLevels;
1675 uint32 multisampleCount;
1676 SVGA3dTextureFilter autogenFilter;
1677 SVGA3dSize size;
1678 }
1679 #include "vmware_pack_end.h"
1680 SVGA3dCmdDefineGBSurface;
1681
1682
1683
1684
1685 typedef
1686 #include "vmware_pack_begin.h"
1687 struct SVGA3dCmdDefineGBSurface_v2 {
1688 uint32 sid;
1689 SVGA3dSurface1Flags surfaceFlags;
1690 SVGA3dSurfaceFormat format;
1691 uint32 numMipLevels;
1692 uint32 multisampleCount;
1693 SVGA3dTextureFilter autogenFilter;
1694 SVGA3dSize size;
1695 uint32 arraySize;
1696 uint32 pad;
1697 }
1698 #include "vmware_pack_end.h"
1699 SVGA3dCmdDefineGBSurface_v2;
1700
1701
1702
1703
1704 typedef
1705 #include "vmware_pack_begin.h"
1706 struct SVGA3dCmdDefineGBSurface_v3 {
1707 uint32 sid;
1708 SVGA3dSurfaceAllFlags surfaceFlags;
1709 SVGA3dSurfaceFormat format;
1710 uint32 numMipLevels;
1711 uint32 multisampleCount;
1712 SVGA3dMSPattern multisamplePattern;
1713 SVGA3dMSQualityLevel qualityLevel;
1714 SVGA3dTextureFilter autogenFilter;
1715 SVGA3dSize size;
1716 uint32 arraySize;
1717 }
1718 #include "vmware_pack_end.h"
1719 SVGA3dCmdDefineGBSurface_v3;
1720
1721
1722
1723
1724
1725 typedef
1726 #include "vmware_pack_begin.h"
1727 struct SVGA3dCmdDestroyGBSurface {
1728 uint32 sid;
1729 }
1730 #include "vmware_pack_end.h"
1731 SVGA3dCmdDestroyGBSurface;
1732
1733
1734
1735
1736
1737 typedef
1738 #include "vmware_pack_begin.h"
1739 struct SVGA3dCmdBindGBSurface {
1740 uint32 sid;
1741 SVGAMobId mobid;
1742 }
1743 #include "vmware_pack_end.h"
1744 SVGA3dCmdBindGBSurface;
1745
1746 typedef
1747 #include "vmware_pack_begin.h"
1748 struct SVGA3dCmdBindGBSurfaceWithPitch {
1749 uint32 sid;
1750 SVGAMobId mobid;
1751 uint32 baseLevelPitch;
1752 }
1753 #include "vmware_pack_end.h"
1754 SVGA3dCmdBindGBSurfaceWithPitch;
1755
1756
1757
1758
1759
1760
1761
1762
1763 #define SVGA3D_COND_BIND_GB_SURFACE_FLAG_READBACK (1 << 0)
1764 #define SVGA3D_COND_BIND_GB_SURFACE_FLAG_UPDATE (1 << 1)
1765
1766 typedef
1767 #include "vmware_pack_begin.h"
1768 struct SVGA3dCmdCondBindGBSurface {
1769 uint32 sid;
1770 SVGAMobId testMobid;
1771 SVGAMobId mobid;
1772 uint32 flags;
1773 }
1774 #include "vmware_pack_end.h"
1775 SVGA3dCmdCondBindGBSurface;
1776
1777
1778
1779
1780
1781
1782 typedef
1783 #include "vmware_pack_begin.h"
1784 struct SVGA3dCmdUpdateGBImage {
1785 SVGA3dSurfaceImageId image;
1786 SVGA3dBox box;
1787 }
1788 #include "vmware_pack_end.h"
1789 SVGA3dCmdUpdateGBImage;
1790
1791
1792
1793
1794
1795
1796 typedef
1797 #include "vmware_pack_begin.h"
1798 struct SVGA3dCmdUpdateGBSurface {
1799 uint32 sid;
1800 }
1801 #include "vmware_pack_end.h"
1802 SVGA3dCmdUpdateGBSurface;
1803
1804
1805
1806
1807
1808
1809 typedef
1810 #include "vmware_pack_begin.h"
1811 struct SVGA3dCmdReadbackGBImage {
1812 SVGA3dSurfaceImageId image;
1813 }
1814 #include "vmware_pack_end.h"
1815 SVGA3dCmdReadbackGBImage;
1816
1817
1818
1819
1820
1821
1822 typedef
1823 #include "vmware_pack_begin.h"
1824 struct SVGA3dCmdReadbackGBSurface {
1825 uint32 sid;
1826 }
1827 #include "vmware_pack_end.h"
1828 SVGA3dCmdReadbackGBSurface;
1829
1830
1831
1832
1833
1834
1835
1836
1837 typedef
1838 #include "vmware_pack_begin.h"
1839 struct SVGA3dCmdReadbackGBImagePartial {
1840 SVGA3dSurfaceImageId image;
1841 SVGA3dBox box;
1842 uint32 invertBox;
1843 }
1844 #include "vmware_pack_end.h"
1845 SVGA3dCmdReadbackGBImagePartial;
1846
1847
1848
1849
1850
1851
1852
1853 typedef
1854 #include "vmware_pack_begin.h"
1855 struct SVGA3dCmdInvalidateGBImage {
1856 SVGA3dSurfaceImageId image;
1857 }
1858 #include "vmware_pack_end.h"
1859 SVGA3dCmdInvalidateGBImage;
1860
1861
1862
1863
1864
1865
1866 typedef
1867 #include "vmware_pack_begin.h"
1868 struct SVGA3dCmdInvalidateGBSurface {
1869 uint32 sid;
1870 }
1871 #include "vmware_pack_end.h"
1872 SVGA3dCmdInvalidateGBSurface;
1873
1874
1875
1876
1877
1878
1879
1880
1881 typedef
1882 #include "vmware_pack_begin.h"
1883 struct SVGA3dCmdInvalidateGBImagePartial {
1884 SVGA3dSurfaceImageId image;
1885 SVGA3dBox box;
1886 uint32 invertBox;
1887 }
1888 #include "vmware_pack_end.h"
1889 SVGA3dCmdInvalidateGBImagePartial;
1890
1891
1892
1893
1894
1895
1896 typedef
1897 #include "vmware_pack_begin.h"
1898 struct SVGA3dCmdDefineGBContext {
1899 uint32 cid;
1900 }
1901 #include "vmware_pack_end.h"
1902 SVGA3dCmdDefineGBContext;
1903
1904
1905
1906
1907
1908 typedef
1909 #include "vmware_pack_begin.h"
1910 struct SVGA3dCmdDestroyGBContext {
1911 uint32 cid;
1912 }
1913 #include "vmware_pack_end.h"
1914 SVGA3dCmdDestroyGBContext;
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928 typedef
1929 #include "vmware_pack_begin.h"
1930 struct SVGA3dCmdBindGBContext {
1931 uint32 cid;
1932 SVGAMobId mobid;
1933 uint32 validContents;
1934 }
1935 #include "vmware_pack_end.h"
1936 SVGA3dCmdBindGBContext;
1937
1938
1939
1940
1941
1942
1943 typedef
1944 #include "vmware_pack_begin.h"
1945 struct SVGA3dCmdReadbackGBContext {
1946 uint32 cid;
1947 }
1948 #include "vmware_pack_end.h"
1949 SVGA3dCmdReadbackGBContext;
1950
1951
1952
1953
1954 typedef
1955 #include "vmware_pack_begin.h"
1956 struct SVGA3dCmdInvalidateGBContext {
1957 uint32 cid;
1958 }
1959 #include "vmware_pack_end.h"
1960 SVGA3dCmdInvalidateGBContext;
1961
1962
1963
1964
1965
1966 typedef
1967 #include "vmware_pack_begin.h"
1968 struct SVGA3dCmdDefineGBShader {
1969 uint32 shid;
1970 SVGA3dShaderType type;
1971 uint32 sizeInBytes;
1972 }
1973 #include "vmware_pack_end.h"
1974 SVGA3dCmdDefineGBShader;
1975
1976
1977
1978
1979
1980 typedef
1981 #include "vmware_pack_begin.h"
1982 struct SVGA3dCmdBindGBShader {
1983 uint32 shid;
1984 SVGAMobId mobid;
1985 uint32 offsetInBytes;
1986 }
1987 #include "vmware_pack_end.h"
1988 SVGA3dCmdBindGBShader;
1989
1990
1991
1992
1993
1994 typedef
1995 #include "vmware_pack_begin.h"
1996 struct SVGA3dCmdDestroyGBShader {
1997 uint32 shid;
1998 }
1999 #include "vmware_pack_end.h"
2000 SVGA3dCmdDestroyGBShader;
2001
2002 typedef
2003 #include "vmware_pack_begin.h"
2004 struct {
2005 uint32 cid;
2006 uint32 regStart;
2007 SVGA3dShaderType shaderType;
2008 SVGA3dShaderConstType constType;
2009
2010
2011
2012
2013
2014
2015
2016 }
2017 #include "vmware_pack_end.h"
2018 SVGA3dCmdSetGBShaderConstInline;
2019
2020
2021 typedef
2022 #include "vmware_pack_begin.h"
2023 struct {
2024 uint32 cid;
2025 SVGA3dQueryType type;
2026 }
2027 #include "vmware_pack_end.h"
2028 SVGA3dCmdBeginGBQuery;
2029
2030 typedef
2031 #include "vmware_pack_begin.h"
2032 struct {
2033 uint32 cid;
2034 SVGA3dQueryType type;
2035 SVGAMobId mobid;
2036 uint32 offset;
2037 }
2038 #include "vmware_pack_end.h"
2039 SVGA3dCmdEndGBQuery;
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050 typedef
2051 #include "vmware_pack_begin.h"
2052 struct {
2053 uint32 cid;
2054 SVGA3dQueryType type;
2055 SVGAMobId mobid;
2056 uint32 offset;
2057 }
2058 #include "vmware_pack_end.h"
2059 SVGA3dCmdWaitForGBQuery;
2060
2061
2062 typedef
2063 #include "vmware_pack_begin.h"
2064 struct {
2065 SVGAMobId mobid;
2066 uint32 mustBeZero;
2067 uint32 initialized;
2068 }
2069 #include "vmware_pack_end.h"
2070 SVGA3dCmdEnableGart;
2071
2072 typedef
2073 #include "vmware_pack_begin.h"
2074 struct {
2075 SVGAMobId mobid;
2076 uint32 gartOffset;
2077 }
2078 #include "vmware_pack_end.h"
2079 SVGA3dCmdMapMobIntoGart;
2080
2081
2082 typedef
2083 #include "vmware_pack_begin.h"
2084 struct {
2085 uint32 gartOffset;
2086 uint32 numPages;
2087 }
2088 #include "vmware_pack_end.h"
2089 SVGA3dCmdUnmapGartRange;
2090
2091
2092
2093
2094
2095
2096 typedef
2097 #include "vmware_pack_begin.h"
2098 struct {
2099 uint32 stid;
2100 uint32 width;
2101 uint32 height;
2102 int32 xRoot;
2103 int32 yRoot;
2104 SVGAScreenTargetFlags flags;
2105
2106
2107
2108
2109
2110
2111 uint32 dpi;
2112 }
2113 #include "vmware_pack_end.h"
2114 SVGA3dCmdDefineGBScreenTarget;
2115
2116 typedef
2117 #include "vmware_pack_begin.h"
2118 struct {
2119 uint32 stid;
2120 }
2121 #include "vmware_pack_end.h"
2122 SVGA3dCmdDestroyGBScreenTarget;
2123
2124 typedef
2125 #include "vmware_pack_begin.h"
2126 struct {
2127 uint32 stid;
2128 SVGA3dSurfaceImageId image;
2129 }
2130 #include "vmware_pack_end.h"
2131 SVGA3dCmdBindGBScreenTarget;
2132
2133 typedef
2134 #include "vmware_pack_begin.h"
2135 struct {
2136 uint32 stid;
2137 SVGA3dRect rect;
2138 }
2139 #include "vmware_pack_end.h"
2140 SVGA3dCmdUpdateGBScreenTarget;
2141
2142 typedef
2143 #include "vmware_pack_begin.h"
2144 struct SVGA3dCmdGBScreenDMA {
2145 uint32 screenId;
2146 uint32 dead;
2147 SVGAMobId destMobID;
2148 uint32 destPitch;
2149 SVGAMobId changeMapMobID;
2150 }
2151 #include "vmware_pack_end.h"
2152 SVGA3dCmdGBScreenDMA;
2153
2154 typedef
2155 #include "vmware_pack_begin.h"
2156 struct {
2157 uint32 value;
2158 uint32 mobId;
2159 uint32 mobOffset;
2160 }
2161 #include "vmware_pack_end.h"
2162 SVGA3dCmdGBMobFence;
2163
2164 typedef
2165 #include "vmware_pack_begin.h"
2166 struct {
2167 uint32 stid;
2168 SVGA3dSurfaceImageId dest;
2169
2170 uint32 statusMobId;
2171 uint32 statusMobOffset;
2172
2173
2174 uint32 mustBeInvalidId;
2175 uint32 mustBeZero;
2176 }
2177 #include "vmware_pack_end.h"
2178 SVGA3dCmdScreenCopy;
2179
2180 #define SVGA_SCREEN_COPY_STATUS_FAILURE 0x00
2181 #define SVGA_SCREEN_COPY_STATUS_SUCCESS 0x01
2182 #define SVGA_SCREEN_COPY_STATUS_INVALID 0xFFFFFFFF
2183
2184 #endif