1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 /**********************************************************
3 * Copyright 2012-2015 VMware, Inc.
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without
8 * restriction, including without limitation the rights to use, copy,
9 * modify, merge, publish, distribute, sublicense, and/or sell copies
10 * of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 **********************************************************/
30 * SVGA 3d hardware definitions for DX10 support.
36 #define INCLUDE_ALLOW_MODULE
37 #define INCLUDE_ALLOW_USERLEVEL
38 #define INCLUDE_ALLOW_VMCORE
39 #include "includeCheck.h"
41 #include "svga3d_limits.h"
43 #define SVGA3D_INPUT_MIN 0
44 #define SVGA3D_INPUT_PER_VERTEX_DATA 0
45 #define SVGA3D_INPUT_PER_INSTANCE_DATA 1
46 #define SVGA3D_INPUT_MAX 2
47 typedef uint32 SVGA3dInputClassification
;
49 #define SVGA3D_RESOURCE_TYPE_MIN 1
50 #define SVGA3D_RESOURCE_BUFFER 1
51 #define SVGA3D_RESOURCE_TEXTURE1D 2
52 #define SVGA3D_RESOURCE_TEXTURE2D 3
53 #define SVGA3D_RESOURCE_TEXTURE3D 4
54 #define SVGA3D_RESOURCE_TEXTURECUBE 5
55 #define SVGA3D_RESOURCE_TYPE_DX10_MAX 6
56 #define SVGA3D_RESOURCE_BUFFEREX 6
57 #define SVGA3D_RESOURCE_TYPE_MAX 7
58 typedef uint32 SVGA3dResourceType
;
60 #define SVGA3D_COLOR_WRITE_ENABLE_RED (1 << 0)
61 #define SVGA3D_COLOR_WRITE_ENABLE_GREEN (1 << 1)
62 #define SVGA3D_COLOR_WRITE_ENABLE_BLUE (1 << 2)
63 #define SVGA3D_COLOR_WRITE_ENABLE_ALPHA (1 << 3)
64 #define SVGA3D_COLOR_WRITE_ENABLE_ALL (SVGA3D_COLOR_WRITE_ENABLE_RED | \
65 SVGA3D_COLOR_WRITE_ENABLE_GREEN | \
66 SVGA3D_COLOR_WRITE_ENABLE_BLUE | \
67 SVGA3D_COLOR_WRITE_ENABLE_ALPHA)
68 typedef uint8 SVGA3dColorWriteEnable
;
70 #define SVGA3D_DEPTH_WRITE_MASK_ZERO 0
71 #define SVGA3D_DEPTH_WRITE_MASK_ALL 1
72 typedef uint8 SVGA3dDepthWriteMask
;
74 #define SVGA3D_FILTER_MIP_LINEAR (1 << 0)
75 #define SVGA3D_FILTER_MAG_LINEAR (1 << 2)
76 #define SVGA3D_FILTER_MIN_LINEAR (1 << 4)
77 #define SVGA3D_FILTER_ANISOTROPIC (1 << 6)
78 #define SVGA3D_FILTER_COMPARE (1 << 7)
79 typedef uint32 SVGA3dFilter
;
81 #define SVGA3D_CULL_INVALID 0
82 #define SVGA3D_CULL_MIN 1
83 #define SVGA3D_CULL_NONE 1
84 #define SVGA3D_CULL_FRONT 2
85 #define SVGA3D_CULL_BACK 3
86 #define SVGA3D_CULL_MAX 4
87 typedef uint8 SVGA3dCullMode
;
89 #define SVGA3D_COMPARISON_INVALID 0
90 #define SVGA3D_COMPARISON_MIN 1
91 #define SVGA3D_COMPARISON_NEVER 1
92 #define SVGA3D_COMPARISON_LESS 2
93 #define SVGA3D_COMPARISON_EQUAL 3
94 #define SVGA3D_COMPARISON_LESS_EQUAL 4
95 #define SVGA3D_COMPARISON_GREATER 5
96 #define SVGA3D_COMPARISON_NOT_EQUAL 6
97 #define SVGA3D_COMPARISON_GREATER_EQUAL 7
98 #define SVGA3D_COMPARISON_ALWAYS 8
99 #define SVGA3D_COMPARISON_MAX 9
100 typedef uint8 SVGA3dComparisonFunc
;
103 * SVGA3D_MULTISAMPLE_RAST_DISABLE disables MSAA for all primitives.
104 * SVGA3D_MULTISAMPLE_RAST_DISABLE_LINE, which is supported in SM41,
105 * disables MSAA for lines only.
107 #define SVGA3D_MULTISAMPLE_RAST_DISABLE 0
108 #define SVGA3D_MULTISAMPLE_RAST_ENABLE 1
109 #define SVGA3D_MULTISAMPLE_RAST_DX_MAX 1
110 #define SVGA3D_MULTISAMPLE_RAST_DISABLE_LINE 2
111 #define SVGA3D_MULTISAMPLE_RAST_MAX 2
112 typedef uint8 SVGA3dMultisampleRastEnable
;
114 #define SVGA3D_DX_MAX_VERTEXBUFFERS 32
115 #define SVGA3D_DX_MAX_VERTEXINPUTREGISTERS 16
116 #define SVGA3D_DX_SM41_MAX_VERTEXINPUTREGISTERS 32
117 #define SVGA3D_DX_MAX_SOTARGETS 4
118 #define SVGA3D_DX_MAX_SRVIEWS 128
119 #define SVGA3D_DX_MAX_CONSTBUFFERS 16
120 #define SVGA3D_DX_MAX_SAMPLERS 16
122 #define SVGA3D_DX_MAX_CONSTBUF_BINDING_SIZE (4096 * 4 * (uint32)sizeof(uint32))
124 typedef uint32 SVGA3dShaderResourceViewId
;
125 typedef uint32 SVGA3dRenderTargetViewId
;
126 typedef uint32 SVGA3dDepthStencilViewId
;
128 typedef uint32 SVGA3dShaderId
;
129 typedef uint32 SVGA3dElementLayoutId
;
130 typedef uint32 SVGA3dSamplerId
;
131 typedef uint32 SVGA3dBlendStateId
;
132 typedef uint32 SVGA3dDepthStencilStateId
;
133 typedef uint32 SVGA3dRasterizerStateId
;
134 typedef uint32 SVGA3dQueryId
;
135 typedef uint32 SVGA3dStreamOutputId
;
149 #include "vmware_pack_begin.h"
154 #include "vmware_pack_end.h"
155 SVGAOTableDXContextEntry
;
158 #include "vmware_pack_begin.h"
159 struct SVGA3dCmdDXDefineContext
{
162 #include "vmware_pack_end.h"
163 SVGA3dCmdDXDefineContext
; /* SVGA_3D_CMD_DX_DEFINE_CONTEXT */
166 #include "vmware_pack_begin.h"
167 struct SVGA3dCmdDXDestroyContext
{
170 #include "vmware_pack_end.h"
171 SVGA3dCmdDXDestroyContext
; /* SVGA_3D_CMD_DX_DESTROY_CONTEXT */
176 * validContents should be set to 0 for new contexts,
177 * and 1 if this is an old context which is getting paged
178 * back on to the device.
180 * For new contexts, it is recommended that the driver
181 * issue commands to initialize all interesting state
182 * prior to rendering.
185 #include "vmware_pack_begin.h"
186 struct SVGA3dCmdDXBindContext
{
189 uint32 validContents
;
191 #include "vmware_pack_end.h"
192 SVGA3dCmdDXBindContext
; /* SVGA_3D_CMD_DX_BIND_CONTEXT */
195 * Readback a DX context.
196 * (Request that the device flush the contents back into guest memory.)
199 #include "vmware_pack_begin.h"
200 struct SVGA3dCmdDXReadbackContext
{
203 #include "vmware_pack_end.h"
204 SVGA3dCmdDXReadbackContext
; /* SVGA_3D_CMD_DX_READBACK_CONTEXT */
207 * Invalidate a guest-backed context.
210 #include "vmware_pack_begin.h"
211 struct SVGA3dCmdDXInvalidateContext
{
214 #include "vmware_pack_end.h"
215 SVGA3dCmdDXInvalidateContext
; /* SVGA_3D_CMD_DX_INVALIDATE_CONTEXT */
218 #include "vmware_pack_begin.h"
219 struct SVGA3dCmdDXSetSingleConstantBuffer
{
221 SVGA3dShaderType type
;
223 uint32 offsetInBytes
;
226 #include "vmware_pack_end.h"
227 SVGA3dCmdDXSetSingleConstantBuffer
;
228 /* SVGA_3D_CMD_DX_SET_SINGLE_CONSTANT_BUFFER */
231 #include "vmware_pack_begin.h"
232 struct SVGA3dCmdDXSetShaderResources
{
234 SVGA3dShaderType type
;
237 * Followed by a variable number of SVGA3dShaderResourceViewId's.
240 #include "vmware_pack_end.h"
241 SVGA3dCmdDXSetShaderResources
; /* SVGA_3D_CMD_DX_SET_SHADER_RESOURCES */
244 #include "vmware_pack_begin.h"
245 struct SVGA3dCmdDXSetShader
{
246 SVGA3dShaderId shaderId
;
247 SVGA3dShaderType type
;
249 #include "vmware_pack_end.h"
250 SVGA3dCmdDXSetShader
; /* SVGA_3D_CMD_DX_SET_SHADER */
253 #include "vmware_pack_begin.h"
254 struct SVGA3dCmdDXSetSamplers
{
256 SVGA3dShaderType type
;
259 * Followed by a variable number of SVGA3dSamplerId's.
262 #include "vmware_pack_end.h"
263 SVGA3dCmdDXSetSamplers
; /* SVGA_3D_CMD_DX_SET_SAMPLERS */
266 #include "vmware_pack_begin.h"
267 struct SVGA3dCmdDXDraw
{
269 uint32 startVertexLocation
;
271 #include "vmware_pack_end.h"
272 SVGA3dCmdDXDraw
; /* SVGA_3D_CMD_DX_DRAW */
275 #include "vmware_pack_begin.h"
276 struct SVGA3dCmdDXDrawIndexed
{
278 uint32 startIndexLocation
;
279 int32 baseVertexLocation
;
281 #include "vmware_pack_end.h"
282 SVGA3dCmdDXDrawIndexed
; /* SVGA_3D_CMD_DX_DRAW_INDEXED */
285 #include "vmware_pack_begin.h"
286 struct SVGA3dCmdDXDrawInstanced
{
287 uint32 vertexCountPerInstance
;
288 uint32 instanceCount
;
289 uint32 startVertexLocation
;
290 uint32 startInstanceLocation
;
292 #include "vmware_pack_end.h"
293 SVGA3dCmdDXDrawInstanced
; /* SVGA_3D_CMD_DX_DRAW_INSTANCED */
296 #include "vmware_pack_begin.h"
297 struct SVGA3dCmdDXDrawIndexedInstanced
{
298 uint32 indexCountPerInstance
;
299 uint32 instanceCount
;
300 uint32 startIndexLocation
;
301 int32 baseVertexLocation
;
302 uint32 startInstanceLocation
;
304 #include "vmware_pack_end.h"
305 SVGA3dCmdDXDrawIndexedInstanced
; /* SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED */
308 #include "vmware_pack_begin.h"
309 struct SVGA3dCmdDXDrawAuto
{
312 #include "vmware_pack_end.h"
313 SVGA3dCmdDXDrawAuto
; /* SVGA_3D_CMD_DX_DRAW_AUTO */
316 #include "vmware_pack_begin.h"
317 struct SVGA3dCmdDXSetInputLayout
{
318 SVGA3dElementLayoutId elementLayoutId
;
320 #include "vmware_pack_end.h"
321 SVGA3dCmdDXSetInputLayout
; /* SVGA_3D_CMD_DX_SET_INPUT_LAYOUT */
324 #include "vmware_pack_begin.h"
325 struct SVGA3dVertexBuffer
{
330 #include "vmware_pack_end.h"
334 #include "vmware_pack_begin.h"
335 struct SVGA3dCmdDXSetVertexBuffers
{
337 /* Followed by a variable number of SVGA3dVertexBuffer's. */
339 #include "vmware_pack_end.h"
340 SVGA3dCmdDXSetVertexBuffers
; /* SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS */
343 #include "vmware_pack_begin.h"
344 struct SVGA3dCmdDXSetIndexBuffer
{
346 SVGA3dSurfaceFormat format
;
349 #include "vmware_pack_end.h"
350 SVGA3dCmdDXSetIndexBuffer
; /* SVGA_3D_CMD_DX_SET_INDEX_BUFFER */
353 #include "vmware_pack_begin.h"
354 struct SVGA3dCmdDXSetTopology
{
355 SVGA3dPrimitiveType topology
;
357 #include "vmware_pack_end.h"
358 SVGA3dCmdDXSetTopology
; /* SVGA_3D_CMD_DX_SET_TOPOLOGY */
361 #include "vmware_pack_begin.h"
362 struct SVGA3dCmdDXSetRenderTargets
{
363 SVGA3dDepthStencilViewId depthStencilViewId
;
364 /* Followed by a variable number of SVGA3dRenderTargetViewId's. */
366 #include "vmware_pack_end.h"
367 SVGA3dCmdDXSetRenderTargets
; /* SVGA_3D_CMD_DX_SET_RENDERTARGETS */
370 #include "vmware_pack_begin.h"
371 struct SVGA3dCmdDXSetBlendState
{
372 SVGA3dBlendStateId blendId
;
373 float blendFactor
[4];
376 #include "vmware_pack_end.h"
377 SVGA3dCmdDXSetBlendState
; /* SVGA_3D_CMD_DX_SET_BLEND_STATE */
380 #include "vmware_pack_begin.h"
381 struct SVGA3dCmdDXSetDepthStencilState
{
382 SVGA3dDepthStencilStateId depthStencilId
;
385 #include "vmware_pack_end.h"
386 SVGA3dCmdDXSetDepthStencilState
; /* SVGA_3D_CMD_DX_SET_DEPTHSTENCIL_STATE */
389 #include "vmware_pack_begin.h"
390 struct SVGA3dCmdDXSetRasterizerState
{
391 SVGA3dRasterizerStateId rasterizerId
;
393 #include "vmware_pack_end.h"
394 SVGA3dCmdDXSetRasterizerState
; /* SVGA_3D_CMD_DX_SET_RASTERIZER_STATE */
396 #define SVGA3D_DXQUERY_FLAG_PREDICATEHINT (1 << 0)
397 typedef uint32 SVGA3dDXQueryFlags
;
400 * The SVGADXQueryDeviceState and SVGADXQueryDeviceBits are used by the device
401 * to track query state transitions, but are not intended to be used by the
404 #define SVGADX_QDSTATE_INVALID ((uint8)-1) /* Query has no state */
405 #define SVGADX_QDSTATE_MIN 0
406 #define SVGADX_QDSTATE_IDLE 0 /* Query hasn't started yet */
407 #define SVGADX_QDSTATE_ACTIVE 1 /* Query is actively gathering data */
408 #define SVGADX_QDSTATE_PENDING 2 /* Query is waiting for results */
409 #define SVGADX_QDSTATE_FINISHED 3 /* Query has completed */
410 #define SVGADX_QDSTATE_MAX 4
411 typedef uint8 SVGADXQueryDeviceState
;
414 #include "vmware_pack_begin.h"
416 SVGA3dQueryTypeUint8 type
;
418 SVGADXQueryDeviceState state
;
419 SVGA3dDXQueryFlags flags
;
423 #include "vmware_pack_end.h"
424 SVGACOTableDXQueryEntry
;
427 #include "vmware_pack_begin.h"
428 struct SVGA3dCmdDXDefineQuery
{
429 SVGA3dQueryId queryId
;
430 SVGA3dQueryType type
;
431 SVGA3dDXQueryFlags flags
;
433 #include "vmware_pack_end.h"
434 SVGA3dCmdDXDefineQuery
; /* SVGA_3D_CMD_DX_DEFINE_QUERY */
437 #include "vmware_pack_begin.h"
438 struct SVGA3dCmdDXDestroyQuery
{
439 SVGA3dQueryId queryId
;
441 #include "vmware_pack_end.h"
442 SVGA3dCmdDXDestroyQuery
; /* SVGA_3D_CMD_DX_DESTROY_QUERY */
445 #include "vmware_pack_begin.h"
446 struct SVGA3dCmdDXBindQuery
{
447 SVGA3dQueryId queryId
;
450 #include "vmware_pack_end.h"
451 SVGA3dCmdDXBindQuery
; /* SVGA_3D_CMD_DX_BIND_QUERY */
454 #include "vmware_pack_begin.h"
455 struct SVGA3dCmdDXSetQueryOffset
{
456 SVGA3dQueryId queryId
;
459 #include "vmware_pack_end.h"
460 SVGA3dCmdDXSetQueryOffset
; /* SVGA_3D_CMD_DX_SET_QUERY_OFFSET */
463 #include "vmware_pack_begin.h"
464 struct SVGA3dCmdDXBeginQuery
{
465 SVGA3dQueryId queryId
;
467 #include "vmware_pack_end.h"
468 SVGA3dCmdDXBeginQuery
; /* SVGA_3D_CMD_DX_QUERY_BEGIN */
471 #include "vmware_pack_begin.h"
472 struct SVGA3dCmdDXEndQuery
{
473 SVGA3dQueryId queryId
;
475 #include "vmware_pack_end.h"
476 SVGA3dCmdDXEndQuery
; /* SVGA_3D_CMD_DX_QUERY_END */
479 #include "vmware_pack_begin.h"
480 struct SVGA3dCmdDXReadbackQuery
{
481 SVGA3dQueryId queryId
;
483 #include "vmware_pack_end.h"
484 SVGA3dCmdDXReadbackQuery
; /* SVGA_3D_CMD_DX_READBACK_QUERY */
487 #include "vmware_pack_begin.h"
488 struct SVGA3dCmdDXMoveQuery
{
489 SVGA3dQueryId queryId
;
493 #include "vmware_pack_end.h"
494 SVGA3dCmdDXMoveQuery
; /* SVGA_3D_CMD_DX_MOVE_QUERY */
497 #include "vmware_pack_begin.h"
498 struct SVGA3dCmdDXBindAllQuery
{
502 #include "vmware_pack_end.h"
503 SVGA3dCmdDXBindAllQuery
; /* SVGA_3D_CMD_DX_BIND_ALL_QUERY */
506 #include "vmware_pack_begin.h"
507 struct SVGA3dCmdDXReadbackAllQuery
{
510 #include "vmware_pack_end.h"
511 SVGA3dCmdDXReadbackAllQuery
; /* SVGA_3D_CMD_DX_READBACK_ALL_QUERY */
514 #include "vmware_pack_begin.h"
515 struct SVGA3dCmdDXSetPredication
{
516 SVGA3dQueryId queryId
;
517 uint32 predicateValue
;
519 #include "vmware_pack_end.h"
520 SVGA3dCmdDXSetPredication
; /* SVGA_3D_CMD_DX_SET_PREDICATION */
523 #include "vmware_pack_begin.h"
524 struct MKS3dDXSOState
{
525 uint32 offset
; /* Starting offset */
526 uint32 intOffset
; /* Internal offset */
527 uint32 vertexCount
; /* vertices written */
528 uint32 sizeInBytes
; /* max bytes to write */
530 #include "vmware_pack_end.h"
533 /* Set the offset field to this value to append SO values to the buffer */
534 #define SVGA3D_DX_SO_OFFSET_APPEND ((uint32) ~0u)
537 #include "vmware_pack_begin.h"
538 struct SVGA3dSoTarget
{
543 #include "vmware_pack_end.h"
547 #include "vmware_pack_begin.h"
548 struct SVGA3dCmdDXSetSOTargets
{
550 /* Followed by a variable number of SVGA3dSOTarget's. */
552 #include "vmware_pack_end.h"
553 SVGA3dCmdDXSetSOTargets
; /* SVGA_3D_CMD_DX_SET_SOTARGETS */
556 #include "vmware_pack_begin.h"
557 struct SVGA3dViewport
566 #include "vmware_pack_end.h"
570 #include "vmware_pack_begin.h"
571 struct SVGA3dCmdDXSetViewports
{
573 /* Followed by a variable number of SVGA3dViewport's. */
575 #include "vmware_pack_end.h"
576 SVGA3dCmdDXSetViewports
; /* SVGA_3D_CMD_DX_SET_VIEWPORTS */
578 #define SVGA3D_DX_MAX_VIEWPORTS 16
581 #include "vmware_pack_begin.h"
582 struct SVGA3dCmdDXSetScissorRects
{
584 /* Followed by a variable number of SVGASignedRect's. */
586 #include "vmware_pack_end.h"
587 SVGA3dCmdDXSetScissorRects
; /* SVGA_3D_CMD_DX_SET_SCISSORRECTS */
589 #define SVGA3D_DX_MAX_SCISSORRECTS 16
592 #include "vmware_pack_begin.h"
593 struct SVGA3dCmdDXClearRenderTargetView
{
594 SVGA3dRenderTargetViewId renderTargetViewId
;
595 SVGA3dRGBAFloat rgba
;
597 #include "vmware_pack_end.h"
598 SVGA3dCmdDXClearRenderTargetView
; /* SVGA_3D_CMD_DX_CLEAR_RENDERTARGET_VIEW */
601 #include "vmware_pack_begin.h"
602 struct SVGA3dCmdDXClearDepthStencilView
{
605 SVGA3dDepthStencilViewId depthStencilViewId
;
608 #include "vmware_pack_end.h"
609 SVGA3dCmdDXClearDepthStencilView
; /* SVGA_3D_CMD_DX_CLEAR_DEPTHSTENCIL_VIEW */
612 #include "vmware_pack_begin.h"
613 struct SVGA3dCmdDXPredCopyRegion
{
614 SVGA3dSurfaceId dstSid
;
615 uint32 dstSubResource
;
616 SVGA3dSurfaceId srcSid
;
617 uint32 srcSubResource
;
620 #include "vmware_pack_end.h"
621 SVGA3dCmdDXPredCopyRegion
;
622 /* SVGA_3D_CMD_DX_PRED_COPY_REGION */
625 #include "vmware_pack_begin.h"
626 struct SVGA3dCmdDXPredCopy
{
627 SVGA3dSurfaceId dstSid
;
628 SVGA3dSurfaceId srcSid
;
630 #include "vmware_pack_end.h"
631 SVGA3dCmdDXPredCopy
; /* SVGA_3D_CMD_DX_PRED_COPY */
634 #include "vmware_pack_begin.h"
635 struct SVGA3dCmdDXPredConvertRegion
{
636 SVGA3dSurfaceId dstSid
;
637 uint32 dstSubResource
;
639 SVGA3dSurfaceId srcSid
;
640 uint32 srcSubResource
;
643 #include "vmware_pack_end.h"
644 SVGA3dCmdDXPredConvertRegion
; /* SVGA_3D_CMD_DX_PRED_CONVERT_REGION */
647 #include "vmware_pack_begin.h"
648 struct SVGA3dCmdDXPredConvert
{
649 SVGA3dSurfaceId dstSid
;
650 SVGA3dSurfaceId srcSid
;
652 #include "vmware_pack_end.h"
653 SVGA3dCmdDXPredConvert
; /* SVGA_3D_CMD_DX_PRED_CONVERT */
656 #include "vmware_pack_begin.h"
657 struct SVGA3dCmdDXBufferCopy
{
658 SVGA3dSurfaceId dest
;
664 #include "vmware_pack_end.h"
665 SVGA3dCmdDXBufferCopy
;
666 /* SVGA_3D_CMD_DX_BUFFER_COPY */
669 * Perform a surface copy between a multisample, and a non-multisampled
673 #include "vmware_pack_begin.h"
675 SVGA3dSurfaceId dstSid
;
676 uint32 dstSubResource
;
677 SVGA3dSurfaceId srcSid
;
678 uint32 srcSubResource
;
679 SVGA3dSurfaceFormat copyFormat
;
681 #include "vmware_pack_end.h"
682 SVGA3dCmdDXResolveCopy
; /* SVGA_3D_CMD_DX_RESOLVE_COPY */
685 * Perform a predicated surface copy between a multisample, and a
686 * non-multisampled surface.
689 #include "vmware_pack_begin.h"
691 SVGA3dSurfaceId dstSid
;
692 uint32 dstSubResource
;
693 SVGA3dSurfaceId srcSid
;
694 uint32 srcSubResource
;
695 SVGA3dSurfaceFormat copyFormat
;
697 #include "vmware_pack_end.h"
698 SVGA3dCmdDXPredResolveCopy
; /* SVGA_3D_CMD_DX_PRED_RESOLVE_COPY */
700 typedef uint32 SVGA3dDXPresentBltMode
;
701 #define SVGADX_PRESENTBLT_LINEAR (1 << 0)
702 #define SVGADX_PRESENTBLT_FORCE_SRC_SRGB (1 << 1)
703 #define SVGADX_PRESENTBLT_FORCE_SRC_XRBIAS (1 << 2)
704 #define SVGADX_PRESENTBLT_MODE_MAX (1 << 3)
707 #include "vmware_pack_begin.h"
708 struct SVGA3dCmdDXPresentBlt
{
709 SVGA3dSurfaceId srcSid
;
710 uint32 srcSubResource
;
711 SVGA3dSurfaceId dstSid
;
712 uint32 destSubResource
;
715 SVGA3dDXPresentBltMode mode
;
717 #include "vmware_pack_end.h"
718 SVGA3dCmdDXPresentBlt
; /* SVGA_3D_CMD_DX_PRESENTBLT*/
721 #include "vmware_pack_begin.h"
722 struct SVGA3dCmdDXGenMips
{
723 SVGA3dShaderResourceViewId shaderResourceViewId
;
725 #include "vmware_pack_end.h"
726 SVGA3dCmdDXGenMips
; /* SVGA_3D_CMD_DX_GENMIPS */
729 * Update a sub-resource in a guest-backed resource.
730 * (Inform the device that the guest-contents have been updated.)
733 #include "vmware_pack_begin.h"
734 struct SVGA3dCmdDXUpdateSubResource
{
739 #include "vmware_pack_end.h"
740 SVGA3dCmdDXUpdateSubResource
; /* SVGA_3D_CMD_DX_UPDATE_SUBRESOURCE */
743 * Readback a subresource in a guest-backed resource.
744 * (Request the device to flush the dirty contents into the guest.)
747 #include "vmware_pack_begin.h"
748 struct SVGA3dCmdDXReadbackSubResource
{
752 #include "vmware_pack_end.h"
753 SVGA3dCmdDXReadbackSubResource
; /* SVGA_3D_CMD_DX_READBACK_SUBRESOURCE */
756 * Invalidate an image in a guest-backed surface.
757 * (Notify the device that the contents can be lost.)
760 #include "vmware_pack_begin.h"
761 struct SVGA3dCmdDXInvalidateSubResource
{
765 #include "vmware_pack_end.h"
766 SVGA3dCmdDXInvalidateSubResource
; /* SVGA_3D_CMD_DX_INVALIDATE_SUBRESOURCE */
770 * Raw byte wise transfer from a buffer surface into another surface
771 * of the requested box. Supported if 3d is enabled and SVGA_CAP_DX
772 * is set. This command does not take a context.
775 #include "vmware_pack_begin.h"
776 struct SVGA3dCmdDXTransferFromBuffer
{
777 SVGA3dSurfaceId srcSid
;
780 uint32 srcSlicePitch
;
781 SVGA3dSurfaceId destSid
;
782 uint32 destSubResource
;
785 #include "vmware_pack_end.h"
786 SVGA3dCmdDXTransferFromBuffer
; /* SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER */
790 * Raw byte wise transfer from a buffer surface into another surface
791 * of the requested box. Supported if SVGA3D_DEVCAP_DXCONTEXT is set.
792 * The context is implied from the command buffer header.
795 #include "vmware_pack_begin.h"
796 struct SVGA3dCmdDXPredTransferFromBuffer
{
797 SVGA3dSurfaceId srcSid
;
800 uint32 srcSlicePitch
;
801 SVGA3dSurfaceId destSid
;
802 uint32 destSubResource
;
805 #include "vmware_pack_end.h"
806 SVGA3dCmdDXPredTransferFromBuffer
;
807 /* SVGA_3D_CMD_DX_PRED_TRANSFER_FROM_BUFFER */
811 #include "vmware_pack_begin.h"
812 struct SVGA3dCmdDXSurfaceCopyAndReadback
{
813 SVGA3dSurfaceId srcSid
;
814 SVGA3dSurfaceId destSid
;
817 #include "vmware_pack_end.h"
818 SVGA3dCmdDXSurfaceCopyAndReadback
;
819 /* SVGA_3D_CMD_DX_SURFACE_COPY_AND_READBACK */
822 * SVGA_DX_HINT_NONE: Does nothing.
824 * SVGA_DX_HINT_PREFETCH_OBJECT:
825 * SVGA_DX_HINT_PREEVICT_OBJECT:
826 * Consumes a SVGAObjectRef, and hints that the host should consider
827 * fetching/evicting the specified object.
829 * An id of SVGA3D_INVALID_ID can be used if the guest isn't sure
830 * what object was affected. (For instance, if the guest knows that
831 * it is about to evict a DXShader, but doesn't know precisely which one,
832 * the device can still use this to help limit it's search, or track
833 * how many page-outs have happened.)
835 * SVGA_DX_HINT_PREFETCH_COBJECT:
836 * SVGA_DX_HINT_PREEVICT_COBJECT:
837 * Same as the above, except they consume an SVGACObjectRef.
839 typedef uint32 SVGADXHintId
;
840 #define SVGA_DX_HINT_NONE 0
841 #define SVGA_DX_HINT_PREFETCH_OBJECT 1
842 #define SVGA_DX_HINT_PREEVICT_OBJECT 2
843 #define SVGA_DX_HINT_PREFETCH_COBJECT 3
844 #define SVGA_DX_HINT_PREEVICT_COBJECT 4
845 #define SVGA_DX_HINT_MAX 5
848 #include "vmware_pack_begin.h"
849 struct SVGAObjectRef
{
853 #include "vmware_pack_end.h"
857 #include "vmware_pack_begin.h"
858 struct SVGACObjectRef
{
859 SVGACOTableType type
;
863 #include "vmware_pack_end.h"
867 #include "vmware_pack_begin.h"
868 struct SVGA3dCmdDXHint
{
872 * Followed by variable sized data depending on the hintId.
875 #include "vmware_pack_end.h"
877 /* SVGA_3D_CMD_DX_HINT */
880 #include "vmware_pack_begin.h"
881 struct SVGA3dCmdDXBufferUpdate
{
886 #include "vmware_pack_end.h"
887 SVGA3dCmdDXBufferUpdate
;
888 /* SVGA_3D_CMD_DX_BUFFER_UPDATE */
891 #include "vmware_pack_begin.h"
892 struct SVGA3dCmdDXSetConstantBufferOffset
{
894 uint32 offsetInBytes
;
896 #include "vmware_pack_end.h"
897 SVGA3dCmdDXSetConstantBufferOffset
;
899 typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetVSConstantBufferOffset
;
900 /* SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET */
902 typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetPSConstantBufferOffset
;
903 /* SVGA_3D_CMD_DX_SET_PS_CONSTANT_BUFFER_OFFSET */
905 typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetGSConstantBufferOffset
;
906 /* SVGA_3D_CMD_DX_SET_GS_CONSTANT_BUFFER_OFFSET */
910 #include "vmware_pack_begin.h"
920 uint32 mostDetailedMip
;
921 uint32 firstArraySlice
;
924 } tex
; /* 1d, 2d, 3d, cube */
933 #include "vmware_pack_end.h"
934 SVGA3dShaderResourceViewDesc
;
937 #include "vmware_pack_begin.h"
940 SVGA3dSurfaceFormat format
;
941 SVGA3dResourceType resourceDimension
;
942 SVGA3dShaderResourceViewDesc desc
;
945 #include "vmware_pack_end.h"
946 SVGACOTableDXSRViewEntry
;
949 #include "vmware_pack_begin.h"
950 struct SVGA3dCmdDXDefineShaderResourceView
{
951 SVGA3dShaderResourceViewId shaderResourceViewId
;
954 SVGA3dSurfaceFormat format
;
955 SVGA3dResourceType resourceDimension
;
957 SVGA3dShaderResourceViewDesc desc
;
959 #include "vmware_pack_end.h"
960 SVGA3dCmdDXDefineShaderResourceView
;
961 /* SVGA_3D_CMD_DX_DEFINE_SHADERRESOURCE_VIEW */
964 #include "vmware_pack_begin.h"
965 struct SVGA3dCmdDXDestroyShaderResourceView
{
966 SVGA3dShaderResourceViewId shaderResourceViewId
;
968 #include "vmware_pack_end.h"
969 SVGA3dCmdDXDestroyShaderResourceView
;
970 /* SVGA_3D_CMD_DX_DESTROY_SHADERRESOURCE_VIEW */
973 #include "vmware_pack_begin.h"
974 struct SVGA3dRenderTargetViewDesc
{
983 uint32 firstArraySlice
;
985 } tex
; /* 1d, 2d, cube */
993 #include "vmware_pack_end.h"
994 SVGA3dRenderTargetViewDesc
;
997 #include "vmware_pack_begin.h"
1000 SVGA3dSurfaceFormat format
;
1001 SVGA3dResourceType resourceDimension
;
1002 SVGA3dRenderTargetViewDesc desc
;
1005 #include "vmware_pack_end.h"
1006 SVGACOTableDXRTViewEntry
;
1009 #include "vmware_pack_begin.h"
1010 struct SVGA3dCmdDXDefineRenderTargetView
{
1011 SVGA3dRenderTargetViewId renderTargetViewId
;
1013 SVGA3dSurfaceId sid
;
1014 SVGA3dSurfaceFormat format
;
1015 SVGA3dResourceType resourceDimension
;
1017 SVGA3dRenderTargetViewDesc desc
;
1019 #include "vmware_pack_end.h"
1020 SVGA3dCmdDXDefineRenderTargetView
;
1021 /* SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW */
1024 #include "vmware_pack_begin.h"
1025 struct SVGA3dCmdDXDestroyRenderTargetView
{
1026 SVGA3dRenderTargetViewId renderTargetViewId
;
1028 #include "vmware_pack_end.h"
1029 SVGA3dCmdDXDestroyRenderTargetView
;
1030 /* SVGA_3D_CMD_DX_DESTROY_RENDERTARGET_VIEW */
1034 #define SVGA3D_DXDSVIEW_CREATE_READ_ONLY_DEPTH 0x01
1035 #define SVGA3D_DXDSVIEW_CREATE_READ_ONLY_STENCIL 0x02
1036 #define SVGA3D_DXDSVIEW_CREATE_FLAG_MASK 0x03
1037 typedef uint8 SVGA3DCreateDSViewFlags
;
1040 #include "vmware_pack_begin.h"
1042 SVGA3dSurfaceId sid
;
1043 SVGA3dSurfaceFormat format
;
1044 SVGA3dResourceType resourceDimension
;
1046 uint32 firstArraySlice
;
1048 SVGA3DCreateDSViewFlags flags
;
1053 #include "vmware_pack_end.h"
1054 SVGACOTableDXDSViewEntry
;
1057 #include "vmware_pack_begin.h"
1058 struct SVGA3dCmdDXDefineDepthStencilView
{
1059 SVGA3dDepthStencilViewId depthStencilViewId
;
1061 SVGA3dSurfaceId sid
;
1062 SVGA3dSurfaceFormat format
;
1063 SVGA3dResourceType resourceDimension
;
1065 uint32 firstArraySlice
;
1067 SVGA3DCreateDSViewFlags flags
;
1071 #include "vmware_pack_end.h"
1072 SVGA3dCmdDXDefineDepthStencilView
;
1073 /* SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW */
1076 #include "vmware_pack_begin.h"
1077 struct SVGA3dCmdDXDestroyDepthStencilView
{
1078 SVGA3dDepthStencilViewId depthStencilViewId
;
1080 #include "vmware_pack_end.h"
1081 SVGA3dCmdDXDestroyDepthStencilView
;
1082 /* SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_VIEW */
1085 #include "vmware_pack_begin.h"
1086 struct SVGA3dInputElementDesc
{
1088 uint32 alignedByteOffset
;
1089 SVGA3dSurfaceFormat format
;
1090 SVGA3dInputClassification inputSlotClass
;
1091 uint32 instanceDataStepRate
;
1092 uint32 inputRegister
;
1094 #include "vmware_pack_end.h"
1095 SVGA3dInputElementDesc
;
1098 #include "vmware_pack_begin.h"
1102 SVGA3dInputElementDesc desc
[32];
1105 #include "vmware_pack_end.h"
1106 SVGACOTableDXElementLayoutEntry
;
1109 #include "vmware_pack_begin.h"
1110 struct SVGA3dCmdDXDefineElementLayout
{
1111 SVGA3dElementLayoutId elementLayoutId
;
1112 /* Followed by a variable number of SVGA3dInputElementDesc's. */
1114 #include "vmware_pack_end.h"
1115 SVGA3dCmdDXDefineElementLayout
;
1116 /* SVGA_3D_CMD_DX_DEFINE_ELEMENTLAYOUT */
1119 #include "vmware_pack_begin.h"
1120 struct SVGA3dCmdDXDestroyElementLayout
{
1121 SVGA3dElementLayoutId elementLayoutId
;
1123 #include "vmware_pack_end.h"
1124 SVGA3dCmdDXDestroyElementLayout
;
1125 /* SVGA_3D_CMD_DX_DESTROY_ELEMENTLAYOUT */
1128 #define SVGA3D_DX_MAX_RENDER_TARGETS 8
1131 #include "vmware_pack_begin.h"
1132 struct SVGA3dDXBlendStatePerRT
{
1137 uint8 srcBlendAlpha
;
1138 uint8 destBlendAlpha
;
1140 SVGA3dColorWriteEnable renderTargetWriteMask
;
1141 uint8 logicOpEnable
;
1145 #include "vmware_pack_end.h"
1146 SVGA3dDXBlendStatePerRT
;
1149 #include "vmware_pack_begin.h"
1151 uint8 alphaToCoverageEnable
;
1152 uint8 independentBlendEnable
;
1154 SVGA3dDXBlendStatePerRT perRT
[SVGA3D_MAX_RENDER_TARGETS
];
1157 #include "vmware_pack_end.h"
1158 SVGACOTableDXBlendStateEntry
;
1163 #include "vmware_pack_begin.h"
1164 struct SVGA3dCmdDXDefineBlendState
{
1165 SVGA3dBlendStateId blendId
;
1166 uint8 alphaToCoverageEnable
;
1167 uint8 independentBlendEnable
;
1169 SVGA3dDXBlendStatePerRT perRT
[SVGA3D_MAX_RENDER_TARGETS
];
1171 #include "vmware_pack_end.h"
1172 SVGA3dCmdDXDefineBlendState
; /* SVGA_3D_CMD_DX_DEFINE_BLEND_STATE */
1175 #include "vmware_pack_begin.h"
1176 struct SVGA3dCmdDXDestroyBlendState
{
1177 SVGA3dBlendStateId blendId
;
1179 #include "vmware_pack_end.h"
1180 SVGA3dCmdDXDestroyBlendState
; /* SVGA_3D_CMD_DX_DESTROY_BLEND_STATE */
1183 #include "vmware_pack_begin.h"
1186 SVGA3dDepthWriteMask depthWriteMask
;
1187 SVGA3dComparisonFunc depthFunc
;
1188 uint8 stencilEnable
;
1191 uint8 stencilReadMask
;
1192 uint8 stencilWriteMask
;
1194 uint8 frontStencilFailOp
;
1195 uint8 frontStencilDepthFailOp
;
1196 uint8 frontStencilPassOp
;
1197 SVGA3dComparisonFunc frontStencilFunc
;
1199 uint8 backStencilFailOp
;
1200 uint8 backStencilDepthFailOp
;
1201 uint8 backStencilPassOp
;
1202 SVGA3dComparisonFunc backStencilFunc
;
1204 #include "vmware_pack_end.h"
1205 SVGACOTableDXDepthStencilEntry
;
1210 #include "vmware_pack_begin.h"
1211 struct SVGA3dCmdDXDefineDepthStencilState
{
1212 SVGA3dDepthStencilStateId depthStencilId
;
1215 SVGA3dDepthWriteMask depthWriteMask
;
1216 SVGA3dComparisonFunc depthFunc
;
1217 uint8 stencilEnable
;
1220 uint8 stencilReadMask
;
1221 uint8 stencilWriteMask
;
1223 uint8 frontStencilFailOp
;
1224 uint8 frontStencilDepthFailOp
;
1225 uint8 frontStencilPassOp
;
1226 SVGA3dComparisonFunc frontStencilFunc
;
1228 uint8 backStencilFailOp
;
1229 uint8 backStencilDepthFailOp
;
1230 uint8 backStencilPassOp
;
1231 SVGA3dComparisonFunc backStencilFunc
;
1233 #include "vmware_pack_end.h"
1234 SVGA3dCmdDXDefineDepthStencilState
;
1235 /* SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_STATE */
1238 #include "vmware_pack_begin.h"
1239 struct SVGA3dCmdDXDestroyDepthStencilState
{
1240 SVGA3dDepthStencilStateId depthStencilId
;
1242 #include "vmware_pack_end.h"
1243 SVGA3dCmdDXDestroyDepthStencilState
;
1244 /* SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_STATE */
1247 #include "vmware_pack_begin.h"
1250 SVGA3dCullMode cullMode
;
1251 uint8 frontCounterClockwise
;
1252 uint8 provokingVertexLast
;
1254 float depthBiasClamp
;
1255 float slopeScaledDepthBias
;
1256 uint8 depthClipEnable
;
1257 uint8 scissorEnable
;
1258 SVGA3dMultisampleRastEnable multisampleEnable
;
1259 uint8 antialiasedLineEnable
;
1261 uint8 lineStippleEnable
;
1262 uint8 lineStippleFactor
;
1263 uint16 lineStipplePattern
;
1264 uint32 forcedSampleCount
;
1266 #include "vmware_pack_end.h"
1267 SVGACOTableDXRasterizerStateEntry
;
1272 #include "vmware_pack_begin.h"
1273 struct SVGA3dCmdDXDefineRasterizerState
{
1274 SVGA3dRasterizerStateId rasterizerId
;
1277 SVGA3dCullMode cullMode
;
1278 uint8 frontCounterClockwise
;
1279 uint8 provokingVertexLast
;
1281 float depthBiasClamp
;
1282 float slopeScaledDepthBias
;
1283 uint8 depthClipEnable
;
1284 uint8 scissorEnable
;
1285 SVGA3dMultisampleRastEnable multisampleEnable
;
1286 uint8 antialiasedLineEnable
;
1288 uint8 lineStippleEnable
;
1289 uint8 lineStippleFactor
;
1290 uint16 lineStipplePattern
;
1292 #include "vmware_pack_end.h"
1293 SVGA3dCmdDXDefineRasterizerState
;
1294 /* SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE */
1297 #include "vmware_pack_begin.h"
1298 struct SVGA3dCmdDXDestroyRasterizerState
{
1299 SVGA3dRasterizerStateId rasterizerId
;
1301 #include "vmware_pack_end.h"
1302 SVGA3dCmdDXDestroyRasterizerState
;
1303 /* SVGA_3D_CMD_DX_DESTROY_RASTERIZER_STATE */
1306 #include "vmware_pack_begin.h"
1308 SVGA3dFilter filter
;
1314 uint8 maxAnisotropy
;
1315 SVGA3dComparisonFunc comparisonFunc
;
1317 SVGA3dRGBAFloat borderColor
;
1322 #include "vmware_pack_end.h"
1323 SVGACOTableDXSamplerEntry
;
1328 #include "vmware_pack_begin.h"
1329 struct SVGA3dCmdDXDefineSamplerState
{
1330 SVGA3dSamplerId samplerId
;
1331 SVGA3dFilter filter
;
1337 uint8 maxAnisotropy
;
1338 SVGA3dComparisonFunc comparisonFunc
;
1340 SVGA3dRGBAFloat borderColor
;
1344 #include "vmware_pack_end.h"
1345 SVGA3dCmdDXDefineSamplerState
; /* SVGA_3D_CMD_DX_DEFINE_SAMPLER_STATE */
1348 #include "vmware_pack_begin.h"
1349 struct SVGA3dCmdDXDestroySamplerState
{
1350 SVGA3dSamplerId samplerId
;
1352 #include "vmware_pack_end.h"
1353 SVGA3dCmdDXDestroySamplerState
; /* SVGA_3D_CMD_DX_DESTROY_SAMPLER_STATE */
1356 #include "vmware_pack_begin.h"
1357 struct SVGA3dCmdDXDefineShader
{
1358 SVGA3dShaderId shaderId
;
1359 SVGA3dShaderType type
;
1360 uint32 sizeInBytes
; /* Number of bytes of shader text. */
1362 #include "vmware_pack_end.h"
1363 SVGA3dCmdDXDefineShader
; /* SVGA_3D_CMD_DX_DEFINE_SHADER */
1366 #include "vmware_pack_begin.h"
1367 struct SVGACOTableDXShaderEntry
{
1368 SVGA3dShaderType type
;
1370 uint32 offsetInBytes
;
1374 #include "vmware_pack_end.h"
1375 SVGACOTableDXShaderEntry
;
1378 #include "vmware_pack_begin.h"
1379 struct SVGA3dCmdDXDestroyShader
{
1380 SVGA3dShaderId shaderId
;
1382 #include "vmware_pack_end.h"
1383 SVGA3dCmdDXDestroyShader
; /* SVGA_3D_CMD_DX_DESTROY_SHADER */
1386 #include "vmware_pack_begin.h"
1387 struct SVGA3dCmdDXBindShader
{
1391 uint32 offsetInBytes
;
1393 #include "vmware_pack_end.h"
1394 SVGA3dCmdDXBindShader
; /* SVGA_3D_CMD_DX_BIND_SHADER */
1397 #include "vmware_pack_begin.h"
1398 struct SVGA3dCmdDXBindAllShader
{
1402 #include "vmware_pack_end.h"
1403 SVGA3dCmdDXBindAllShader
; /* SVGA_3D_CMD_DX_BIND_ALL_SHADER */
1406 #include "vmware_pack_begin.h"
1407 struct SVGA3dCmdDXCondBindAllShader
{
1409 SVGAMobId testMobid
;
1412 #include "vmware_pack_end.h"
1413 SVGA3dCmdDXCondBindAllShader
; /* SVGA_3D_CMD_DX_COND_BIND_ALL_SHADER */
1416 * The maximum number of streamout decl's in each streamout entry.
1418 #define SVGA3D_MAX_STREAMOUT_DECLS 64
1421 #include "vmware_pack_begin.h"
1422 struct SVGA3dStreamOutputDeclarationEntry
{
1424 uint32 registerIndex
;
1430 #include "vmware_pack_end.h"
1431 SVGA3dStreamOutputDeclarationEntry
;
1434 #include "vmware_pack_begin.h"
1435 struct SVGAOTableStreamOutputEntry
{
1436 uint32 numOutputStreamEntries
;
1437 SVGA3dStreamOutputDeclarationEntry decl
[SVGA3D_MAX_STREAMOUT_DECLS
];
1438 uint32 streamOutputStrideInBytes
[SVGA3D_DX_MAX_SOTARGETS
];
1439 uint32 rasterizedStream
;
1442 #include "vmware_pack_end.h"
1443 SVGACOTableDXStreamOutputEntry
;
1446 #include "vmware_pack_begin.h"
1447 struct SVGA3dCmdDXDefineStreamOutput
{
1448 SVGA3dStreamOutputId soid
;
1449 uint32 numOutputStreamEntries
;
1450 SVGA3dStreamOutputDeclarationEntry decl
[SVGA3D_MAX_STREAMOUT_DECLS
];
1451 uint32 streamOutputStrideInBytes
[SVGA3D_DX_MAX_SOTARGETS
];
1452 uint32 rasterizedStream
;
1454 #include "vmware_pack_end.h"
1455 SVGA3dCmdDXDefineStreamOutput
; /* SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT */
1458 #include "vmware_pack_begin.h"
1459 struct SVGA3dCmdDXDestroyStreamOutput
{
1460 SVGA3dStreamOutputId soid
;
1462 #include "vmware_pack_end.h"
1463 SVGA3dCmdDXDestroyStreamOutput
; /* SVGA_3D_CMD_DX_DESTROY_STREAMOUTPUT */
1466 #include "vmware_pack_begin.h"
1467 struct SVGA3dCmdDXSetStreamOutput
{
1468 SVGA3dStreamOutputId soid
;
1470 #include "vmware_pack_end.h"
1471 SVGA3dCmdDXSetStreamOutput
; /* SVGA_3D_CMD_DX_SET_STREAMOUTPUT */
1474 #include "vmware_pack_begin.h"
1480 #include "vmware_pack_end.h"
1481 SVGA3dCmdDXMobFence64
; /* SVGA_3D_CMD_DX_MOB_FENCE_64 */
1484 * SVGA3dCmdSetCOTable --
1486 * This command allows the guest to bind a mob to a context-object table.
1489 #include "vmware_pack_begin.h"
1490 struct SVGA3dCmdDXSetCOTable
{
1493 SVGACOTableType type
;
1494 uint32 validSizeInBytes
;
1496 #include "vmware_pack_end.h"
1497 SVGA3dCmdDXSetCOTable
; /* SVGA_3D_CMD_DX_SET_COTABLE */
1500 * Guests using SVGA_3D_CMD_DX_GROW_COTABLE are promising that
1501 * the new COTable contains the same contents as the old one, except possibly
1502 * for some new invalid entries at the end.
1504 * If there is an old cotable mob bound, it also has to still be valid.
1506 * (Otherwise, guests should use the DXSetCOTableBase command.)
1509 #include "vmware_pack_begin.h"
1510 struct SVGA3dCmdDXGrowCOTable
{
1513 SVGACOTableType type
;
1514 uint32 validSizeInBytes
;
1516 #include "vmware_pack_end.h"
1517 SVGA3dCmdDXGrowCOTable
; /* SVGA_3D_CMD_DX_GROW_COTABLE */
1520 #include "vmware_pack_begin.h"
1521 struct SVGA3dCmdDXReadbackCOTable
{
1523 SVGACOTableType type
;
1525 #include "vmware_pack_end.h"
1526 SVGA3dCmdDXReadbackCOTable
; /* SVGA_3D_CMD_DX_READBACK_COTABLE */
1529 #include "vmware_pack_begin.h"
1530 struct SVGA3dCOTableData
{
1533 #include "vmware_pack_end.h"
1537 #include "vmware_pack_begin.h"
1538 struct SVGA3dBufferBinding
{
1543 #include "vmware_pack_end.h"
1544 SVGA3dBufferBinding
;
1547 #include "vmware_pack_begin.h"
1548 struct SVGA3dConstantBufferBinding
{
1550 uint32 offsetInBytes
;
1553 #include "vmware_pack_end.h"
1554 SVGA3dConstantBufferBinding
;
1557 #include "vmware_pack_begin.h"
1558 struct SVGADXInputAssemblyMobFormat
{
1560 SVGA3dBufferBinding vertexBuffers
[SVGA3D_DX_MAX_VERTEXBUFFERS
];
1561 uint32 indexBufferSid
;
1563 uint32 indexBufferOffset
;
1564 uint32 indexBufferFormat
;
1567 #include "vmware_pack_end.h"
1568 SVGADXInputAssemblyMobFormat
;
1571 #include "vmware_pack_begin.h"
1572 struct SVGADXContextMobFormat
{
1573 SVGADXInputAssemblyMobFormat inputAssembly
;
1576 uint32 blendStateId
;
1577 uint32 blendFactor
[4];
1579 uint32 depthStencilStateId
;
1581 uint32 rasterizerStateId
;
1582 uint32 depthStencilViewId
;
1583 uint32 renderTargetViewIds
[SVGA3D_MAX_SIMULTANEOUS_RENDER_TARGETS
];
1584 uint32 unorderedAccessViewIds
[SVGA3D_MAX_UAVIEWS
];
1588 uint32 targets
[SVGA3D_DX_MAX_SOTARGETS
];
1594 uint8 numScissorRects
;
1599 SVGA3dViewport viewports
[SVGA3D_DX_MAX_VIEWPORTS
];
1602 SVGASignedRect scissorRects
[SVGA3D_DX_MAX_SCISSORRECTS
];
1613 SVGA3dConstantBufferBinding constantBuffers
[SVGA3D_DX_MAX_CONSTBUFFERS
];
1614 uint32 shaderResources
[SVGA3D_DX_MAX_SRVIEWS
];
1615 uint32 samplers
[SVGA3D_DX_MAX_SAMPLERS
];
1616 } shaderState
[SVGA3D_NUM_SHADERTYPE
];
1619 SVGA3dQueryId queryID
[SVGA3D_MAX_QUERY
];
1621 SVGA3dCOTableData cotables
[SVGA_COTABLE_MAX
];
1624 #include "vmware_pack_end.h"
1625 SVGADXContextMobFormat
;
1628 #include "vmware_pack_begin.h"
1629 struct SVGA3dCmdDXTempSetContext
{
1632 #include "vmware_pack_end.h"
1633 SVGA3dCmdDXTempSetContext
; /* SVGA_3D_CMD_DX_TEMP_SET_CONTEXT */
1635 #endif /* _SVGA3D_DX_H_ */