1
1
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
2
2
/**********************************************************
3
- * Copyright 1998-2015 VMware, Inc.
3
+ * Copyright 1998-2020 VMware, Inc.
4
4
*
5
5
* Permission is hereby granted, free of charge, to any person
6
6
* obtaining a copy of this software and associated documentation
@@ -104,12 +104,12 @@ typedef enum {
104
104
SVGA_3D_CMD_DEAD1 = 1083 ,
105
105
SVGA_3D_CMD_DEAD2 = 1084 ,
106
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 ,
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 ,
113
113
114
114
SVGA_3D_CMD_SET_OTABLE_BASE = 1091 ,
115
115
SVGA_3D_CMD_READBACK_OTABLE = 1092 ,
@@ -261,30 +261,23 @@ typedef enum {
261
261
SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET = 1220 ,
262
262
SVGA_3D_CMD_DX_SET_PS_CONSTANT_BUFFER_OFFSET = 1221 ,
263
263
SVGA_3D_CMD_DX_SET_GS_CONSTANT_BUFFER_OFFSET = 1222 ,
264
-
265
- /*
266
- * Reserve some IDs to be used for the SM5 shader types.
267
- */
268
- SVGA_3D_CMD_DX_RESERVED1 = 1223 ,
269
- SVGA_3D_CMD_DX_RESERVED2 = 1224 ,
270
- SVGA_3D_CMD_DX_RESERVED3 = 1225 ,
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 ,
271
267
272
268
SVGA_3D_CMD_DX_COND_BIND_ALL_SHADER = 1226 ,
273
269
SVGA_3D_CMD_DX_MAX = 1227 ,
274
270
275
271
SVGA_3D_CMD_SCREEN_COPY = 1227 ,
276
272
277
- /*
278
- * Reserve some IDs to be used for video.
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 ,
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 ,
288
281
289
282
SVGA_3D_CMD_GROW_OTABLE = 1236 ,
290
283
SVGA_3D_CMD_DX_GROW_COTABLE = 1237 ,
@@ -298,7 +291,46 @@ typedef enum {
298
291
SVGA_3D_CMD_DX_PRED_CONVERT = 1243 ,
299
292
SVGA_3D_CMD_WHOLE_SURFACE_COPY = 1244 ,
300
293
301
- SVGA_3D_CMD_MAX = 1245 ,
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 ,
300
+
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 ,
305
+
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 ,
310
+
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 ,
317
+
318
+ SVGA_3D_CMD_RESERVED2_1 = 1265 ,
319
+
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 ,
332
+
333
+ SVGA_3D_CMD_MAX = 1278 ,
302
334
SVGA_3D_CMD_FUTURE_MAX = 3000
303
335
} SVGAFifo3dCmdId ;
304
336
@@ -334,13 +366,15 @@ struct {
334
366
uint32 sid ;
335
367
SVGA3dSurface1Flags surfaceFlags ;
336
368
SVGA3dSurfaceFormat format ;
369
+
337
370
/*
338
371
* If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace
339
372
* structures must have the same value of numMipLevels field.
340
373
* Otherwise, all but the first SVGA3dSurfaceFace structures must have the
341
374
* numMipLevels set to 0.
342
375
*/
343
376
SVGA3dSurfaceFace face [SVGA3D_MAX_SURFACE_FACES ];
377
+
344
378
/*
345
379
* Followed by an SVGA3dSize structure for each mip level in each face.
346
380
*
@@ -360,6 +394,7 @@ struct {
360
394
uint32 sid ;
361
395
SVGA3dSurface1Flags surfaceFlags ;
362
396
SVGA3dSurfaceFormat format ;
397
+
363
398
/*
364
399
* If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace
365
400
* structures must have the same value of numMipLevels field.
@@ -369,6 +404,7 @@ struct {
369
404
SVGA3dSurfaceFace face [SVGA3D_MAX_SURFACE_FACES ];
370
405
uint32 multisampleCount ;
371
406
SVGA3dTextureFilter autogenFilter ;
407
+
372
408
/*
373
409
* Followed by an SVGA3dSize structure for each mip level in each face.
374
410
*
@@ -512,6 +548,18 @@ struct {
512
548
#include "vmware_pack_end.h"
513
549
SVGA3dCmdWholeSurfaceCopy ; /* SVGA_3D_CMD_WHOLE_SURFACE_COPY */
514
550
551
+ typedef
552
+ #include "vmware_pack_begin.h"
553
+ struct {
554
+ SVGA3dSurfaceImageId src ;
555
+ SVGA3dSurfaceImageId dest ;
556
+ SVGA3dBox boxSrc ;
557
+ SVGA3dBox boxDest ;
558
+ }
559
+ #include "vmware_pack_end.h"
560
+ SVGA3dCmdSurfaceStretchBltNonMSToMS ;
561
+ /* SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS */
562
+
515
563
typedef
516
564
#include "vmware_pack_begin.h"
517
565
struct {
@@ -555,6 +603,7 @@ struct {
555
603
SVGAGuestImage guest ;
556
604
SVGA3dSurfaceImageId host ;
557
605
SVGA3dTransferType transfer ;
606
+
558
607
/*
559
608
* Followed by variable number of SVGA3dCopyBox structures. For consistency
560
609
* in all clipping logic and coordinate translation, we define the
@@ -789,7 +838,7 @@ struct {
789
838
790
839
uint32 indexBufferSid ; /* Valid index buffer sid. */
791
840
uint32 indexBufferOffset ; /* Byte offset into the vertex buffer, almost */
792
- /* always 0 for DX9 guests, non-zero for OpenGL */
841
+ /* always 0 for pre SM guests, non-zero for OpenGL */
793
842
/* guests. We can't represent non-multiple of */
794
843
/* stride offsets in D3D9Renderer... */
795
844
uint8 indexBufferStride ; /* Allowable values = 1, 2, or 4 */
@@ -1228,6 +1277,7 @@ struct SVGA3dCmdLogicOpsBitBlt {
1228
1277
SVGA3dSurfaceImageId src ;
1229
1278
SVGA3dSurfaceImageId dst ;
1230
1279
SVGA3dLogicOp logicOp ;
1280
+ SVGA3dLogicOpRop3 logicOpRop3 ;
1231
1281
/* Followed by variable number of SVGA3dCopyBox structures */
1232
1282
}
1233
1283
#include "vmware_pack_end.h"
@@ -1247,7 +1297,8 @@ struct SVGA3dCmdLogicOpsTransBlt {
1247
1297
uint32 color ;
1248
1298
uint32 flags ;
1249
1299
SVGA3dBox srcBox ;
1250
- SVGA3dBox dstBox ;
1300
+ SVGA3dSignedBox dstBox ;
1301
+ SVGA3dBox clipBox ;
1251
1302
}
1252
1303
#include "vmware_pack_end.h"
1253
1304
SVGA3dCmdLogicOpsTransBlt ; /* SVGA_3D_CMD_LOGICOPS_TRANSBLT */
@@ -1266,7 +1317,8 @@ struct SVGA3dCmdLogicOpsStretchBlt {
1266
1317
uint16 mode ;
1267
1318
uint16 flags ;
1268
1319
SVGA3dBox srcBox ;
1269
- SVGA3dBox dstBox ;
1320
+ SVGA3dSignedBox dstBox ;
1321
+ SVGA3dBox clipBox ;
1270
1322
}
1271
1323
#include "vmware_pack_end.h"
1272
1324
SVGA3dCmdLogicOpsStretchBlt ; /* SVGA_3D_CMD_LOGICOPS_STRETCHBLT */
@@ -1283,6 +1335,7 @@ struct SVGA3dCmdLogicOpsColorFill {
1283
1335
SVGA3dSurfaceImageId dst ;
1284
1336
uint32 color ;
1285
1337
SVGA3dLogicOp logicOp ;
1338
+ SVGA3dLogicOpRop3 logicOpRop3 ;
1286
1339
/* Followed by variable number of SVGA3dRect structures. */
1287
1340
}
1288
1341
#include "vmware_pack_end.h"
@@ -1302,7 +1355,8 @@ struct SVGA3dCmdLogicOpsAlphaBlend {
1302
1355
uint32 alphaVal ;
1303
1356
uint32 flags ;
1304
1357
SVGA3dBox srcBox ;
1305
- SVGA3dBox dstBox ;
1358
+ SVGA3dSignedBox dstBox ;
1359
+ SVGA3dBox clipBox ;
1306
1360
}
1307
1361
#include "vmware_pack_end.h"
1308
1362
SVGA3dCmdLogicOpsAlphaBlend ; /* SVGA_3D_CMD_LOGICOPS_ALPHABLEND */
@@ -1365,8 +1419,9 @@ struct {
1365
1419
SVGA3dSurface2Flags surface2Flags ;
1366
1420
uint8 multisamplePattern ;
1367
1421
uint8 qualityLevel ;
1368
- uint8 pad0 [2 ];
1369
- uint32 pad1 [3 ];
1422
+ uint16 bufferByteStride ;
1423
+ float minLOD ;
1424
+ uint32 pad0 [2 ];
1370
1425
}
1371
1426
#include "vmware_pack_end.h"
1372
1427
SVGAOTableSurfaceEntry ;
@@ -1543,7 +1598,7 @@ typedef
1543
1598
#include "vmware_pack_begin.h"
1544
1599
struct {
1545
1600
SVGAOTableType type ;
1546
- PPN baseAddress ;
1601
+ PPN32 baseAddress ;
1547
1602
uint32 sizeInBytes ;
1548
1603
uint32 validSizeInBytes ;
1549
1604
SVGAMobFormat ptDepth ;
@@ -1599,7 +1654,7 @@ typedef
1599
1654
struct SVGA3dCmdDefineGBMob {
1600
1655
SVGAMobId mobid ;
1601
1656
SVGAMobFormat ptDepth ;
1602
- PPN base ;
1657
+ PPN32 base ;
1603
1658
uint32 sizeInBytes ;
1604
1659
}
1605
1660
#include "vmware_pack_end.h"
@@ -1618,7 +1673,6 @@ struct SVGA3dCmdDestroyGBMob {
1618
1673
#include "vmware_pack_end.h"
1619
1674
SVGA3dCmdDestroyGBMob ; /* SVGA_3D_CMD_DESTROY_GB_MOB */
1620
1675
1621
-
1622
1676
/*
1623
1677
* Define a memory object (Mob) in the OTable with a PPN64 base.
1624
1678
*/
@@ -1718,6 +1772,27 @@ struct SVGA3dCmdDefineGBSurface_v3 {
1718
1772
#include "vmware_pack_end.h"
1719
1773
SVGA3dCmdDefineGBSurface_v3 ; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V3 */
1720
1774
1775
+ /*
1776
+ * Defines a guest-backed surface, adding buffer byte stride.
1777
+ */
1778
+ typedef
1779
+ #include "vmware_pack_begin.h"
1780
+ struct SVGA3dCmdDefineGBSurface_v4 {
1781
+ uint32 sid ;
1782
+ SVGA3dSurfaceAllFlags surfaceFlags ;
1783
+ SVGA3dSurfaceFormat format ;
1784
+ uint32 numMipLevels ;
1785
+ uint32 multisampleCount ;
1786
+ SVGA3dMSPattern multisamplePattern ;
1787
+ SVGA3dMSQualityLevel qualityLevel ;
1788
+ SVGA3dTextureFilter autogenFilter ;
1789
+ SVGA3dSize size ;
1790
+ uint32 arraySize ;
1791
+ uint32 bufferByteStride ;
1792
+ }
1793
+ #include "vmware_pack_end.h"
1794
+ SVGA3dCmdDefineGBSurface_v4 ; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V4 */
1795
+
1721
1796
/*
1722
1797
* Destroy a guest-backed surface.
1723
1798
*/
@@ -2181,4 +2256,20 @@ SVGA3dCmdScreenCopy; /* SVGA_3D_CMD_SCREEN_COPY */
2181
2256
#define SVGA_SCREEN_COPY_STATUS_SUCCESS 0x01
2182
2257
#define SVGA_SCREEN_COPY_STATUS_INVALID 0xFFFFFFFF
2183
2258
2259
+ typedef
2260
+ #include "vmware_pack_begin.h"
2261
+ struct {
2262
+ uint32 sid ;
2263
+ }
2264
+ #include "vmware_pack_end.h"
2265
+ SVGA3dCmdWriteZeroSurface ; /* SVGA_3D_CMD_WRITE_ZERO_SURFACE */
2266
+
2267
+ typedef
2268
+ #include "vmware_pack_begin.h"
2269
+ struct {
2270
+ uint32 sid ;
2271
+ }
2272
+ #include "vmware_pack_end.h"
2273
+ SVGA3dCmdHintZeroSurface ; /* SVGA_3D_CMD_HINT_ZERO_SURFACE */
2274
+
2184
2275
#endif /* _SVGA3D_CMD_H_ */
0 commit comments