1 /**********************************************************
2 * Copyright 1998-2009 VMware, Inc. All rights reserved.
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 **********************************************************/
29 * SVGA 3D hardware definitions
32 #ifndef _SVGA3D_REG_H_
33 #define _SVGA3D_REG_H_
42 * The hardware version is stored in the SVGA_FIFO_3D_HWVERSION fifo
43 * register. Is set by the host and read by the guest. This lets
44 * us make new guest drivers which are backwards-compatible with old
45 * SVGA hardware revisions. It does not let us support old guest
46 * drivers. Good enough for now.
50 #define SVGA3D_MAKE_HWVERSION(major, minor) (((major) << 16) | ((minor) & 0xFF))
51 #define SVGA3D_MAJOR_HWVERSION(version) ((version) >> 16)
52 #define SVGA3D_MINOR_HWVERSION(version) ((version) & 0xFF)
55 SVGA3D_HWVERSION_WS5_RC1 = SVGA3D_MAKE_HWVERSION(0, 1),
56 SVGA3D_HWVERSION_WS5_RC2 = SVGA3D_MAKE_HWVERSION(0, 2),
57 SVGA3D_HWVERSION_WS51_RC1 = SVGA3D_MAKE_HWVERSION(0, 3),
58 SVGA3D_HWVERSION_WS6_B1 = SVGA3D_MAKE_HWVERSION(1, 1),
59 SVGA3D_HWVERSION_FUSION_11 = SVGA3D_MAKE_HWVERSION(1, 4),
60 SVGA3D_HWVERSION_WS65_B1 = SVGA3D_MAKE_HWVERSION(2, 0),
61 SVGA3D_HWVERSION_WS8_B1 = SVGA3D_MAKE_HWVERSION(2, 1),
62 SVGA3D_HWVERSION_CURRENT = SVGA3D_HWVERSION_WS8_B1,
63 } SVGA3dHardwareVersion;
69 typedef uint32 SVGA3dBool; /* 32-bit Bool definition */
70 #define SVGA3D_NUM_CLIPPLANES 6
71 #define SVGA3D_MAX_SIMULTANEOUS_RENDER_TARGETS 8
72 #define SVGA3D_MAX_CONTEXT_IDS 256
73 #define SVGA3D_MAX_SURFACE_IDS (32 * 1024)
75 #define SVGA3D_NUM_TEXTURE_UNITS 32
76 #define SVGA3D_NUM_LIGHTS 8
81 * If you modify this list, be sure to keep GLUtil.c in sync. It
82 * includes the internal format definition of each surface in
83 * GLUtil_ConvertSurfaceFormat, and it contains a table of
84 * human-readable names in GLUtil_GetFormatName.
87 typedef enum SVGA3dSurfaceFormat {
88 SVGA3D_FORMAT_MIN = 0,
89 SVGA3D_FORMAT_INVALID = 0,
104 SVGA3D_LUMINANCE8 = 11,
105 SVGA3D_LUMINANCE4_ALPHA4 = 12,
106 SVGA3D_LUMINANCE16 = 13,
107 SVGA3D_LUMINANCE8_ALPHA8 = 14,
115 SVGA3D_BUMPU8V8 = 20,
116 SVGA3D_BUMPL6V5U5 = 21,
117 SVGA3D_BUMPX8L8V8U8 = 22,
118 SVGA3D_BUMPL8V8U8 = 23,
120 SVGA3D_ARGB_S10E5 = 24, /* 16-bit floating-point ARGB */
121 SVGA3D_ARGB_S23E8 = 25, /* 32-bit floating-point ARGB */
123 SVGA3D_A2R10G10B10 = 26,
127 SVGA3D_Q8W8V8U8 = 28,
131 SVGA3D_X8L8V8U8 = 30,
132 SVGA3D_A2W10V10U10 = 31,
136 /* Single- and dual-component floating point formats */
139 SVGA3D_RG_S10E5 = 35,
140 SVGA3D_RG_S23E8 = 36,
149 SVGA3D_A16B16G16R16 = 41,
151 /* Packed Video formats */
155 /* Planar video formats */
158 /* Video format with alpha */
161 SVGA3D_R32G32B32A32_TYPELESS = 46,
162 SVGA3D_R32G32B32A32_FLOAT = 25,
163 SVGA3D_R32G32B32A32_UINT = 47,
164 SVGA3D_R32G32B32A32_SINT = 48,
165 SVGA3D_R32G32B32_TYPELESS = 49,
166 SVGA3D_R32G32B32_FLOAT = 50,
167 SVGA3D_R32G32B32_UINT = 51,
168 SVGA3D_R32G32B32_SINT = 52,
169 SVGA3D_R16G16B16A16_TYPELESS = 53,
170 SVGA3D_R16G16B16A16_FLOAT = 24,
171 SVGA3D_R16G16B16A16_UNORM = 41,
172 SVGA3D_R16G16B16A16_UINT = 54,
173 SVGA3D_R16G16B16A16_SNORM = 55,
174 SVGA3D_R16G16B16A16_SINT = 56,
175 SVGA3D_R32G32_TYPELESS = 57,
176 SVGA3D_R32G32_FLOAT = 36,
177 SVGA3D_R32G32_UINT = 58,
178 SVGA3D_R32G32_SINT = 59,
179 SVGA3D_R32G8X24_TYPELESS = 60,
180 SVGA3D_D32_FLOAT_S8X24_UINT = 61,
181 SVGA3D_R32_FLOAT_X8X24_TYPELESS = 62,
182 SVGA3D_X32_TYPELESS_G8X24_UINT = 63,
183 SVGA3D_R10G10B10A2_TYPELESS = 64,
184 SVGA3D_R10G10B10A2_UNORM = 26,
185 SVGA3D_R10G10B10A2_UINT = 65,
186 SVGA3D_R11G11B10_FLOAT = 66,
187 SVGA3D_R8G8B8A8_TYPELESS = 67,
188 SVGA3D_R8G8B8A8_UNORM = 68,
189 SVGA3D_R8G8B8A8_UNORM_SRGB = 69,
190 SVGA3D_R8G8B8A8_UINT = 70,
191 SVGA3D_R8G8B8A8_SNORM = 28,
192 SVGA3D_R8G8B8A8_SINT = 71,
193 SVGA3D_R16G16_TYPELESS = 72,
194 SVGA3D_R16G16_FLOAT = 35,
195 SVGA3D_R16G16_UNORM = 40,
196 SVGA3D_R16G16_UINT = 73,
197 SVGA3D_R16G16_SNORM = 39,
198 SVGA3D_R16G16_SINT = 74,
199 SVGA3D_R32_TYPELESS = 75,
200 SVGA3D_D32_FLOAT = 76,
201 SVGA3D_R32_FLOAT = 34,
202 SVGA3D_R32_UINT = 77,
203 SVGA3D_R32_SINT = 78,
204 SVGA3D_R24G8_TYPELESS = 79,
205 SVGA3D_D24_UNORM_S8_UINT = 80,
206 SVGA3D_R24_UNORM_X8_TYPELESS = 81,
207 SVGA3D_X24_TYPELESS_G8_UINT = 82,
208 SVGA3D_R8G8_TYPELESS = 83,
209 SVGA3D_R8G8_UNORM = 84,
210 SVGA3D_R8G8_UINT = 85,
211 SVGA3D_R8G8_SNORM = 27,
212 SVGA3D_R8G8_SINT = 86,
213 SVGA3D_R16_TYPELESS = 87,
214 SVGA3D_R16_FLOAT = 33,
215 SVGA3D_D16_UNORM = 8,
216 SVGA3D_R16_UNORM = 88,
217 SVGA3D_R16_UINT = 89,
218 SVGA3D_R16_SNORM = 90,
219 SVGA3D_R16_SINT = 91,
220 SVGA3D_R8_TYPELESS = 92,
221 SVGA3D_R8_UNORM = 93,
223 SVGA3D_R8_SNORM = 95,
225 SVGA3D_A8_UNORM = 32,
226 SVGA3D_R1_UNORM = 97,
227 SVGA3D_R9G9B9E5_SHAREDEXP = 98,
228 SVGA3D_R8G8_B8G8_UNORM = 99,
229 SVGA3D_G8R8_G8B8_UNORM = 100,
230 SVGA3D_BC1_TYPELESS = 101,
231 SVGA3D_BC1_UNORM = 15,
232 SVGA3D_BC1_UNORM_SRGB = 102,
233 SVGA3D_BC2_TYPELESS = 103,
234 SVGA3D_BC2_UNORM = 17,
235 SVGA3D_BC2_UNORM_SRGB = 104,
236 SVGA3D_BC3_TYPELESS = 105,
237 SVGA3D_BC3_UNORM = 19,
238 SVGA3D_BC3_UNORM_SRGB = 106,
239 SVGA3D_BC4_TYPELESS = 107,
240 SVGA3D_BC4_UNORM = 108,
241 SVGA3D_BC4_SNORM = 109,
242 SVGA3D_BC5_TYPELESS = 110,
243 SVGA3D_BC5_UNORM = 111,
244 SVGA3D_BC5_SNORM = 112,
245 SVGA3D_B5G6R5_UNORM = 3,
246 SVGA3D_B5G5R5A1_UNORM = 5,
247 SVGA3D_B8G8R8A8_UNORM = 2,
248 SVGA3D_B8G8R8X8_UNORM = 1,
249 SVGA3D_R10G10B10_XR_BIAS_A2_UNORM = 113,
250 SVGA3D_B8G8R8A8_TYPELESS = 114,
251 SVGA3D_B8G8R8A8_UNORM_SRGB = 115,
252 SVGA3D_B8G8R8X8_TYPELESS = 116,
253 SVGA3D_B8G8R8X8_UNORM_SRGB = 117,
255 /* Advanced D3D9 depth formats. */
258 SVGA3D_Z_D24S8_INT = 120,
260 /* Planar video formats. */
263 /* Shader constant formats. */
264 SVGA3D_SURFACE_SHADERCONST_FLOAT = 122,
265 SVGA3D_SURFACE_SHADERCONST_INT = 123,
266 SVGA3D_SURFACE_SHADERCONST_BOOL = 124,
268 SVGA3D_FORMAT_MAX = 125,
269 } SVGA3dSurfaceFormat;
271 typedef uint32 SVGA3dColor; /* a, r, g, b */
274 * These match the D3DFORMAT_OP definitions used by Direct3D. We need
275 * them so that we can query the host for what the supported surface
276 * operations are (when we're using the D3D backend, in particular),
277 * and so we can send those operations to the guest.
280 SVGA3DFORMAT_OP_TEXTURE = 0x00000001,
281 SVGA3DFORMAT_OP_VOLUMETEXTURE = 0x00000002,
282 SVGA3DFORMAT_OP_CUBETEXTURE = 0x00000004,
283 SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET = 0x00000008,
284 SVGA3DFORMAT_OP_SAME_FORMAT_RENDERTARGET = 0x00000010,
285 SVGA3DFORMAT_OP_ZSTENCIL = 0x00000040,
286 SVGA3DFORMAT_OP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH = 0x00000080,
289 * This format can be used as a render target if the current display mode
290 * is the same depth if the alpha channel is ignored. e.g. if the device
291 * can render to A8R8G8B8 when the display mode is X8R8G8B8, then the
292 * format op list entry for A8R8G8B8 should have this cap.
294 SVGA3DFORMAT_OP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET = 0x00000100,
297 * This format contains DirectDraw support (including Flip). This flag
298 * should not to be set on alpha formats.
300 SVGA3DFORMAT_OP_DISPLAYMODE = 0x00000400,
303 * The rasterizer can support some level of Direct3D support in this format
304 * and implies that the driver can create a Context in this mode (for some
305 * render target format). When this flag is set, the SVGA3DFORMAT_OP_DISPLAYMODE
306 * flag must also be set.
308 SVGA3DFORMAT_OP_3DACCELERATION = 0x00000800,
311 * This is set for a private format when the driver has put the bpp in
314 SVGA3DFORMAT_OP_PIXELSIZE = 0x00001000,
317 * Indicates that this format can be converted to any RGB format for which
318 * SVGA3DFORMAT_OP_MEMBEROFGROUP_ARGB is specified
320 SVGA3DFORMAT_OP_CONVERT_TO_ARGB = 0x00002000,
323 * Indicates that this format can be used to create offscreen plain surfaces.
325 SVGA3DFORMAT_OP_OFFSCREENPLAIN = 0x00004000,
328 * Indicated that this format can be read as an SRGB texture (meaning that the
329 * sampler will linearize the looked up data)
331 SVGA3DFORMAT_OP_SRGBREAD = 0x00008000,
334 * Indicates that this format can be used in the bumpmap instructions
336 SVGA3DFORMAT_OP_BUMPMAP = 0x00010000,
339 * Indicates that this format can be sampled by the displacement map sampler
341 SVGA3DFORMAT_OP_DMAP = 0x00020000,
344 * Indicates that this format cannot be used with texture filtering
346 SVGA3DFORMAT_OP_NOFILTER = 0x00040000,
349 * Indicates that format conversions are supported to this RGB format if
350 * SVGA3DFORMAT_OP_CONVERT_TO_ARGB is specified in the source format.
352 SVGA3DFORMAT_OP_MEMBEROFGROUP_ARGB = 0x00080000,
355 * Indicated that this format can be written as an SRGB target (meaning that the
356 * pixel pipe will DE-linearize data on output to format)
358 SVGA3DFORMAT_OP_SRGBWRITE = 0x00100000,
361 * Indicates that this format cannot be used with alpha blending
363 SVGA3DFORMAT_OP_NOALPHABLEND = 0x00200000,
366 * Indicates that the device can auto-generated sublevels for resources
369 SVGA3DFORMAT_OP_AUTOGENMIPMAP = 0x00400000,
372 * Indicates that this format can be used by vertex texture sampler
374 SVGA3DFORMAT_OP_VERTEXTEXTURE = 0x00800000,
377 * Indicates that this format supports neither texture coordinate wrap
378 * modes, nor mipmapping
380 SVGA3DFORMAT_OP_NOTEXCOORDWRAPNORMIP = 0x01000000
384 * This structure is a conversion of SVGA3DFORMAT_OP_*.
385 * Entries must be located at the same position.
391 uint32 volumeTexture : 1;
392 uint32 cubeTexture : 1;
393 uint32 offscreenRenderTarget : 1;
394 uint32 sameFormatRenderTarget : 1;
397 uint32 zStencilArbitraryDepth : 1;
398 uint32 sameFormatUpToAlpha : 1;
400 uint32 displayMode : 1;
401 uint32 acceleration3d : 1;
402 uint32 pixelSize : 1;
403 uint32 convertToARGB : 1;
404 uint32 offscreenPlain : 1;
409 uint32 memberOfGroupARGB : 1;
410 uint32 sRGBWrite : 1;
411 uint32 noAlphaBlend : 1;
412 uint32 autoGenMipMap : 1;
413 uint32 vertexTexture : 1;
414 uint32 noTexCoordWrapNorMip : 1;
416 } SVGA3dSurfaceFormatCaps;
419 * SVGA_3D_CMD_SETRENDERSTATE Types. All value types
420 * must fit in a uint32.
424 SVGA3D_RS_INVALID = 0,
425 SVGA3D_RS_ZENABLE = 1, /* SVGA3dBool */
426 SVGA3D_RS_ZWRITEENABLE = 2, /* SVGA3dBool */
427 SVGA3D_RS_ALPHATESTENABLE = 3, /* SVGA3dBool */
428 SVGA3D_RS_DITHERENABLE = 4, /* SVGA3dBool */
429 SVGA3D_RS_BLENDENABLE = 5, /* SVGA3dBool */
430 SVGA3D_RS_FOGENABLE = 6, /* SVGA3dBool */
431 SVGA3D_RS_SPECULARENABLE = 7, /* SVGA3dBool */
432 SVGA3D_RS_STENCILENABLE = 8, /* SVGA3dBool */
433 SVGA3D_RS_LIGHTINGENABLE = 9, /* SVGA3dBool */
434 SVGA3D_RS_NORMALIZENORMALS = 10, /* SVGA3dBool */
435 SVGA3D_RS_POINTSPRITEENABLE = 11, /* SVGA3dBool */
436 SVGA3D_RS_POINTSCALEENABLE = 12, /* SVGA3dBool */
437 SVGA3D_RS_STENCILREF = 13, /* uint32 */
438 SVGA3D_RS_STENCILMASK = 14, /* uint32 */
439 SVGA3D_RS_STENCILWRITEMASK = 15, /* uint32 */
440 SVGA3D_RS_FOGSTART = 16, /* float */
441 SVGA3D_RS_FOGEND = 17, /* float */
442 SVGA3D_RS_FOGDENSITY = 18, /* float */
443 SVGA3D_RS_POINTSIZE = 19, /* float */
444 SVGA3D_RS_POINTSIZEMIN = 20, /* float */
445 SVGA3D_RS_POINTSIZEMAX = 21, /* float */
446 SVGA3D_RS_POINTSCALE_A = 22, /* float */
447 SVGA3D_RS_POINTSCALE_B = 23, /* float */
448 SVGA3D_RS_POINTSCALE_C = 24, /* float */
449 SVGA3D_RS_FOGCOLOR = 25, /* SVGA3dColor */
450 SVGA3D_RS_AMBIENT = 26, /* SVGA3dColor */
451 SVGA3D_RS_CLIPPLANEENABLE = 27, /* SVGA3dClipPlanes */
452 SVGA3D_RS_FOGMODE = 28, /* SVGA3dFogMode */
453 SVGA3D_RS_FILLMODE = 29, /* SVGA3dFillMode */
454 SVGA3D_RS_SHADEMODE = 30, /* SVGA3dShadeMode */
455 SVGA3D_RS_LINEPATTERN = 31, /* SVGA3dLinePattern */
456 SVGA3D_RS_SRCBLEND = 32, /* SVGA3dBlendOp */
457 SVGA3D_RS_DSTBLEND = 33, /* SVGA3dBlendOp */
458 SVGA3D_RS_BLENDEQUATION = 34, /* SVGA3dBlendEquation */
459 SVGA3D_RS_CULLMODE = 35, /* SVGA3dFace */
460 SVGA3D_RS_ZFUNC = 36, /* SVGA3dCmpFunc */
461 SVGA3D_RS_ALPHAFUNC = 37, /* SVGA3dCmpFunc */
462 SVGA3D_RS_STENCILFUNC = 38, /* SVGA3dCmpFunc */
463 SVGA3D_RS_STENCILFAIL = 39, /* SVGA3dStencilOp */
464 SVGA3D_RS_STENCILZFAIL = 40, /* SVGA3dStencilOp */
465 SVGA3D_RS_STENCILPASS = 41, /* SVGA3dStencilOp */
466 SVGA3D_RS_ALPHAREF = 42, /* float (0.0 .. 1.0) */
467 SVGA3D_RS_FRONTWINDING = 43, /* SVGA3dFrontWinding */
468 SVGA3D_RS_COORDINATETYPE = 44, /* SVGA3dCoordinateType */
469 SVGA3D_RS_ZBIAS = 45, /* float */
470 SVGA3D_RS_RANGEFOGENABLE = 46, /* SVGA3dBool */
471 SVGA3D_RS_COLORWRITEENABLE = 47, /* SVGA3dColorMask */
472 SVGA3D_RS_VERTEXMATERIALENABLE = 48, /* SVGA3dBool */
473 SVGA3D_RS_DIFFUSEMATERIALSOURCE = 49, /* SVGA3dVertexMaterial */
474 SVGA3D_RS_SPECULARMATERIALSOURCE = 50, /* SVGA3dVertexMaterial */
475 SVGA3D_RS_AMBIENTMATERIALSOURCE = 51, /* SVGA3dVertexMaterial */
476 SVGA3D_RS_EMISSIVEMATERIALSOURCE = 52, /* SVGA3dVertexMaterial */
477 SVGA3D_RS_TEXTUREFACTOR = 53, /* SVGA3dColor */
478 SVGA3D_RS_LOCALVIEWER = 54, /* SVGA3dBool */
479 SVGA3D_RS_SCISSORTESTENABLE = 55, /* SVGA3dBool */
480 SVGA3D_RS_BLENDCOLOR = 56, /* SVGA3dColor */
481 SVGA3D_RS_STENCILENABLE2SIDED = 57, /* SVGA3dBool */
482 SVGA3D_RS_CCWSTENCILFUNC = 58, /* SVGA3dCmpFunc */
483 SVGA3D_RS_CCWSTENCILFAIL = 59, /* SVGA3dStencilOp */
484 SVGA3D_RS_CCWSTENCILZFAIL = 60, /* SVGA3dStencilOp */
485 SVGA3D_RS_CCWSTENCILPASS = 61, /* SVGA3dStencilOp */
486 SVGA3D_RS_VERTEXBLEND = 62, /* SVGA3dVertexBlendFlags */
487 SVGA3D_RS_SLOPESCALEDEPTHBIAS = 63, /* float */
488 SVGA3D_RS_DEPTHBIAS = 64, /* float */
494 * Output gamma effects the gamma curve of colors that are output from the
495 * rendering pipeline. A value of 1.0 specifies a linear color space. If the
496 * value is <= 0.0, gamma correction is ignored and linear color space is
500 SVGA3D_RS_OUTPUTGAMMA = 65, /* float */
501 SVGA3D_RS_ZVISIBLE = 66, /* SVGA3dBool */
502 SVGA3D_RS_LASTPIXEL = 67, /* SVGA3dBool */
503 SVGA3D_RS_CLIPPING = 68, /* SVGA3dBool */
504 SVGA3D_RS_WRAP0 = 69, /* SVGA3dWrapFlags */
505 SVGA3D_RS_WRAP1 = 70, /* SVGA3dWrapFlags */
506 SVGA3D_RS_WRAP2 = 71, /* SVGA3dWrapFlags */
507 SVGA3D_RS_WRAP3 = 72, /* SVGA3dWrapFlags */
508 SVGA3D_RS_WRAP4 = 73, /* SVGA3dWrapFlags */
509 SVGA3D_RS_WRAP5 = 74, /* SVGA3dWrapFlags */
510 SVGA3D_RS_WRAP6 = 75, /* SVGA3dWrapFlags */
511 SVGA3D_RS_WRAP7 = 76, /* SVGA3dWrapFlags */
512 SVGA3D_RS_WRAP8 = 77, /* SVGA3dWrapFlags */
513 SVGA3D_RS_WRAP9 = 78, /* SVGA3dWrapFlags */
514 SVGA3D_RS_WRAP10 = 79, /* SVGA3dWrapFlags */
515 SVGA3D_RS_WRAP11 = 80, /* SVGA3dWrapFlags */
516 SVGA3D_RS_WRAP12 = 81, /* SVGA3dWrapFlags */
517 SVGA3D_RS_WRAP13 = 82, /* SVGA3dWrapFlags */
518 SVGA3D_RS_WRAP14 = 83, /* SVGA3dWrapFlags */
519 SVGA3D_RS_WRAP15 = 84, /* SVGA3dWrapFlags */
520 SVGA3D_RS_MULTISAMPLEANTIALIAS = 85, /* SVGA3dBool */
521 SVGA3D_RS_MULTISAMPLEMASK = 86, /* uint32 */
522 SVGA3D_RS_INDEXEDVERTEXBLENDENABLE = 87, /* SVGA3dBool */
523 SVGA3D_RS_TWEENFACTOR = 88, /* float */
524 SVGA3D_RS_ANTIALIASEDLINEENABLE = 89, /* SVGA3dBool */
525 SVGA3D_RS_COLORWRITEENABLE1 = 90, /* SVGA3dColorMask */
526 SVGA3D_RS_COLORWRITEENABLE2 = 91, /* SVGA3dColorMask */
527 SVGA3D_RS_COLORWRITEENABLE3 = 92, /* SVGA3dColorMask */
528 SVGA3D_RS_SEPARATEALPHABLENDENABLE = 93, /* SVGA3dBool */
529 SVGA3D_RS_SRCBLENDALPHA = 94, /* SVGA3dBlendOp */
530 SVGA3D_RS_DSTBLENDALPHA = 95, /* SVGA3dBlendOp */
531 SVGA3D_RS_BLENDEQUATIONALPHA = 96, /* SVGA3dBlendEquation */
532 SVGA3D_RS_TRANSPARENCYANTIALIAS = 97, /* SVGA3dTransparencyAntialiasType */
533 SVGA3D_RS_LINEAA = 98, /* SVGA3dBool */
534 SVGA3D_RS_LINEWIDTH = 99, /* float */
536 } SVGA3dRenderStateName;
539 SVGA3D_TRANSPARENCYANTIALIAS_NORMAL = 0,
540 SVGA3D_TRANSPARENCYANTIALIAS_ALPHATOCOVERAGE = 1,
541 SVGA3D_TRANSPARENCYANTIALIAS_SUPERSAMPLE = 2,
542 SVGA3D_TRANSPARENCYANTIALIAS_MAX
543 } SVGA3dTransparencyAntialiasType;
546 SVGA3D_VERTEXMATERIAL_NONE = 0, /* Use the value in the current material */
547 SVGA3D_VERTEXMATERIAL_DIFFUSE = 1, /* Use the value in the diffuse component */
548 SVGA3D_VERTEXMATERIAL_SPECULAR = 2, /* Use the value in the specular component */
549 } SVGA3dVertexMaterial;
552 SVGA3D_FILLMODE_INVALID = 0,
553 SVGA3D_FILLMODE_POINT = 1,
554 SVGA3D_FILLMODE_LINE = 2,
555 SVGA3D_FILLMODE_FILL = 3,
557 } SVGA3dFillModeType;
563 uint16 mode; /* SVGA3dFillModeType */
564 uint16 face; /* SVGA3dFace */
570 SVGA3D_SHADEMODE_INVALID = 0,
571 SVGA3D_SHADEMODE_FLAT = 1,
572 SVGA3D_SHADEMODE_SMOOTH = 2,
573 SVGA3D_SHADEMODE_PHONG = 3, /* Not supported */
587 SVGA3D_BLENDOP_INVALID = 0,
588 SVGA3D_BLENDOP_ZERO = 1,
589 SVGA3D_BLENDOP_ONE = 2,
590 SVGA3D_BLENDOP_SRCCOLOR = 3,
591 SVGA3D_BLENDOP_INVSRCCOLOR = 4,
592 SVGA3D_BLENDOP_SRCALPHA = 5,
593 SVGA3D_BLENDOP_INVSRCALPHA = 6,
594 SVGA3D_BLENDOP_DESTALPHA = 7,
595 SVGA3D_BLENDOP_INVDESTALPHA = 8,
596 SVGA3D_BLENDOP_DESTCOLOR = 9,
597 SVGA3D_BLENDOP_INVDESTCOLOR = 10,
598 SVGA3D_BLENDOP_SRCALPHASAT = 11,
599 SVGA3D_BLENDOP_BLENDFACTOR = 12,
600 SVGA3D_BLENDOP_INVBLENDFACTOR = 13,
605 SVGA3D_BLENDEQ_INVALID = 0,
606 SVGA3D_BLENDEQ_ADD = 1,
607 SVGA3D_BLENDEQ_SUBTRACT = 2,
608 SVGA3D_BLENDEQ_REVSUBTRACT = 3,
609 SVGA3D_BLENDEQ_MINIMUM = 4,
610 SVGA3D_BLENDEQ_MAXIMUM = 5,
612 } SVGA3dBlendEquation;
615 SVGA3D_FRONTWINDING_INVALID = 0,
616 SVGA3D_FRONTWINDING_CW = 1,
617 SVGA3D_FRONTWINDING_CCW = 2,
618 SVGA3D_FRONTWINDING_MAX
619 } SVGA3dFrontWinding;
622 SVGA3D_FACE_INVALID = 0,
623 SVGA3D_FACE_NONE = 1,
624 SVGA3D_FACE_FRONT = 2,
625 SVGA3D_FACE_BACK = 3,
626 SVGA3D_FACE_FRONT_BACK = 4,
631 * The order and the values should not be changed
635 SVGA3D_CMP_INVALID = 0,
636 SVGA3D_CMP_NEVER = 1,
638 SVGA3D_CMP_EQUAL = 3,
639 SVGA3D_CMP_LESSEQUAL = 4,
640 SVGA3D_CMP_GREATER = 5,
641 SVGA3D_CMP_NOTEQUAL = 6,
642 SVGA3D_CMP_GREATEREQUAL = 7,
643 SVGA3D_CMP_ALWAYS = 8,
648 * SVGA3D_FOGFUNC_* specifies the fog equation, or PER_VERTEX which allows
649 * the fog factor to be specified in the alpha component of the specular
650 * (a.k.a. secondary) vertex color.
653 SVGA3D_FOGFUNC_INVALID = 0,
654 SVGA3D_FOGFUNC_EXP = 1,
655 SVGA3D_FOGFUNC_EXP2 = 2,
656 SVGA3D_FOGFUNC_LINEAR = 3,
657 SVGA3D_FOGFUNC_PER_VERTEX = 4
661 * SVGA3D_FOGTYPE_* specifies if fog factors are computed on a per-vertex
662 * or per-pixel basis.
665 SVGA3D_FOGTYPE_INVALID = 0,
666 SVGA3D_FOGTYPE_VERTEX = 1,
667 SVGA3D_FOGTYPE_PIXEL = 2,
668 SVGA3D_FOGTYPE_MAX = 3
672 * SVGA3D_FOGBASE_* selects depth or range-based fog. Depth-based fog is
673 * computed using the eye Z value of each pixel (or vertex), whereas range-
674 * based fog is computed using the actual distance (range) to the eye.
677 SVGA3D_FOGBASE_INVALID = 0,
678 SVGA3D_FOGBASE_DEPTHBASED = 1,
679 SVGA3D_FOGBASE_RANGEBASED = 2,
680 SVGA3D_FOGBASE_MAX = 3
684 SVGA3D_STENCILOP_INVALID = 0,
685 SVGA3D_STENCILOP_KEEP = 1,
686 SVGA3D_STENCILOP_ZERO = 2,
687 SVGA3D_STENCILOP_REPLACE = 3,
688 SVGA3D_STENCILOP_INCRSAT = 4,
689 SVGA3D_STENCILOP_DECRSAT = 5,
690 SVGA3D_STENCILOP_INVERT = 6,
691 SVGA3D_STENCILOP_INCR = 7,
692 SVGA3D_STENCILOP_DECR = 8,
697 SVGA3D_CLIPPLANE_0 = (1 << 0),
698 SVGA3D_CLIPPLANE_1 = (1 << 1),
699 SVGA3D_CLIPPLANE_2 = (1 << 2),
700 SVGA3D_CLIPPLANE_3 = (1 << 3),
701 SVGA3D_CLIPPLANE_4 = (1 << 4),
702 SVGA3D_CLIPPLANE_5 = (1 << 5),
706 SVGA3D_CLEAR_COLOR = 0x1,
707 SVGA3D_CLEAR_DEPTH = 0x2,
708 SVGA3D_CLEAR_STENCIL = 0x4
713 SVGA3D_RT_STENCIL = 1,
714 SVGA3D_RT_COLOR0 = 2,
715 SVGA3D_RT_COLOR1 = 3,
716 SVGA3D_RT_COLOR2 = 4,
717 SVGA3D_RT_COLOR3 = 5,
718 SVGA3D_RT_COLOR4 = 6,
719 SVGA3D_RT_COLOR5 = 7,
720 SVGA3D_RT_COLOR6 = 8,
721 SVGA3D_RT_COLOR7 = 9,
723 SVGA3D_RT_INVALID = ((uint32)-1),
724 } SVGA3dRenderTargetType;
726 #define SVGA3D_MAX_RT_COLOR (SVGA3D_RT_COLOR7 - SVGA3D_RT_COLOR0 + 1)
740 SVGA3D_VBLEND_DISABLE = 0,
741 SVGA3D_VBLEND_1WEIGHT = 1,
742 SVGA3D_VBLEND_2WEIGHT = 2,
743 SVGA3D_VBLEND_3WEIGHT = 3,
744 } SVGA3dVertexBlendFlags;
747 SVGA3D_WRAPCOORD_0 = 1 << 0,
748 SVGA3D_WRAPCOORD_1 = 1 << 1,
749 SVGA3D_WRAPCOORD_2 = 1 << 2,
750 SVGA3D_WRAPCOORD_3 = 1 << 3,
751 SVGA3D_WRAPCOORD_ALL = 0xF,
755 * SVGA_3D_CMD_TEXTURESTATE Types. All value types
756 * must fit in a uint32.
760 SVGA3D_TS_INVALID = 0,
761 SVGA3D_TS_BIND_TEXTURE = 1, /* SVGA3dSurfaceId */
762 SVGA3D_TS_COLOROP = 2, /* SVGA3dTextureCombiner */
763 SVGA3D_TS_COLORARG1 = 3, /* SVGA3dTextureArgData */
764 SVGA3D_TS_COLORARG2 = 4, /* SVGA3dTextureArgData */
765 SVGA3D_TS_ALPHAOP = 5, /* SVGA3dTextureCombiner */
766 SVGA3D_TS_ALPHAARG1 = 6, /* SVGA3dTextureArgData */
767 SVGA3D_TS_ALPHAARG2 = 7, /* SVGA3dTextureArgData */
768 SVGA3D_TS_ADDRESSU = 8, /* SVGA3dTextureAddress */
769 SVGA3D_TS_ADDRESSV = 9, /* SVGA3dTextureAddress */
770 SVGA3D_TS_MIPFILTER = 10, /* SVGA3dTextureFilter */
771 SVGA3D_TS_MAGFILTER = 11, /* SVGA3dTextureFilter */
772 SVGA3D_TS_MINFILTER = 12, /* SVGA3dTextureFilter */
773 SVGA3D_TS_BORDERCOLOR = 13, /* SVGA3dColor */
774 SVGA3D_TS_TEXCOORDINDEX = 14, /* uint32 */
775 SVGA3D_TS_TEXTURETRANSFORMFLAGS = 15, /* SVGA3dTexTransformFlags */
776 SVGA3D_TS_TEXCOORDGEN = 16, /* SVGA3dTextureCoordGen */
777 SVGA3D_TS_BUMPENVMAT00 = 17, /* float */
778 SVGA3D_TS_BUMPENVMAT01 = 18, /* float */
779 SVGA3D_TS_BUMPENVMAT10 = 19, /* float */
780 SVGA3D_TS_BUMPENVMAT11 = 20, /* float */
781 SVGA3D_TS_TEXTURE_MIPMAP_LEVEL = 21, /* uint32 */
782 SVGA3D_TS_TEXTURE_LOD_BIAS = 22, /* float */
783 SVGA3D_TS_TEXTURE_ANISOTROPIC_LEVEL = 23, /* uint32 */
784 SVGA3D_TS_ADDRESSW = 24, /* SVGA3dTextureAddress */
788 * Sampler Gamma Level
790 * Sampler gamma effects the color of samples taken from the sampler. A
791 * value of 1.0 will produce linear samples. If the value is <= 0.0 the
792 * gamma value is ignored and a linear space is used.
795 SVGA3D_TS_GAMMA = 25, /* float */
796 SVGA3D_TS_BUMPENVLSCALE = 26, /* float */
797 SVGA3D_TS_BUMPENVLOFFSET = 27, /* float */
798 SVGA3D_TS_COLORARG0 = 28, /* SVGA3dTextureArgData */
799 SVGA3D_TS_ALPHAARG0 = 29, /* SVGA3dTextureArgData */
801 } SVGA3dTextureStateName;
804 SVGA3D_TC_INVALID = 0,
805 SVGA3D_TC_DISABLE = 1,
806 SVGA3D_TC_SELECTARG1 = 2,
807 SVGA3D_TC_SELECTARG2 = 3,
808 SVGA3D_TC_MODULATE = 4,
810 SVGA3D_TC_ADDSIGNED = 6,
811 SVGA3D_TC_SUBTRACT = 7,
812 SVGA3D_TC_BLENDTEXTUREALPHA = 8,
813 SVGA3D_TC_BLENDDIFFUSEALPHA = 9,
814 SVGA3D_TC_BLENDCURRENTALPHA = 10,
815 SVGA3D_TC_BLENDFACTORALPHA = 11,
816 SVGA3D_TC_MODULATE2X = 12,
817 SVGA3D_TC_MODULATE4X = 13,
819 SVGA3D_TC_DOTPRODUCT3 = 15,
820 SVGA3D_TC_BLENDTEXTUREALPHAPM = 16,
821 SVGA3D_TC_ADDSIGNED2X = 17,
822 SVGA3D_TC_ADDSMOOTH = 18,
823 SVGA3D_TC_PREMODULATE = 19,
824 SVGA3D_TC_MODULATEALPHA_ADDCOLOR = 20,
825 SVGA3D_TC_MODULATECOLOR_ADDALPHA = 21,
826 SVGA3D_TC_MODULATEINVALPHA_ADDCOLOR = 22,
827 SVGA3D_TC_MODULATEINVCOLOR_ADDALPHA = 23,
828 SVGA3D_TC_BUMPENVMAPLUMINANCE = 24,
829 SVGA3D_TC_MULTIPLYADD = 25,
832 } SVGA3dTextureCombiner;
834 #define SVGA3D_TC_CAP_BIT(svga3d_tc_op) (svga3d_tc_op ? (1 << (svga3d_tc_op - 1)) : 0)
837 SVGA3D_TEX_ADDRESS_INVALID = 0,
838 SVGA3D_TEX_ADDRESS_WRAP = 1,
839 SVGA3D_TEX_ADDRESS_MIRROR = 2,
840 SVGA3D_TEX_ADDRESS_CLAMP = 3,
841 SVGA3D_TEX_ADDRESS_BORDER = 4,
842 SVGA3D_TEX_ADDRESS_MIRRORONCE = 5,
843 SVGA3D_TEX_ADDRESS_EDGE = 6,
844 SVGA3D_TEX_ADDRESS_MAX
845 } SVGA3dTextureAddress;
848 * SVGA3D_TEX_FILTER_NONE as the minification filter means mipmapping is
849 * disabled, and the rasterizer should use the magnification filter instead.
852 SVGA3D_TEX_FILTER_NONE = 0,
853 SVGA3D_TEX_FILTER_NEAREST = 1,
854 SVGA3D_TEX_FILTER_LINEAR = 2,
855 SVGA3D_TEX_FILTER_ANISOTROPIC = 3,
856 SVGA3D_TEX_FILTER_FLATCUBIC = 4, /* Deprecated, not implemented */
857 SVGA3D_TEX_FILTER_GAUSSIANCUBIC = 5, /* Deprecated, not implemented */
858 SVGA3D_TEX_FILTER_PYRAMIDALQUAD = 6, /* Not currently implemented */
859 SVGA3D_TEX_FILTER_GAUSSIANQUAD = 7, /* Not currently implemented */
860 SVGA3D_TEX_FILTER_MAX
861 } SVGA3dTextureFilter;
864 SVGA3D_TEX_TRANSFORM_OFF = 0,
865 SVGA3D_TEX_TRANSFORM_S = (1 << 0),
866 SVGA3D_TEX_TRANSFORM_T = (1 << 1),
867 SVGA3D_TEX_TRANSFORM_R = (1 << 2),
868 SVGA3D_TEX_TRANSFORM_Q = (1 << 3),
869 SVGA3D_TEX_PROJECTED = (1 << 15),
870 } SVGA3dTexTransformFlags;
873 SVGA3D_TEXCOORD_GEN_OFF = 0,
874 SVGA3D_TEXCOORD_GEN_EYE_POSITION = 1,
875 SVGA3D_TEXCOORD_GEN_EYE_NORMAL = 2,
876 SVGA3D_TEXCOORD_GEN_REFLECTIONVECTOR = 3,
877 SVGA3D_TEXCOORD_GEN_SPHERE = 4,
878 SVGA3D_TEXCOORD_GEN_MAX
879 } SVGA3dTextureCoordGen;
882 * Texture argument constants for texture combiner
885 SVGA3D_TA_INVALID = 0,
886 SVGA3D_TA_CONSTANT = 1,
887 SVGA3D_TA_PREVIOUS = 2,
888 SVGA3D_TA_DIFFUSE = 3,
889 SVGA3D_TA_TEXTURE = 4,
890 SVGA3D_TA_SPECULAR = 5,
892 } SVGA3dTextureArgData;
894 #define SVGA3D_TM_MASK_LEN 4
896 /* Modifiers for texture argument constants defined above. */
899 SVGA3D_TM_ALPHA = (1 << SVGA3D_TM_MASK_LEN),
900 SVGA3D_TM_ONE_MINUS = (2 << SVGA3D_TM_MASK_LEN),
901 } SVGA3dTextureArgModifier;
903 #define SVGA3D_INVALID_ID ((uint32)-1)
904 #define SVGA3D_MAX_CLIP_PLANES 6
907 * This is the limit to the number of fixed-function texture
908 * transforms and texture coordinates we can support. It does *not*
909 * correspond to the number of texture image units (samplers) we
912 #define SVGA3D_MAX_TEXTURE_COORDS 8
915 * Vertex declarations
919 * SVGA3D_DECLUSAGE_POSITIONT is for pre-transformed vertices. If you
920 * draw with any POSITIONT vertex arrays, the programmable vertex
921 * pipeline will be implicitly disabled. Drawing will take place as if
922 * no vertex shader was bound.
926 SVGA3D_DECLUSAGE_POSITION = 0,
927 SVGA3D_DECLUSAGE_BLENDWEIGHT, /* 1 */
928 SVGA3D_DECLUSAGE_BLENDINDICES, /* 2 */
929 SVGA3D_DECLUSAGE_NORMAL, /* 3 */
930 SVGA3D_DECLUSAGE_PSIZE, /* 4 */
931 SVGA3D_DECLUSAGE_TEXCOORD, /* 5 */
932 SVGA3D_DECLUSAGE_TANGENT, /* 6 */
933 SVGA3D_DECLUSAGE_BINORMAL, /* 7 */
934 SVGA3D_DECLUSAGE_TESSFACTOR, /* 8 */
935 SVGA3D_DECLUSAGE_POSITIONT, /* 9 */
936 SVGA3D_DECLUSAGE_COLOR, /* 10 */
937 SVGA3D_DECLUSAGE_FOG, /* 11 */
938 SVGA3D_DECLUSAGE_DEPTH, /* 12 */
939 SVGA3D_DECLUSAGE_SAMPLE, /* 13 */
944 SVGA3D_DECLMETHOD_DEFAULT = 0,
945 SVGA3D_DECLMETHOD_PARTIALU,
946 SVGA3D_DECLMETHOD_PARTIALV,
947 SVGA3D_DECLMETHOD_CROSSUV, /* Normal */
948 SVGA3D_DECLMETHOD_UV,
949 SVGA3D_DECLMETHOD_LOOKUP, /* Lookup a displacement map */
950 SVGA3D_DECLMETHOD_LOOKUPPRESAMPLED, /* Lookup a pre-sampled displacement map */
954 SVGA3D_DECLTYPE_FLOAT1 = 0,
955 SVGA3D_DECLTYPE_FLOAT2 = 1,
956 SVGA3D_DECLTYPE_FLOAT3 = 2,
957 SVGA3D_DECLTYPE_FLOAT4 = 3,
958 SVGA3D_DECLTYPE_D3DCOLOR = 4,
959 SVGA3D_DECLTYPE_UBYTE4 = 5,
960 SVGA3D_DECLTYPE_SHORT2 = 6,
961 SVGA3D_DECLTYPE_SHORT4 = 7,
962 SVGA3D_DECLTYPE_UBYTE4N = 8,
963 SVGA3D_DECLTYPE_SHORT2N = 9,
964 SVGA3D_DECLTYPE_SHORT4N = 10,
965 SVGA3D_DECLTYPE_USHORT2N = 11,
966 SVGA3D_DECLTYPE_USHORT4N = 12,
967 SVGA3D_DECLTYPE_UDEC3 = 13,
968 SVGA3D_DECLTYPE_DEC3N = 14,
969 SVGA3D_DECLTYPE_FLOAT16_2 = 15,
970 SVGA3D_DECLTYPE_FLOAT16_4 = 16,
975 * This structure is used for the divisor for geometry instancing;
976 * it's a direct translation of the Direct3D equivalent.
981 * For index data, this number represents the number of instances to draw.
982 * For instance data, this number represents the number of
983 * instances/vertex in this stream
988 * This is 1 if this is supposed to be the data that is repeated for
991 uint32 indexedData : 1;
994 * This is 1 if this is supposed to be the per-instance data.
996 uint32 instanceData : 1;
1000 } SVGA3dVertexDivisor;
1003 SVGA3D_PRIMITIVE_INVALID = 0,
1004 SVGA3D_PRIMITIVE_TRIANGLELIST = 1,
1005 SVGA3D_PRIMITIVE_POINTLIST = 2,
1006 SVGA3D_PRIMITIVE_LINELIST = 3,
1007 SVGA3D_PRIMITIVE_LINESTRIP = 4,
1008 SVGA3D_PRIMITIVE_TRIANGLESTRIP = 5,
1009 SVGA3D_PRIMITIVE_TRIANGLEFAN = 6,
1010 SVGA3D_PRIMITIVE_MAX
1011 } SVGA3dPrimitiveType;
1014 SVGA3D_COORDINATE_INVALID = 0,
1015 SVGA3D_COORDINATE_LEFTHANDED = 1,
1016 SVGA3D_COORDINATE_RIGHTHANDED = 2,
1017 SVGA3D_COORDINATE_MAX
1018 } SVGA3dCoordinateType;
1021 SVGA3D_TRANSFORM_INVALID = 0,
1022 SVGA3D_TRANSFORM_WORLD = 1,
1023 SVGA3D_TRANSFORM_VIEW = 2,
1024 SVGA3D_TRANSFORM_PROJECTION = 3,
1025 SVGA3D_TRANSFORM_TEXTURE0 = 4,
1026 SVGA3D_TRANSFORM_TEXTURE1 = 5,
1027 SVGA3D_TRANSFORM_TEXTURE2 = 6,
1028 SVGA3D_TRANSFORM_TEXTURE3 = 7,
1029 SVGA3D_TRANSFORM_TEXTURE4 = 8,
1030 SVGA3D_TRANSFORM_TEXTURE5 = 9,
1031 SVGA3D_TRANSFORM_TEXTURE6 = 10,
1032 SVGA3D_TRANSFORM_TEXTURE7 = 11,
1033 SVGA3D_TRANSFORM_WORLD1 = 12,
1034 SVGA3D_TRANSFORM_WORLD2 = 13,
1035 SVGA3D_TRANSFORM_WORLD3 = 14,
1036 SVGA3D_TRANSFORM_MAX
1037 } SVGA3dTransformType;
1040 SVGA3D_LIGHTTYPE_INVALID = 0,
1041 SVGA3D_LIGHTTYPE_POINT = 1,
1042 SVGA3D_LIGHTTYPE_SPOT1 = 2, /* 1-cone, in degrees */
1043 SVGA3D_LIGHTTYPE_SPOT2 = 3, /* 2-cone, in radians */
1044 SVGA3D_LIGHTTYPE_DIRECTIONAL = 4,
1045 SVGA3D_LIGHTTYPE_MAX
1049 SVGA3D_CUBEFACE_POSX = 0,
1050 SVGA3D_CUBEFACE_NEGX = 1,
1051 SVGA3D_CUBEFACE_POSY = 2,
1052 SVGA3D_CUBEFACE_NEGY = 3,
1053 SVGA3D_CUBEFACE_POSZ = 4,
1054 SVGA3D_CUBEFACE_NEGZ = 5,
1058 SVGA3D_SHADERTYPE_INVALID = 0,
1059 SVGA3D_SHADERTYPE_MIN = 1,
1060 SVGA3D_SHADERTYPE_VS = 1,
1061 SVGA3D_SHADERTYPE_PS = 2,
1062 SVGA3D_SHADERTYPE_MAX = 3,
1063 SVGA3D_SHADERTYPE_GS = 3,
1066 #define SVGA3D_NUM_SHADERTYPE (SVGA3D_SHADERTYPE_MAX - SVGA3D_SHADERTYPE_MIN)
1069 SVGA3D_CONST_TYPE_FLOAT = 0,
1070 SVGA3D_CONST_TYPE_INT = 1,
1071 SVGA3D_CONST_TYPE_BOOL = 2,
1072 SVGA3D_CONST_TYPE_MAX
1073 } SVGA3dShaderConstType;
1075 #define SVGA3D_MAX_SURFACE_FACES 6
1078 SVGA3D_STRETCH_BLT_POINT = 0,
1079 SVGA3D_STRETCH_BLT_LINEAR = 1,
1080 SVGA3D_STRETCH_BLT_MAX
1081 } SVGA3dStretchBltMode;
1084 SVGA3D_QUERYTYPE_OCCLUSION = 0,
1085 SVGA3D_QUERYTYPE_MAX
1089 SVGA3D_QUERYSTATE_PENDING = 0, /* Waiting on the host (set by guest) */
1090 SVGA3D_QUERYSTATE_SUCCEEDED = 1, /* Completed successfully (set by host) */
1091 SVGA3D_QUERYSTATE_FAILED = 2, /* Completed unsuccessfully (set by host) */
1092 SVGA3D_QUERYSTATE_NEW = 3, /* Never submitted (For guest use only) */
1096 SVGA3D_WRITE_HOST_VRAM = 1,
1097 SVGA3D_READ_HOST_VRAM = 2,
1098 } SVGA3dTransferType;
1101 * The maximum number of vertex arrays we're guaranteed to support in
1102 * SVGA_3D_CMD_DRAWPRIMITIVES.
1104 #define SVGA3D_MAX_VERTEX_ARRAYS 32
1107 * The maximum number of primitive ranges we're guaranteed to support
1108 * in SVGA_3D_CMD_DRAWPRIMITIVES.
1110 #define SVGA3D_MAX_DRAW_PRIMITIVE_RANGES 32
1113 * Identifiers for commands in the command FIFO.
1115 * IDs between 1000 and 1039 (inclusive) were used by obsolete versions of
1116 * the SVGA3D protocol and remain reserved; they should not be used in the
1119 * IDs between 1040 and 1999 (inclusive) are available for use by the
1120 * current SVGA3D protocol.
1122 * FIFO clients other than SVGA3D should stay below 1000, or at 2000
1126 #define SVGA_3D_CMD_LEGACY_BASE 1000
1127 #define SVGA_3D_CMD_BASE 1040
1129 #define SVGA_3D_CMD_SURFACE_DEFINE SVGA_3D_CMD_BASE + 0 /* Deprecated */
1130 #define SVGA_3D_CMD_SURFACE_DESTROY SVGA_3D_CMD_BASE + 1
1131 #define SVGA_3D_CMD_SURFACE_COPY SVGA_3D_CMD_BASE + 2
1132 #define SVGA_3D_CMD_SURFACE_STRETCHBLT SVGA_3D_CMD_BASE + 3
1133 #define SVGA_3D_CMD_SURFACE_DMA SVGA_3D_CMD_BASE + 4
1134 #define SVGA_3D_CMD_CONTEXT_DEFINE SVGA_3D_CMD_BASE + 5
1135 #define SVGA_3D_CMD_CONTEXT_DESTROY SVGA_3D_CMD_BASE + 6
1136 #define SVGA_3D_CMD_SETTRANSFORM SVGA_3D_CMD_BASE + 7
1137 #define SVGA_3D_CMD_SETZRANGE SVGA_3D_CMD_BASE + 8
1138 #define SVGA_3D_CMD_SETRENDERSTATE SVGA_3D_CMD_BASE + 9
1139 #define SVGA_3D_CMD_SETRENDERTARGET SVGA_3D_CMD_BASE + 10
1140 #define SVGA_3D_CMD_SETTEXTURESTATE SVGA_3D_CMD_BASE + 11
1141 #define SVGA_3D_CMD_SETMATERIAL SVGA_3D_CMD_BASE + 12
1142 #define SVGA_3D_CMD_SETLIGHTDATA SVGA_3D_CMD_BASE + 13
1143 #define SVGA_3D_CMD_SETLIGHTENABLED SVGA_3D_CMD_BASE + 14
1144 #define SVGA_3D_CMD_SETVIEWPORT SVGA_3D_CMD_BASE + 15
1145 #define SVGA_3D_CMD_SETCLIPPLANE SVGA_3D_CMD_BASE + 16
1146 #define SVGA_3D_CMD_CLEAR SVGA_3D_CMD_BASE + 17
1147 #define SVGA_3D_CMD_PRESENT SVGA_3D_CMD_BASE + 18 /* Deprecated */
1148 #define SVGA_3D_CMD_SHADER_DEFINE SVGA_3D_CMD_BASE + 19
1149 #define SVGA_3D_CMD_SHADER_DESTROY SVGA_3D_CMD_BASE + 20
1150 #define SVGA_3D_CMD_SET_SHADER SVGA_3D_CMD_BASE + 21
1151 #define SVGA_3D_CMD_SET_SHADER_CONST SVGA_3D_CMD_BASE + 22
1152 #define SVGA_3D_CMD_DRAW_PRIMITIVES SVGA_3D_CMD_BASE + 23
1153 #define SVGA_3D_CMD_SETSCISSORRECT SVGA_3D_CMD_BASE + 24
1154 #define SVGA_3D_CMD_BEGIN_QUERY SVGA_3D_CMD_BASE + 25
1155 #define SVGA_3D_CMD_END_QUERY SVGA_3D_CMD_BASE + 26
1156 #define SVGA_3D_CMD_WAIT_FOR_QUERY SVGA_3D_CMD_BASE + 27
1157 #define SVGA_3D_CMD_PRESENT_READBACK SVGA_3D_CMD_BASE + 28 /* Deprecated */
1158 #define SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN SVGA_3D_CMD_BASE + 29
1159 #define SVGA_3D_CMD_SURFACE_DEFINE_V2 SVGA_3D_CMD_BASE + 30
1160 #define SVGA_3D_CMD_GENERATE_MIPMAPS SVGA_3D_CMD_BASE + 31
1161 #define SVGA_3D_CMD_ACTIVATE_SURFACE SVGA_3D_CMD_BASE + 40
1162 #define SVGA_3D_CMD_DEACTIVATE_SURFACE SVGA_3D_CMD_BASE + 41
1163 #define SVGA_3D_CMD_SCREEN_DMA 1082
1164 #define SVGA_3D_CMD_SET_UNITY_SURFACE_COOKIE 1083
1165 #define SVGA_3D_CMD_OPEN_CONTEXT_SURFACE 1084
1167 #define SVGA_3D_CMD_LOGICOPS_BITBLT 1085
1168 #define SVGA_3D_CMD_LOGICOPS_TRANSBLT 1086
1169 #define SVGA_3D_CMD_LOGICOPS_STRETCHBLT 1087
1170 #define SVGA_3D_CMD_LOGICOPS_COLORFILL 1088
1171 #define SVGA_3D_CMD_LOGICOPS_ALPHABLEND 1089
1172 #define SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND 1090
1174 #define SVGA_3D_CMD_SET_OTABLE_BASE 1091
1175 #define SVGA_3D_CMD_READBACK_OTABLE 1092
1177 #define SVGA_3D_CMD_DEFINE_GB_MOB 1093
1178 #define SVGA_3D_CMD_DESTROY_GB_MOB 1094
1179 #define SVGA_3D_CMD_REDEFINE_GB_MOB 1095
1180 #define SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING 1096
1182 #define SVGA_3D_CMD_DEFINE_GB_SURFACE 1097
1183 #define SVGA_3D_CMD_DESTROY_GB_SURFACE 1098
1184 #define SVGA_3D_CMD_BIND_GB_SURFACE 1099
1185 #define SVGA_3D_CMD_COND_BIND_GB_SURFACE 1100
1186 #define SVGA_3D_CMD_UPDATE_GB_IMAGE 1101
1187 #define SVGA_3D_CMD_UPDATE_GB_SURFACE 1102
1188 #define SVGA_3D_CMD_READBACK_GB_IMAGE 1103
1189 #define SVGA_3D_CMD_READBACK_GB_SURFACE 1104
1190 #define SVGA_3D_CMD_INVALIDATE_GB_IMAGE 1105
1191 #define SVGA_3D_CMD_INVALIDATE_GB_SURFACE 1106
1193 #define SVGA_3D_CMD_DEFINE_GB_CONTEXT 1107
1194 #define SVGA_3D_CMD_DESTROY_GB_CONTEXT 1108
1195 #define SVGA_3D_CMD_BIND_GB_CONTEXT 1109
1196 #define SVGA_3D_CMD_READBACK_GB_CONTEXT 1110
1197 #define SVGA_3D_CMD_INVALIDATE_GB_CONTEXT 1111
1199 #define SVGA_3D_CMD_DEFINE_GB_SHADER 1112
1200 #define SVGA_3D_CMD_DESTROY_GB_SHADER 1113
1201 #define SVGA_3D_CMD_BIND_GB_SHADER 1114
1203 #define SVGA_3D_CMD_BIND_SHADERCONSTS 1115
1205 #define SVGA_3D_CMD_BEGIN_GB_QUERY 1116
1206 #define SVGA_3D_CMD_END_GB_QUERY 1117
1207 #define SVGA_3D_CMD_WAIT_FOR_GB_QUERY 1118
1209 #define SVGA_3D_CMD_NOP 1119
1211 #define SVGA_3D_CMD_ENABLE_GART 1120
1212 #define SVGA_3D_CMD_DISABLE_GART 1121
1213 #define SVGA_3D_CMD_MAP_MOB_INTO_GART 1122
1214 #define SVGA_3D_CMD_UNMAP_GART_RANGE 1123
1216 #define SVGA_3D_CMD_DEFINE_GB_SCREENTARGET 1124
1217 #define SVGA_3D_CMD_DESTROY_GB_SCREENTARGET 1125
1218 #define SVGA_3D_CMD_BIND_GB_SCREENTARGET 1126
1219 #define SVGA_3D_CMD_UPDATE_GB_SCREENTARGET 1127
1221 #define SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL 1128
1222 #define SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL 1129
1224 #define SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE 1130
1226 #define SVGA_3D_CMD_MAX 1131
1227 #define SVGA_3D_CMD_FUTURE_MAX 3000
1230 * Common substructures used in multiple FIFO commands:
1236 uint16 function; /* SVGA3dFogFunction */
1237 uint8 type; /* SVGA3dFogType */
1238 uint8 base; /* SVGA3dFogBase */
1245 * Uniquely identify one image (a 1D/2D/3D array) from a surface. This
1246 * is a surface ID as well as face/mipmap indices.
1250 struct SVGA3dSurfaceImageId {
1254 } SVGA3dSurfaceImageId;
1257 struct SVGA3dGuestImage {
1261 * A note on interpretation of pitch: This value of pitch is the
1262 * number of bytes between vertically adjacent image
1263 * blocks. Normally this is the number of bytes between the first
1264 * pixel of two adjacent scanlines. With compressed textures,
1265 * however, this may represent the number of bytes between
1266 * compression blocks rather than between rows of pixels.
1268 * XXX: Compressed textures currently must be tightly packed in guest memory.
1270 * If the image is 1-dimensional, pitch is ignored.
1272 * If 'pitch' is zero, the SVGA3D device calculates a pitch value
1273 * assuming each row of blocks is tightly packed.
1280 * FIFO command format definitions:
1284 * The data size header following cmdNum for every 3d command
1293 * A surface is a hierarchy of host VRAM surfaces: 1D, 2D, or 3D, with
1294 * optional mipmaps and cube faces.
1305 SVGA3D_SURFACE_CUBEMAP = (1 << 0),
1306 SVGA3D_SURFACE_HINT_STATIC = (1 << 1),
1307 SVGA3D_SURFACE_HINT_DYNAMIC = (1 << 2),
1308 SVGA3D_SURFACE_HINT_INDEXBUFFER = (1 << 3),
1309 SVGA3D_SURFACE_HINT_VERTEXBUFFER = (1 << 4),
1310 SVGA3D_SURFACE_HINT_TEXTURE = (1 << 5),
1311 SVGA3D_SURFACE_HINT_RENDERTARGET = (1 << 6),
1312 SVGA3D_SURFACE_HINT_DEPTHSTENCIL = (1 << 7),
1313 SVGA3D_SURFACE_HINT_WRITEONLY = (1 << 8),
1314 SVGA3D_SURFACE_MASKABLE_ANTIALIAS = (1 << 9),
1315 SVGA3D_SURFACE_AUTOGENMIPMAPS = (1 << 10),
1316 } SVGA3dSurfaceFlags;
1320 uint32 numMipLevels;
1321 } SVGA3dSurfaceFace;
1326 SVGA3dSurfaceFlags surfaceFlags;
1327 SVGA3dSurfaceFormat format;
1329 * If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace
1330 * structures must have the same value of numMipLevels field.
1331 * Otherwise, all but the first SVGA3dSurfaceFace structures must have the
1332 * numMipLevels set to 0.
1334 SVGA3dSurfaceFace face[SVGA3D_MAX_SURFACE_FACES];
1336 * Followed by an SVGA3dSize structure for each mip level in each face.
1338 * A note on surface sizes: Sizes are always specified in pixels,
1339 * even if the true surface size is not a multiple of the minimum
1340 * block size of the surface's format. For example, a 3x3x1 DXT1
1341 * compressed texture would actually be stored as a 4x4x1 image in
1344 } SVGA3dCmdDefineSurface; /* SVGA_3D_CMD_SURFACE_DEFINE */
1349 SVGA3dSurfaceFlags surfaceFlags;
1350 SVGA3dSurfaceFormat format;
1352 * If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace
1353 * structures must have the same value of numMipLevels field.
1354 * Otherwise, all but the first SVGA3dSurfaceFace structures must have the
1355 * numMipLevels set to 0.
1357 SVGA3dSurfaceFace face[SVGA3D_MAX_SURFACE_FACES];
1358 uint32 multisampleCount;
1359 SVGA3dTextureFilter autogenFilter;
1361 * Followed by an SVGA3dSize structure for each mip level in each face.
1363 * A note on surface sizes: Sizes are always specified in pixels,
1364 * even if the true surface size is not a multiple of the minimum
1365 * block size of the surface's format. For example, a 3x3x1 DXT1
1366 * compressed texture would actually be stored as a 4x4x1 image in
1369 } SVGA3dCmdDefineSurface_v2; /* SVGA_3D_CMD_SURFACE_DEFINE_V2 */
1374 } SVGA3dCmdDestroySurface; /* SVGA_3D_CMD_SURFACE_DESTROY */
1379 } SVGA3dCmdDefineContext; /* SVGA_3D_CMD_CONTEXT_DEFINE */
1384 } SVGA3dCmdDestroyContext; /* SVGA_3D_CMD_CONTEXT_DESTROY */
1389 SVGA3dClearFlag clearFlag;
1393 /* Followed by variable number of SVGA3dRect structures */
1394 } SVGA3dCmdClear; /* SVGA_3D_CMD_CLEAR */
1397 struct SVGA3dCopyRect {
1407 struct SVGA3dCopyBox {
1446 SVGA3dLightType type;
1447 SVGA3dBool inWorldSpace;
1465 /* Followed by variable number of SVGA3dCopyRect structures */
1466 } SVGA3dCmdPresent; /* SVGA_3D_CMD_PRESENT */
1470 SVGA3dRenderStateName state;
1475 } SVGA3dRenderState;
1480 /* Followed by variable number of SVGA3dRenderState structures */
1481 } SVGA3dCmdSetRenderState; /* SVGA_3D_CMD_SETRENDERSTATE */
1486 SVGA3dRenderTargetType type;
1487 SVGA3dSurfaceImageId target;
1488 } SVGA3dCmdSetRenderTarget; /* SVGA_3D_CMD_SETRENDERTARGET */
1492 SVGA3dSurfaceImageId src;
1493 SVGA3dSurfaceImageId dest;
1494 /* Followed by variable number of SVGA3dCopyBox structures */
1495 } SVGA3dCmdSurfaceCopy; /* SVGA_3D_CMD_SURFACE_COPY */
1499 SVGA3dSurfaceImageId src;
1500 SVGA3dSurfaceImageId dest;
1503 SVGA3dStretchBltMode mode;
1504 } SVGA3dCmdSurfaceStretchBlt; /* SVGA_3D_CMD_SURFACE_STRETCHBLT */
1509 * If the discard flag is present in a surface DMA operation, the host may
1510 * discard the contents of the current mipmap level and face of the target
1511 * surface before applying the surface DMA contents.
1516 * If the unsynchronized flag is present, the host may perform this upload
1517 * without syncing to pending reads on this surface.
1519 uint32 unsynchronized : 1;
1522 * Guests *MUST* set the reserved bits to 0 before submitting the command
1523 * suffix as future flags may occupy these bits.
1525 uint32 reserved : 30;
1526 } SVGA3dSurfaceDMAFlags;
1530 SVGA3dGuestImage guest;
1531 SVGA3dSurfaceImageId host;
1532 SVGA3dTransferType transfer;
1534 * Followed by variable number of SVGA3dCopyBox structures. For consistency
1535 * in all clipping logic and coordinate translation, we define the
1536 * "source" in each copyBox as the guest image and the
1537 * "destination" as the host image, regardless of transfer
1540 * For efficiency, the SVGA3D device is free to copy more data than
1541 * specified. For example, it may round copy boxes outwards such
1542 * that they lie on particular alignment boundaries.
1544 } SVGA3dCmdSurfaceDMA; /* SVGA_3D_CMD_SURFACE_DMA */
1547 * SVGA3dCmdSurfaceDMASuffix --
1549 * This is a command suffix that will appear after a SurfaceDMA command in
1550 * the FIFO. It contains some extra information that hosts may use to
1551 * optimize performance or protect the guest. This suffix exists to preserve
1552 * backwards compatibility while also allowing for new functionality to be
1561 * The maximum offset is used to determine the maximum offset from the
1562 * guestPtr base address that will be accessed or written to during this
1563 * surfaceDMA. If the suffix is supported, the host will respect this
1564 * boundary while performing surface DMAs.
1566 * Defaults to MAX_UINT32
1568 uint32 maximumOffset;
1571 * A set of flags that describes optimizations that the host may perform
1572 * while performing this surface DMA operation. The guest should never rely
1573 * on behaviour that is different when these flags are set for correctness.
1577 SVGA3dSurfaceDMAFlags flags;
1578 } SVGA3dCmdSurfaceDMASuffix;
1581 * SVGA_3D_CMD_DRAW_PRIMITIVES --
1583 * This command is the SVGA3D device's generic drawing entry point.
1584 * It can draw multiple ranges of primitives, optionally using an
1585 * index buffer, using an arbitrary collection of vertex buffers.
1587 * Each SVGA3dVertexDecl defines a distinct vertex array to bind
1588 * during this draw call. The declarations specify which surface
1589 * the vertex data lives in, what that vertex data is used for,
1590 * and how to interpret it.
1592 * Each SVGA3dPrimitiveRange defines a collection of primitives
1593 * to render using the same vertex arrays. An index buffer is
1600 * A range hint is an optional specification for the range of indices
1601 * in an SVGA3dArray that will be used. If 'last' is zero, it is assumed
1602 * that the entire array will be used.
1604 * These are only hints. The SVGA3D device may use them for
1605 * performance optimization if possible, but it's also allowed to
1606 * ignore these values.
1610 } SVGA3dArrayRangeHint;
1615 * Define the origin and shape of a vertex or index array. Both
1616 * 'offset' and 'stride' are in bytes. The provided surface will be
1617 * reinterpreted as a flat array of bytes in the same format used
1618 * by surface DMA operations. To avoid unnecessary conversions, the
1619 * surface should be created with the SVGA3D_BUFFER format.
1621 * Index 0 in the array starts 'offset' bytes into the surface.
1622 * Index 1 begins at byte 'offset + stride', etc. Array indices may
1633 * Describe a vertex array's data type, and define how it is to be
1634 * used by the fixed function pipeline or the vertex shader. It
1635 * isn't useful to have two VertexDecls with the same
1636 * VertexArrayIdentity in one draw call.
1638 SVGA3dDeclType type;
1639 SVGA3dDeclMethod method;
1640 SVGA3dDeclUsage usage;
1642 } SVGA3dVertexArrayIdentity;
1646 SVGA3dVertexArrayIdentity identity;
1648 SVGA3dArrayRangeHint rangeHint;
1654 * Define a group of primitives to render, from sequential indices.
1656 * The value of 'primitiveType' and 'primitiveCount' imply the
1657 * total number of vertices that will be rendered.
1659 SVGA3dPrimitiveType primType;
1660 uint32 primitiveCount;
1663 * Optional index buffer. If indexArray.surfaceId is
1664 * SVGA3D_INVALID_ID, we render without an index buffer. Rendering
1665 * without an index buffer is identical to rendering with an index
1666 * buffer containing the sequence [0, 1, 2, 3, ...].
1668 * If an index buffer is in use, indexWidth specifies the width in
1669 * bytes of each index value. It must be less than or equal to
1670 * indexArray.stride.
1672 * (Currently, the SVGA3D device requires index buffers to be tightly
1673 * packed. In other words, indexWidth == indexArray.stride)
1675 SVGA3dArray indexArray;
1679 * Optional index bias. This number is added to all indices from
1680 * indexArray before they are used as vertex array indices. This
1681 * can be used in multiple ways:
1683 * - When not using an indexArray, this bias can be used to
1684 * specify where in the vertex arrays to begin rendering.
1686 * - A positive number here is equivalent to increasing the
1687 * offset in each vertex array.
1689 * - A negative number can be used to render using a small
1690 * vertex array and an index buffer that contains large
1691 * values. This may be used by some applications that
1692 * crop a vertex buffer without modifying their index
1695 * Note that rendering with a negative bias value may be slower and
1696 * use more memory than rendering with a positive or zero bias.
1699 } SVGA3dPrimitiveRange;
1704 uint32 numVertexDecls;
1708 * There are two variable size arrays after the
1709 * SVGA3dCmdDrawPrimitives structure. In order,
1712 * 1. SVGA3dVertexDecl, quantity 'numVertexDecls', but no more than
1713 * SVGA3D_MAX_VERTEX_ARRAYS;
1714 * 2. SVGA3dPrimitiveRange, quantity 'numRanges', but no more than
1715 * SVGA3D_MAX_DRAW_PRIMITIVE_RANGES;
1716 * 3. Optionally, SVGA3dVertexDivisor, quantity 'numVertexDecls' (contains
1717 * the frequency divisor for the corresponding vertex decl).
1719 } SVGA3dCmdDrawPrimitives; /* SVGA_3D_CMD_DRAWPRIMITIVES */
1724 SVGA3dTextureStateName name;
1729 } SVGA3dTextureState;
1734 /* Followed by variable number of SVGA3dTextureState structures */
1735 } SVGA3dCmdSetTextureState; /* SVGA_3D_CMD_SETTEXTURESTATE */
1740 SVGA3dTransformType type;
1742 } SVGA3dCmdSetTransform; /* SVGA_3D_CMD_SETTRANSFORM */
1753 SVGA3dZRange zRange;
1754 } SVGA3dCmdSetZRange; /* SVGA_3D_CMD_SETZRANGE */
1769 SVGA3dMaterial material;
1770 } SVGA3dCmdSetMaterial; /* SVGA_3D_CMD_SETMATERIAL */
1776 SVGA3dLightData data;
1777 } SVGA3dCmdSetLightData; /* SVGA_3D_CMD_SETLIGHTDATA */
1784 } SVGA3dCmdSetLightEnabled; /* SVGA_3D_CMD_SETLIGHTENABLED */
1790 } SVGA3dCmdSetViewport; /* SVGA_3D_CMD_SETVIEWPORT */
1796 } SVGA3dCmdSetScissorRect; /* SVGA_3D_CMD_SETSCISSORRECT */
1803 } SVGA3dCmdSetClipPlane; /* SVGA_3D_CMD_SETCLIPPLANE */
1809 SVGA3dShaderType type;
1810 /* Followed by variable number of DWORDs for shader bycode */
1811 } SVGA3dCmdDefineShader; /* SVGA_3D_CMD_SHADER_DEFINE */
1817 SVGA3dShaderType type;
1818 } SVGA3dCmdDestroyShader; /* SVGA_3D_CMD_SHADER_DESTROY */
1823 uint32 reg; /* register number */
1824 SVGA3dShaderType type;
1825 SVGA3dShaderConstType ctype;
1827 } SVGA3dCmdSetShaderConst; /* SVGA_3D_CMD_SET_SHADER_CONST */
1832 SVGA3dShaderType type;
1834 } SVGA3dCmdSetShader; /* SVGA_3D_CMD_SET_SHADER */
1839 SVGA3dQueryType type;
1840 } SVGA3dCmdBeginQuery; /* SVGA_3D_CMD_BEGIN_QUERY */
1845 SVGA3dQueryType type;
1846 SVGAGuestPtr guestResult; /* Points to an SVGA3dQueryResult structure */
1847 } SVGA3dCmdEndQuery; /* SVGA_3D_CMD_END_QUERY */
1851 uint32 cid; /* Same parameters passed to END_QUERY */
1852 SVGA3dQueryType type;
1853 SVGAGuestPtr guestResult;
1854 } SVGA3dCmdWaitForQuery; /* SVGA_3D_CMD_WAIT_FOR_QUERY */
1858 uint32 totalSize; /* Set by guest before query is ended. */
1859 SVGA3dQueryState state; /* Set by host or guest. See SVGA3dQueryState. */
1860 union { /* Set by host on exit from PENDING state */
1863 } SVGA3dQueryResult;
1866 * SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN --
1868 * This is a blit from an SVGA3D surface to a Screen Object. Just
1869 * like GMR-to-screen blits, this blit may be directed at a
1870 * specific screen or to the virtual coordinate space.
1872 * The blit copies from a rectangular region of an SVGA3D surface
1873 * image to a rectangular region of a screen or screens.
1875 * This command takes an optional variable-length list of clipping
1876 * rectangles after the body of the command. If no rectangles are
1877 * specified, there is no clipping region. The entire destRect is
1878 * drawn to. If one or more rectangles are included, they describe
1879 * a clipping region. The clip rectangle coordinates are measured
1880 * relative to the top-left corner of destRect.
1882 * This clipping region serves multiple purposes:
1884 * - It can be used to perform an irregularly shaped blit more
1885 * efficiently than by issuing many separate blit commands.
1887 * - It is equivalent to allowing blits with non-integer
1888 * source coordinates. You could blit just one half-pixel
1889 * of a source, for example, by specifying a larger
1890 * destination rectangle than you need, then removing
1891 * part of it using a clip rectangle.
1894 * SVGA_FIFO_CAP_SCREEN_OBJECT
1898 * - Currently, no backend supports blits from a mipmap or face
1899 * other than the first one.
1904 SVGA3dSurfaceImageId srcImage;
1905 SVGASignedRect srcRect;
1906 uint32 destScreenId; /* Screen ID or SVGA_ID_INVALID for virt. coords */
1907 SVGASignedRect destRect; /* Supports scaling if src/rest different size */
1908 /* Clipping: zero or more SVGASignedRects follow */
1909 } SVGA3dCmdBlitSurfaceToScreen; /* SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN */
1914 SVGA3dTextureFilter filter;
1915 } SVGA3dCmdGenerateMipmaps; /* SVGA_3D_CMD_GENERATE_MIPMAPS */
1919 * Guest-backed surface definitions.
1922 typedef uint32 SVGAMobId;
1924 typedef enum SVGAMobFormat {
1925 SVGA3D_MOBFMT_INVALID = SVGA3D_INVALID_ID,
1926 SVGA3D_MOBFMT_PTDEPTH_0 = 0,
1927 SVGA3D_MOBFMT_PTDEPTH_1 = 1,
1928 SVGA3D_MOBFMT_PTDEPTH_2 = 2,
1929 SVGA3D_MOBFMT_RANGE = 3,
1934 * Sizes of opaque types.
1937 #define SVGA3D_OTABLE_MOB_ENTRY_SIZE 16
1938 #define SVGA3D_OTABLE_CONTEXT_ENTRY_SIZE 8
1939 #define SVGA3D_OTABLE_SURFACE_ENTRY_SIZE 64
1940 #define SVGA3D_OTABLE_SHADER_ENTRY_SIZE 16
1941 #define SVGA3D_CONTEXT_DATA_SIZE 16384
1944 * SVGA3dCmdSetOTableBase --
1946 * This command allows the guest to specify the base PPN of the
1947 * specified object table.
1951 SVGA_OTABLE_MOB = 0,
1952 SVGA_OTABLE_SURFACE = 1,
1953 SVGA_OTABLE_CONTEXT = 2,
1954 SVGA_OTABLE_SHADER = 3,
1955 SVGA_OTABLE_COUNT = 4,
1960 SVGAOTableType type;
1963 uint32 validSizeInBytes;
1964 SVGAMobFormat ptDepth;
1965 } SVGA3dCmdSetOTableBase; /* SVGA_3D_CMD_SET_OTABLE_BASE */
1969 SVGAOTableType type;
1970 } SVGA3dCmdReadbackOTable; /* SVGA_3D_CMD_READBACK_OTABLE */
1973 * Define a memory object (Mob) in the OTable.
1977 struct SVGA3dCmdDefineGBMob {
1979 SVGAMobFormat ptDepth;
1982 } SVGA3dCmdDefineGBMob; /* SVGA_3D_CMD_DEFINE_GB_MOB */
1986 * Destroys an object in the OTable.
1990 struct SVGA3dCmdDestroyGBMob {
1992 } SVGA3dCmdDestroyGBMob; /* SVGA_3D_CMD_DESTROY_GB_MOB */
1995 * Redefine an object in the OTable.
1999 struct SVGA3dCmdRedefineGBMob {
2001 SVGAMobFormat ptDepth;
2004 } SVGA3dCmdRedefineGBMob; /* SVGA_3D_CMD_REDEFINE_GB_MOB */
2007 * Notification that the page tables have been modified.
2011 struct SVGA3dCmdUpdateGBMobMapping {
2013 } SVGA3dCmdUpdateGBMobMapping; /* SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING */
2016 * Define a guest-backed surface.
2020 struct SVGA3dCmdDefineGBSurface {
2022 SVGA3dSurfaceFlags surfaceFlags;
2023 SVGA3dSurfaceFormat format;
2024 uint32 numMipLevels;
2025 uint32 multisampleCount;
2026 SVGA3dTextureFilter autogenFilter;
2028 } SVGA3dCmdDefineGBSurface; /* SVGA_3D_CMD_DEFINE_GB_SURFACE */
2031 * Destroy a guest-backed surface.
2035 struct SVGA3dCmdDestroyGBSurface {
2037 } SVGA3dCmdDestroyGBSurface; /* SVGA_3D_CMD_DESTROY_GB_SURFACE */
2040 * Bind a guest-backed surface to an object.
2044 struct SVGA3dCmdBindGBSurface {
2047 } SVGA3dCmdBindGBSurface; /* SVGA_3D_CMD_BIND_GB_SURFACE */
2050 * Conditionally bind a mob to a guest backed surface if testMobid
2051 * matches the currently bound mob. Optionally issue a readback on
2052 * the surface while it is still bound to the old mobid if the mobid
2053 * is changed by this command.
2056 #define SVGA3D_COND_BIND_GB_SURFACE_FLAG_READBACK (1 << 0)
2061 SVGAMobId testMobid;
2065 SVGA3dCmdCondBindGBSurface; /* SVGA_3D_CMD_COND_BIND_GB_SURFACE */
2068 * Update an image in a guest-backed surface.
2069 * (Inform the device that the guest-contents have been updated.)
2073 struct SVGA3dCmdUpdateGBImage {
2074 SVGA3dSurfaceImageId image;
2076 } SVGA3dCmdUpdateGBImage; /* SVGA_3D_CMD_UPDATE_GB_IMAGE */
2079 * Update an entire guest-backed surface.
2080 * (Inform the device that the guest-contents have been updated.)
2084 struct SVGA3dCmdUpdateGBSurface {
2086 } SVGA3dCmdUpdateGBSurface; /* SVGA_3D_CMD_UPDATE_GB_SURFACE */
2089 * Readback an image in a guest-backed surface.
2090 * (Request the device to flush the dirty contents into the guest.)
2094 struct SVGA3dCmdReadbackGBImage {
2095 SVGA3dSurfaceImageId image;
2096 } SVGA3dCmdReadbackGBImage; /* SVGA_3D_CMD_READBACK_GB_IMAGE*/
2099 * Readback an entire guest-backed surface.
2100 * (Request the device to flush the dirty contents into the guest.)
2104 struct SVGA3dCmdReadbackGBSurface {
2106 } SVGA3dCmdReadbackGBSurface; /* SVGA_3D_CMD_READBACK_GB_SURFACE */
2109 * Readback a sub rect of an image in a guest-backed surface. After
2110 * issuing this command the driver is required to issue an update call
2111 * of the same region before issuing any other commands that reference
2112 * this surface or rendering is not guaranteed.
2116 struct SVGA3dCmdReadbackGBImagePartial {
2117 SVGA3dSurfaceImageId image;
2121 SVGA3dCmdReadbackGBImagePartial; /* SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL */
2124 * Invalidate an image in a guest-backed surface.
2125 * (Notify the device that the contents can be lost.)
2129 struct SVGA3dCmdInvalidateGBImage {
2130 SVGA3dSurfaceImageId image;
2131 } SVGA3dCmdInvalidateGBImage; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE */
2134 * Invalidate an entire guest-backed surface.
2135 * (Notify the device that the contents if all images can be lost.)
2139 struct SVGA3dCmdInvalidateGBSurface {
2141 } SVGA3dCmdInvalidateGBSurface; /* SVGA_3D_CMD_INVALIDATE_GB_SURFACE */
2144 * Invalidate a sub rect of an image in a guest-backed surface. After
2145 * issuing this command the driver is required to issue an update call
2146 * of the same region before issuing any other commands that reference
2147 * this surface or rendering is not guaranteed.
2151 struct SVGA3dCmdInvalidateGBImagePartial {
2152 SVGA3dSurfaceImageId image;
2156 SVGA3dCmdInvalidateGBImagePartial; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL */
2159 * Define a guest-backed context.
2163 struct SVGA3dCmdDefineGBContext {
2165 } SVGA3dCmdDefineGBContext; /* SVGA_3D_CMD_DEFINE_GB_CONTEXT */
2168 * Destroy a guest-backed context.
2172 struct SVGA3dCmdDestroyGBContext {
2174 } SVGA3dCmdDestroyGBContext; /* SVGA_3D_CMD_DESTROY_GB_CONTEXT */
2177 * Bind a guest-backed context.
2179 * validContents should be set to 0 for new contexts,
2180 * and 1 if this is an old context which is getting paged
2181 * back on to the device.
2183 * For new contexts, it is recommended that the driver
2184 * issue commands to initialize all interesting state
2185 * prior to rendering.
2189 struct SVGA3dCmdBindGBContext {
2192 uint32 validContents;
2193 } SVGA3dCmdBindGBContext; /* SVGA_3D_CMD_BIND_GB_CONTEXT */
2196 * Readback a guest-backed context.
2197 * (Request that the device flush the contents back into guest memory.)
2201 struct SVGA3dCmdReadbackGBContext {
2203 } SVGA3dCmdReadbackGBContext; /* SVGA_3D_CMD_READBACK_GB_CONTEXT */
2206 * Invalidate a guest-backed context.
2209 struct SVGA3dCmdInvalidateGBContext {
2211 } SVGA3dCmdInvalidateGBContext; /* SVGA_3D_CMD_INVALIDATE_GB_CONTEXT */
2214 * Define a guest-backed shader.
2218 struct SVGA3dCmdDefineGBShader {
2220 SVGA3dShaderType type;
2222 } SVGA3dCmdDefineGBShader; /* SVGA_3D_CMD_DEFINE_GB_SHADER */
2225 * Bind a guest-backed shader.
2228 typedef struct SVGA3dCmdBindGBShader {
2231 uint32 offsetInBytes;
2232 } SVGA3dCmdBindGBShader; /* SVGA_3D_CMD_BIND_GB_SHADER */
2235 * Destroy a guest-backed shader.
2238 typedef struct SVGA3dCmdDestroyGBShader {
2240 } SVGA3dCmdDestroyGBShader; /* SVGA_3D_CMD_DESTROY_GB_SHADER */
2243 typedef struct SVGA3dCmdBindGBShaderConsts {
2245 SVGA3dShaderType shaderType;
2246 SVGA3dShaderConstType shaderConstType;
2248 } SVGA3dCmdBindGBShaderConsts; /* SVGA_3D_CMD_BIND_SHADERCONSTS */
2254 SVGA3dShaderType shaderType;
2255 SVGA3dShaderConstType constType;
2258 * Followed by a variable number of shader constants.
2260 * Note that FLOAT and INT constants are 4-dwords in length, while
2261 * BOOL constants are 1-dword in length.
2263 } SVGA3dCmdSetGBShaderConstInline;
2264 /* SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE */
2269 SVGA3dQueryType type;
2270 } SVGA3dCmdBeginGBQuery; /* SVGA_3D_CMD_BEGIN_GB_QUERY */
2275 SVGA3dQueryType type;
2278 } SVGA3dCmdEndGBQuery; /* SVGA_3D_CMD_END_GB_QUERY */
2282 * SVGA_3D_CMD_WAIT_FOR_GB_QUERY --
2284 * The semantics of this command are identical to the
2285 * SVGA_3D_CMD_WAIT_FOR_QUERY except that the results are written
2286 * to a Mob instead of a GMR.
2292 SVGA3dQueryType type;
2295 } SVGA3dCmdWaitForGBQuery; /* SVGA_3D_CMD_WAIT_FOR_GB_QUERY */
2303 SVGA3dCmdEnableGart; /* SVGA_3D_CMD_ENABLE_GART */
2310 SVGA3dCmdMapMobIntoGart; /* SVGA_3D_CMD_MAP_MOB_INTO_GART */
2318 SVGA3dCmdUnmapGartRange; /* SVGA_3D_CMD_UNMAP_GART_RANGE */
2324 #define SVGA_STFLAG_PRIMARY (1 << 0)
2335 SVGA3dCmdDefineGBScreenTarget; /* SVGA_3D_CMD_DEFINE_GB_SCREENTARGET */
2341 SVGA3dCmdDestroyGBScreenTarget; /* SVGA_3D_CMD_DESTROY_GB_SCREENTARGET */
2346 SVGA3dSurfaceImageId image;
2348 SVGA3dCmdBindGBScreenTarget; /* SVGA_3D_CMD_BIND_GB_SCREENTARGET */
2355 SVGA3dCmdUpdateGBScreenTarget; /* SVGA_3D_CMD_UPDATE_GB_SCREENTARGET */
2358 * Capability query index.
2362 * 1. SVGA3D_DEVCAP_MAX_TEXTURES reflects the maximum number of
2363 * fixed-function texture units available. Each of these units
2364 * work in both FFP and Shader modes, and they support texture
2365 * transforms and texture coordinates. The host may have additional
2366 * texture image units that are only usable with shaders.
2368 * 2. The BUFFER_FORMAT capabilities are deprecated, and they always
2369 * return TRUE. Even on physical hardware that does not support
2370 * these formats natively, the SVGA3D device will provide an emulation
2371 * which should be invisible to the guest OS.
2373 * In general, the SVGA3D device should support any operation on
2374 * any surface format, it just may perform some of these
2375 * operations in software depending on the capabilities of the
2376 * available physical hardware.
2378 * XXX: In the future, we will add capabilities that describe in
2379 * detail what formats are supported in hardware for what kinds
2384 SVGA3D_DEVCAP_3D = 0,
2385 SVGA3D_DEVCAP_MAX_LIGHTS = 1,
2386 SVGA3D_DEVCAP_MAX_TEXTURES = 2, /* See note (1) */
2387 SVGA3D_DEVCAP_MAX_CLIP_PLANES = 3,
2388 SVGA3D_DEVCAP_VERTEX_SHADER_VERSION = 4,
2389 SVGA3D_DEVCAP_VERTEX_SHADER = 5,
2390 SVGA3D_DEVCAP_FRAGMENT_SHADER_VERSION = 6,
2391 SVGA3D_DEVCAP_FRAGMENT_SHADER = 7,
2392 SVGA3D_DEVCAP_MAX_RENDER_TARGETS = 8,
2393 SVGA3D_DEVCAP_S23E8_TEXTURES = 9,
2394 SVGA3D_DEVCAP_S10E5_TEXTURES = 10,
2395 SVGA3D_DEVCAP_MAX_FIXED_VERTEXBLEND = 11,
2396 SVGA3D_DEVCAP_D16_BUFFER_FORMAT = 12, /* See note (2) */
2397 SVGA3D_DEVCAP_D24S8_BUFFER_FORMAT = 13, /* See note (2) */
2398 SVGA3D_DEVCAP_D24X8_BUFFER_FORMAT = 14, /* See note (2) */
2399 SVGA3D_DEVCAP_QUERY_TYPES = 15,
2400 SVGA3D_DEVCAP_TEXTURE_GRADIENT_SAMPLING = 16,
2401 SVGA3D_DEVCAP_MAX_POINT_SIZE = 17,
2402 SVGA3D_DEVCAP_MAX_SHADER_TEXTURES = 18,
2403 SVGA3D_DEVCAP_MAX_TEXTURE_WIDTH = 19,
2404 SVGA3D_DEVCAP_MAX_TEXTURE_HEIGHT = 20,
2405 SVGA3D_DEVCAP_MAX_VOLUME_EXTENT = 21,
2406 SVGA3D_DEVCAP_MAX_TEXTURE_REPEAT = 22,
2407 SVGA3D_DEVCAP_MAX_TEXTURE_ASPECT_RATIO = 23,
2408 SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY = 24,
2409 SVGA3D_DEVCAP_MAX_PRIMITIVE_COUNT = 25,
2410 SVGA3D_DEVCAP_MAX_VERTEX_INDEX = 26,
2411 SVGA3D_DEVCAP_MAX_VERTEX_SHADER_INSTRUCTIONS = 27,
2412 SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_INSTRUCTIONS = 28,
2413 SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEMPS = 29,
2414 SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_TEMPS = 30,
2415 SVGA3D_DEVCAP_TEXTURE_OPS = 31,
2416 SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8 = 32,
2417 SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8 = 33,
2418 SVGA3D_DEVCAP_SURFACEFMT_A2R10G10B10 = 34,
2419 SVGA3D_DEVCAP_SURFACEFMT_X1R5G5B5 = 35,
2420 SVGA3D_DEVCAP_SURFACEFMT_A1R5G5B5 = 36,
2421 SVGA3D_DEVCAP_SURFACEFMT_A4R4G4B4 = 37,
2422 SVGA3D_DEVCAP_SURFACEFMT_R5G6B5 = 38,
2423 SVGA3D_DEVCAP_SURFACEFMT_LUMINANCE16 = 39,
2424 SVGA3D_DEVCAP_SURFACEFMT_LUMINANCE8_ALPHA8 = 40,
2425 SVGA3D_DEVCAP_SURFACEFMT_ALPHA8 = 41,
2426 SVGA3D_DEVCAP_SURFACEFMT_LUMINANCE8 = 42,
2427 SVGA3D_DEVCAP_SURFACEFMT_Z_D16 = 43,
2428 SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8 = 44,
2429 SVGA3D_DEVCAP_SURFACEFMT_Z_D24X8 = 45,
2430 SVGA3D_DEVCAP_SURFACEFMT_DXT1 = 46,
2431 SVGA3D_DEVCAP_SURFACEFMT_DXT2 = 47,
2432 SVGA3D_DEVCAP_SURFACEFMT_DXT3 = 48,
2433 SVGA3D_DEVCAP_SURFACEFMT_DXT4 = 49,
2434 SVGA3D_DEVCAP_SURFACEFMT_DXT5 = 50,
2435 SVGA3D_DEVCAP_SURFACEFMT_BUMPX8L8V8U8 = 51,
2436 SVGA3D_DEVCAP_SURFACEFMT_A2W10V10U10 = 52,
2437 SVGA3D_DEVCAP_SURFACEFMT_BUMPU8V8 = 53,
2438 SVGA3D_DEVCAP_SURFACEFMT_Q8W8V8U8 = 54,
2439 SVGA3D_DEVCAP_SURFACEFMT_CxV8U8 = 55,
2440 SVGA3D_DEVCAP_SURFACEFMT_R_S10E5 = 56,
2441 SVGA3D_DEVCAP_SURFACEFMT_R_S23E8 = 57,
2442 SVGA3D_DEVCAP_SURFACEFMT_RG_S10E5 = 58,
2443 SVGA3D_DEVCAP_SURFACEFMT_RG_S23E8 = 59,
2444 SVGA3D_DEVCAP_SURFACEFMT_ARGB_S10E5 = 60,
2445 SVGA3D_DEVCAP_SURFACEFMT_ARGB_S23E8 = 61,
2446 SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEXTURES = 63,
2449 * Note that MAX_SIMULTANEOUS_RENDER_TARGETS is a maximum count of color
2450 * render targets. This does no include the depth or stencil targets.
2452 SVGA3D_DEVCAP_MAX_SIMULTANEOUS_RENDER_TARGETS = 64,
2454 SVGA3D_DEVCAP_SURFACEFMT_V16U16 = 65,
2455 SVGA3D_DEVCAP_SURFACEFMT_G16R16 = 66,
2456 SVGA3D_DEVCAP_SURFACEFMT_A16B16G16R16 = 67,
2457 SVGA3D_DEVCAP_SURFACEFMT_UYVY = 68,
2458 SVGA3D_DEVCAP_SURFACEFMT_YUY2 = 69,
2459 SVGA3D_DEVCAP_MULTISAMPLE_NONMASKABLESAMPLES = 70,
2460 SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES = 71,
2461 SVGA3D_DEVCAP_ALPHATOCOVERAGE = 72,
2462 SVGA3D_DEVCAP_SUPERSAMPLE = 73,
2463 SVGA3D_DEVCAP_AUTOGENMIPMAPS = 74,
2464 SVGA3D_DEVCAP_SURFACEFMT_NV12 = 75,
2465 SVGA3D_DEVCAP_SURFACEFMT_AYUV = 76,
2468 * This is the maximum number of SVGA context IDs that the guest
2469 * can define using SVGA_3D_CMD_CONTEXT_DEFINE.
2471 SVGA3D_DEVCAP_MAX_CONTEXT_IDS = 77,
2474 * This is the maximum number of SVGA surface IDs that the guest
2475 * can define using SVGA_3D_CMD_SURFACE_DEFINE*.
2477 SVGA3D_DEVCAP_MAX_SURFACE_IDS = 78,
2479 SVGA3D_DEVCAP_SURFACEFMT_Z_DF16 = 79,
2480 SVGA3D_DEVCAP_SURFACEFMT_Z_DF24 = 80,
2481 SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8_INT = 81,
2483 SVGA3D_DEVCAP_SURFACEFMT_BC4_UNORM = 82,
2484 SVGA3D_DEVCAP_SURFACEFMT_BC5_UNORM = 83,
2489 SVGA3D_DEVCAP_VGPU10 = 84,
2492 * This contains several SVGA_3D_CAPS_VIDEO_DECODE elements
2493 * ored together, one for every type of video decoding supported.
2495 SVGA3D_DEVCAP_VIDEO_DECODE = 85,
2498 * This contains several SVGA_3D_CAPS_VIDEO_PROCESS elements
2499 * ored together, one for every type of video processing supported.
2501 SVGA3D_DEVCAP_VIDEO_PROCESS = 86,
2503 SVGA3D_DEVCAP_LINE_AA = 87, /* boolean */
2504 SVGA3D_DEVCAP_LINE_STIPPLE = 88, /* boolean */
2505 SVGA3D_DEVCAP_MAX_LINE_WIDTH = 89, /* float */
2506 SVGA3D_DEVCAP_MAX_AA_LINE_WIDTH = 90, /* float */
2508 SVGA3D_DEVCAP_SURFACEFMT_YV12 = 91,
2511 * Does the host support the SVGA logic ops commands?
2513 SVGA3D_DEVCAP_LOGICOPS = 92,
2516 * What support does the host have for screen targets?
2518 * See the SVGA3D_SCREENTARGET_CAP bits below.
2520 SVGA3D_DEVCAP_SCREENTARGETS = 93,
2522 SVGA3D_DEVCAP_MAX /* This must be the last index. */
2523 } SVGA3dDevCapIndex;
2530 } SVGA3dDevCapResult;
2532 #endif /* _SVGA3D_REG_H_ */