1*b05fa564SZack Rusin /* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2*b05fa564SZack Rusin /* 3ebc9ac7cSZack Rusin * Copyright 2012-2021 VMware, Inc. 48ce75f8aSSinclair Yeh * 58ce75f8aSSinclair Yeh * Permission is hereby granted, free of charge, to any person 68ce75f8aSSinclair Yeh * obtaining a copy of this software and associated documentation 78ce75f8aSSinclair Yeh * files (the "Software"), to deal in the Software without 88ce75f8aSSinclair Yeh * restriction, including without limitation the rights to use, copy, 98ce75f8aSSinclair Yeh * modify, merge, publish, distribute, sublicense, and/or sell copies 108ce75f8aSSinclair Yeh * of the Software, and to permit persons to whom the Software is 118ce75f8aSSinclair Yeh * furnished to do so, subject to the following conditions: 128ce75f8aSSinclair Yeh * 138ce75f8aSSinclair Yeh * The above copyright notice and this permission notice shall be 148ce75f8aSSinclair Yeh * included in all copies or substantial portions of the Software. 158ce75f8aSSinclair Yeh * 168ce75f8aSSinclair Yeh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 178ce75f8aSSinclair Yeh * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 188ce75f8aSSinclair Yeh * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 198ce75f8aSSinclair Yeh * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 208ce75f8aSSinclair Yeh * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 218ce75f8aSSinclair Yeh * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 228ce75f8aSSinclair Yeh * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 238ce75f8aSSinclair Yeh * SOFTWARE. 248ce75f8aSSinclair Yeh * 25*b05fa564SZack Rusin */ 268ce75f8aSSinclair Yeh 278ce75f8aSSinclair Yeh /* 288ce75f8aSSinclair Yeh * svga3d_dx.h -- 298ce75f8aSSinclair Yeh * 308ce75f8aSSinclair Yeh * SVGA 3d hardware definitions for DX10 support. 318ce75f8aSSinclair Yeh */ 328ce75f8aSSinclair Yeh 33ebc9ac7cSZack Rusin 34ebc9ac7cSZack Rusin 358ce75f8aSSinclair Yeh #ifndef _SVGA3D_DX_H_ 368ce75f8aSSinclair Yeh #define _SVGA3D_DX_H_ 378ce75f8aSSinclair Yeh 38ebc9ac7cSZack Rusin #include "svga_reg.h" 398ce75f8aSSinclair Yeh #include "svga3d_limits.h" 40ebc9ac7cSZack Rusin #include "svga3d_types.h" 418ce75f8aSSinclair Yeh 428ce75f8aSSinclair Yeh #define SVGA3D_INPUT_MIN 0 438ce75f8aSSinclair Yeh #define SVGA3D_INPUT_PER_VERTEX_DATA 0 448ce75f8aSSinclair Yeh #define SVGA3D_INPUT_PER_INSTANCE_DATA 1 458ce75f8aSSinclair Yeh #define SVGA3D_INPUT_MAX 2 468ce75f8aSSinclair Yeh typedef uint32 SVGA3dInputClassification; 478ce75f8aSSinclair Yeh 48dc75e733SDeepak Rawat #define SVGA3D_COLOR_WRITE_ENABLE_RED (1 << 0) 49dc75e733SDeepak Rawat #define SVGA3D_COLOR_WRITE_ENABLE_GREEN (1 << 1) 50dc75e733SDeepak Rawat #define SVGA3D_COLOR_WRITE_ENABLE_BLUE (1 << 2) 51dc75e733SDeepak Rawat #define SVGA3D_COLOR_WRITE_ENABLE_ALPHA (1 << 3) 52ebc9ac7cSZack Rusin #define SVGA3D_COLOR_WRITE_ENABLE_ALL \ 53ebc9ac7cSZack Rusin (SVGA3D_COLOR_WRITE_ENABLE_RED | SVGA3D_COLOR_WRITE_ENABLE_GREEN | \ 54ebc9ac7cSZack Rusin SVGA3D_COLOR_WRITE_ENABLE_BLUE | SVGA3D_COLOR_WRITE_ENABLE_ALPHA) 55dc75e733SDeepak Rawat typedef uint8 SVGA3dColorWriteEnable; 56dc75e733SDeepak Rawat 578ce75f8aSSinclair Yeh #define SVGA3D_DEPTH_WRITE_MASK_ZERO 0 588ce75f8aSSinclair Yeh #define SVGA3D_DEPTH_WRITE_MASK_ALL 1 598ce75f8aSSinclair Yeh typedef uint8 SVGA3dDepthWriteMask; 608ce75f8aSSinclair Yeh 618ce75f8aSSinclair Yeh #define SVGA3D_FILTER_MIP_LINEAR (1 << 0) 628ce75f8aSSinclair Yeh #define SVGA3D_FILTER_MAG_LINEAR (1 << 2) 638ce75f8aSSinclair Yeh #define SVGA3D_FILTER_MIN_LINEAR (1 << 4) 648ce75f8aSSinclair Yeh #define SVGA3D_FILTER_ANISOTROPIC (1 << 6) 658ce75f8aSSinclair Yeh #define SVGA3D_FILTER_COMPARE (1 << 7) 668ce75f8aSSinclair Yeh typedef uint32 SVGA3dFilter; 678ce75f8aSSinclair Yeh 688ce75f8aSSinclair Yeh #define SVGA3D_CULL_INVALID 0 698ce75f8aSSinclair Yeh #define SVGA3D_CULL_MIN 1 708ce75f8aSSinclair Yeh #define SVGA3D_CULL_NONE 1 718ce75f8aSSinclair Yeh #define SVGA3D_CULL_FRONT 2 728ce75f8aSSinclair Yeh #define SVGA3D_CULL_BACK 3 738ce75f8aSSinclair Yeh #define SVGA3D_CULL_MAX 4 748ce75f8aSSinclair Yeh typedef uint8 SVGA3dCullMode; 758ce75f8aSSinclair Yeh 768ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_INVALID 0 778ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_MIN 1 788ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_NEVER 1 798ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_LESS 2 808ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_EQUAL 3 818ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_LESS_EQUAL 4 828ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_GREATER 5 838ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_NOT_EQUAL 6 848ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_GREATER_EQUAL 7 858ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_ALWAYS 8 868ce75f8aSSinclair Yeh #define SVGA3D_COMPARISON_MAX 9 878ce75f8aSSinclair Yeh typedef uint8 SVGA3dComparisonFunc; 888ce75f8aSSinclair Yeh 89dc75e733SDeepak Rawat #define SVGA3D_MULTISAMPLE_RAST_DISABLE 0 90dc75e733SDeepak Rawat #define SVGA3D_MULTISAMPLE_RAST_ENABLE 1 91dc75e733SDeepak Rawat #define SVGA3D_MULTISAMPLE_RAST_DX_MAX 1 92dc75e733SDeepak Rawat #define SVGA3D_MULTISAMPLE_RAST_DISABLE_LINE 2 93dc75e733SDeepak Rawat #define SVGA3D_MULTISAMPLE_RAST_MAX 2 94dc75e733SDeepak Rawat typedef uint8 SVGA3dMultisampleRastEnable; 95dc75e733SDeepak Rawat 968ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_VERTEXBUFFERS 32 97dc75e733SDeepak Rawat #define SVGA3D_DX_MAX_VERTEXINPUTREGISTERS 16 98dc75e733SDeepak Rawat #define SVGA3D_DX_SM41_MAX_VERTEXINPUTREGISTERS 32 998ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_SOTARGETS 4 1008ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_SRVIEWS 128 1018ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_CONSTBUFFERS 16 1028ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_SAMPLERS 16 1030651dfabSDeepak Rawat #define SVGA3D_DX_MAX_CLASS_INSTANCES 253 1048ce75f8aSSinclair Yeh 105dc75e733SDeepak Rawat #define SVGA3D_DX_MAX_CONSTBUF_BINDING_SIZE (4096 * 4 * (uint32)sizeof(uint32)) 1068ce75f8aSSinclair Yeh 1078ce75f8aSSinclair Yeh typedef uint32 SVGA3dShaderResourceViewId; 1088ce75f8aSSinclair Yeh typedef uint32 SVGA3dRenderTargetViewId; 1098ce75f8aSSinclair Yeh typedef uint32 SVGA3dDepthStencilViewId; 1100651dfabSDeepak Rawat typedef uint32 SVGA3dUAViewId; 1118ce75f8aSSinclair Yeh 1128ce75f8aSSinclair Yeh typedef uint32 SVGA3dShaderId; 1138ce75f8aSSinclair Yeh typedef uint32 SVGA3dElementLayoutId; 1148ce75f8aSSinclair Yeh typedef uint32 SVGA3dSamplerId; 1158ce75f8aSSinclair Yeh typedef uint32 SVGA3dBlendStateId; 1168ce75f8aSSinclair Yeh typedef uint32 SVGA3dDepthStencilStateId; 1178ce75f8aSSinclair Yeh typedef uint32 SVGA3dRasterizerStateId; 1188ce75f8aSSinclair Yeh typedef uint32 SVGA3dQueryId; 1198ce75f8aSSinclair Yeh typedef uint32 SVGA3dStreamOutputId; 1208ce75f8aSSinclair Yeh 1218ce75f8aSSinclair Yeh typedef union { 1228ce75f8aSSinclair Yeh struct { 1230651dfabSDeepak Rawat uint32 r; 1240651dfabSDeepak Rawat uint32 g; 1250651dfabSDeepak Rawat uint32 b; 1260651dfabSDeepak Rawat uint32 a; 1270651dfabSDeepak Rawat }; 1280651dfabSDeepak Rawat 1290651dfabSDeepak Rawat uint32 value[4]; 1300651dfabSDeepak Rawat } SVGA3dRGBAUint32; 1310651dfabSDeepak Rawat 132ebc9ac7cSZack Rusin #pragma pack(push, 1) 133ebc9ac7cSZack Rusin typedef struct { 1348ce75f8aSSinclair Yeh uint32 cid; 1358ce75f8aSSinclair Yeh SVGAMobId mobid; 136ebc9ac7cSZack Rusin } SVGAOTableDXContextEntry; 137ebc9ac7cSZack Rusin #pragma pack(pop) 1388ce75f8aSSinclair Yeh 139ebc9ac7cSZack Rusin #pragma pack(push, 1) 140ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineContext { 1418ce75f8aSSinclair Yeh uint32 cid; 142ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineContext; 143ebc9ac7cSZack Rusin #pragma pack(pop) 1448ce75f8aSSinclair Yeh 145ebc9ac7cSZack Rusin #pragma pack(push, 1) 146ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyContext { 1478ce75f8aSSinclair Yeh uint32 cid; 148ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyContext; 149ebc9ac7cSZack Rusin #pragma pack(pop) 1508ce75f8aSSinclair Yeh 151ebc9ac7cSZack Rusin #pragma pack(push, 1) 152ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindContext { 1538ce75f8aSSinclair Yeh uint32 cid; 1548ce75f8aSSinclair Yeh SVGAMobId mobid; 1558ce75f8aSSinclair Yeh uint32 validContents; 156ebc9ac7cSZack Rusin } SVGA3dCmdDXBindContext; 157ebc9ac7cSZack Rusin #pragma pack(pop) 1588ce75f8aSSinclair Yeh 159ebc9ac7cSZack Rusin #pragma pack(push, 1) 160ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXReadbackContext { 1618ce75f8aSSinclair Yeh uint32 cid; 162ebc9ac7cSZack Rusin } SVGA3dCmdDXReadbackContext; 163ebc9ac7cSZack Rusin #pragma pack(pop) 1648ce75f8aSSinclair Yeh 165ebc9ac7cSZack Rusin #pragma pack(push, 1) 166ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXInvalidateContext { 1678ce75f8aSSinclair Yeh uint32 cid; 168ebc9ac7cSZack Rusin } SVGA3dCmdDXInvalidateContext; 169ebc9ac7cSZack Rusin #pragma pack(pop) 1708ce75f8aSSinclair Yeh 171ebc9ac7cSZack Rusin #pragma pack(push, 1) 172ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetSingleConstantBuffer { 1738ce75f8aSSinclair Yeh uint32 slot; 1748ce75f8aSSinclair Yeh SVGA3dShaderType type; 1758ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 1768ce75f8aSSinclair Yeh uint32 offsetInBytes; 1778ce75f8aSSinclair Yeh uint32 sizeInBytes; 178ebc9ac7cSZack Rusin } SVGA3dCmdDXSetSingleConstantBuffer; 179ebc9ac7cSZack Rusin #pragma pack(pop) 1808ce75f8aSSinclair Yeh 181ebc9ac7cSZack Rusin #pragma pack(push, 1) 182ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetShaderResources { 1838ce75f8aSSinclair Yeh uint32 startView; 1848ce75f8aSSinclair Yeh SVGA3dShaderType type; 1858ce75f8aSSinclair Yeh 186ebc9ac7cSZack Rusin } SVGA3dCmdDXSetShaderResources; 187ebc9ac7cSZack Rusin #pragma pack(pop) 1888ce75f8aSSinclair Yeh 189ebc9ac7cSZack Rusin #pragma pack(push, 1) 190ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetShader { 1918ce75f8aSSinclair Yeh SVGA3dShaderId shaderId; 1928ce75f8aSSinclair Yeh SVGA3dShaderType type; 193ebc9ac7cSZack Rusin } SVGA3dCmdDXSetShader; 194ebc9ac7cSZack Rusin #pragma pack(pop) 1958ce75f8aSSinclair Yeh 1960651dfabSDeepak Rawat typedef union { 1970651dfabSDeepak Rawat struct { 1980651dfabSDeepak Rawat uint32 cbOffset : 12; 1990651dfabSDeepak Rawat uint32 cbId : 4; 2000651dfabSDeepak Rawat uint32 baseSamp : 4; 2010651dfabSDeepak Rawat uint32 baseTex : 7; 2020651dfabSDeepak Rawat uint32 reserved : 5; 2030651dfabSDeepak Rawat }; 2040651dfabSDeepak Rawat uint32 value; 2050651dfabSDeepak Rawat } SVGA3dIfaceData; 2060651dfabSDeepak Rawat 207ebc9ac7cSZack Rusin #pragma pack(push, 1) 208ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetShaderIface { 2090651dfabSDeepak Rawat SVGA3dShaderType type; 2100651dfabSDeepak Rawat uint32 numClassInstances; 2110651dfabSDeepak Rawat uint32 index; 2120651dfabSDeepak Rawat uint32 iface; 2130651dfabSDeepak Rawat SVGA3dIfaceData data; 214ebc9ac7cSZack Rusin } SVGA3dCmdDXSetShaderIface; 215ebc9ac7cSZack Rusin #pragma pack(pop) 2160651dfabSDeepak Rawat 217ebc9ac7cSZack Rusin #pragma pack(push, 1) 218ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindShaderIface { 2190651dfabSDeepak Rawat uint32 cid; 2200651dfabSDeepak Rawat SVGAMobId mobid; 2210651dfabSDeepak Rawat uint32 offsetInBytes; 222ebc9ac7cSZack Rusin } SVGA3dCmdDXBindShaderIface; 223ebc9ac7cSZack Rusin #pragma pack(pop) 2240651dfabSDeepak Rawat 225ebc9ac7cSZack Rusin #pragma pack(push, 1) 226ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetSamplers { 2278ce75f8aSSinclair Yeh uint32 startSampler; 2288ce75f8aSSinclair Yeh SVGA3dShaderType type; 2298ce75f8aSSinclair Yeh 230ebc9ac7cSZack Rusin } SVGA3dCmdDXSetSamplers; 231ebc9ac7cSZack Rusin #pragma pack(pop) 2328ce75f8aSSinclair Yeh 233ebc9ac7cSZack Rusin #pragma pack(push, 1) 234ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDraw { 2358ce75f8aSSinclair Yeh uint32 vertexCount; 2368ce75f8aSSinclair Yeh uint32 startVertexLocation; 237ebc9ac7cSZack Rusin } SVGA3dCmdDXDraw; 238ebc9ac7cSZack Rusin #pragma pack(pop) 2398ce75f8aSSinclair Yeh 240ebc9ac7cSZack Rusin #pragma pack(push, 1) 241ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDrawIndexed { 2428ce75f8aSSinclair Yeh uint32 indexCount; 2438ce75f8aSSinclair Yeh uint32 startIndexLocation; 2448ce75f8aSSinclair Yeh int32 baseVertexLocation; 245ebc9ac7cSZack Rusin } SVGA3dCmdDXDrawIndexed; 246ebc9ac7cSZack Rusin #pragma pack(pop) 2478ce75f8aSSinclair Yeh 248ebc9ac7cSZack Rusin #pragma pack(push, 1) 249ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDrawInstanced { 2508ce75f8aSSinclair Yeh uint32 vertexCountPerInstance; 2518ce75f8aSSinclair Yeh uint32 instanceCount; 2528ce75f8aSSinclair Yeh uint32 startVertexLocation; 2538ce75f8aSSinclair Yeh uint32 startInstanceLocation; 254ebc9ac7cSZack Rusin } SVGA3dCmdDXDrawInstanced; 255ebc9ac7cSZack Rusin #pragma pack(pop) 2568ce75f8aSSinclair Yeh 257ebc9ac7cSZack Rusin #pragma pack(push, 1) 258ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDrawIndexedInstanced { 2598ce75f8aSSinclair Yeh uint32 indexCountPerInstance; 2608ce75f8aSSinclair Yeh uint32 instanceCount; 2618ce75f8aSSinclair Yeh uint32 startIndexLocation; 2628ce75f8aSSinclair Yeh int32 baseVertexLocation; 2638ce75f8aSSinclair Yeh uint32 startInstanceLocation; 264ebc9ac7cSZack Rusin } SVGA3dCmdDXDrawIndexedInstanced; 265ebc9ac7cSZack Rusin #pragma pack(pop) 2668ce75f8aSSinclair Yeh 267ebc9ac7cSZack Rusin #pragma pack(push, 1) 268ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDrawIndexedInstancedIndirect { 2690651dfabSDeepak Rawat SVGA3dSurfaceId argsBufferSid; 2700651dfabSDeepak Rawat uint32 byteOffsetForArgs; 271ebc9ac7cSZack Rusin } SVGA3dCmdDXDrawIndexedInstancedIndirect; 272ebc9ac7cSZack Rusin #pragma pack(pop) 2730651dfabSDeepak Rawat 274ebc9ac7cSZack Rusin #pragma pack(push, 1) 275ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDrawInstancedIndirect { 2760651dfabSDeepak Rawat SVGA3dSurfaceId argsBufferSid; 2770651dfabSDeepak Rawat uint32 byteOffsetForArgs; 278ebc9ac7cSZack Rusin } SVGA3dCmdDXDrawInstancedIndirect; 279ebc9ac7cSZack Rusin #pragma pack(pop) 2800651dfabSDeepak Rawat 281ebc9ac7cSZack Rusin #pragma pack(push, 1) 282ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDrawAuto { 2838ce75f8aSSinclair Yeh uint32 pad0; 284ebc9ac7cSZack Rusin } SVGA3dCmdDXDrawAuto; 285ebc9ac7cSZack Rusin #pragma pack(pop) 2868ce75f8aSSinclair Yeh 287ebc9ac7cSZack Rusin #pragma pack(push, 1) 288ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDispatch { 2890651dfabSDeepak Rawat uint32 threadGroupCountX; 2900651dfabSDeepak Rawat uint32 threadGroupCountY; 2910651dfabSDeepak Rawat uint32 threadGroupCountZ; 292ebc9ac7cSZack Rusin } SVGA3dCmdDXDispatch; 293ebc9ac7cSZack Rusin #pragma pack(pop) 2940651dfabSDeepak Rawat 295ebc9ac7cSZack Rusin #pragma pack(push, 1) 296ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDispatchIndirect { 2970651dfabSDeepak Rawat SVGA3dSurfaceId argsBufferSid; 2980651dfabSDeepak Rawat uint32 byteOffsetForArgs; 299ebc9ac7cSZack Rusin } SVGA3dCmdDXDispatchIndirect; 300ebc9ac7cSZack Rusin #pragma pack(pop) 3010651dfabSDeepak Rawat 302ebc9ac7cSZack Rusin #pragma pack(push, 1) 303ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetInputLayout { 3048ce75f8aSSinclair Yeh SVGA3dElementLayoutId elementLayoutId; 305ebc9ac7cSZack Rusin } SVGA3dCmdDXSetInputLayout; 306ebc9ac7cSZack Rusin #pragma pack(pop) 3078ce75f8aSSinclair Yeh 308ebc9ac7cSZack Rusin #pragma pack(push, 1) 309ebc9ac7cSZack Rusin typedef struct SVGA3dVertexBuffer { 3108ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 3118ce75f8aSSinclair Yeh uint32 stride; 3128ce75f8aSSinclair Yeh uint32 offset; 313ebc9ac7cSZack Rusin } SVGA3dVertexBuffer; 314ebc9ac7cSZack Rusin #pragma pack(pop) 3158ce75f8aSSinclair Yeh 316ebc9ac7cSZack Rusin #pragma pack(push, 1) 317ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetVertexBuffers { 3188ce75f8aSSinclair Yeh uint32 startBuffer; 3198ce75f8aSSinclair Yeh 320ebc9ac7cSZack Rusin } SVGA3dCmdDXSetVertexBuffers; 321ebc9ac7cSZack Rusin #pragma pack(pop) 322ebc9ac7cSZack Rusin 323ebc9ac7cSZack Rusin #pragma pack(push, 1) 324ebc9ac7cSZack Rusin typedef struct SVGA3dVertexBuffer_v2 { 325ebc9ac7cSZack Rusin SVGA3dSurfaceId sid; 326ebc9ac7cSZack Rusin uint32 stride; 327ebc9ac7cSZack Rusin uint32 offset; 328ebc9ac7cSZack Rusin uint32 sizeInBytes; 329ebc9ac7cSZack Rusin } SVGA3dVertexBuffer_v2; 330ebc9ac7cSZack Rusin #pragma pack(pop) 331ebc9ac7cSZack Rusin 332ebc9ac7cSZack Rusin #pragma pack(push, 1) 333ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetVertexBuffers_v2 { 334ebc9ac7cSZack Rusin uint32 startBuffer; 335ebc9ac7cSZack Rusin 336ebc9ac7cSZack Rusin } SVGA3dCmdDXSetVertexBuffers_v2; 337ebc9ac7cSZack Rusin #pragma pack(pop) 338ebc9ac7cSZack Rusin 339ebc9ac7cSZack Rusin #pragma pack(push, 1) 340ebc9ac7cSZack Rusin typedef struct SVGA3dVertexBufferOffsetAndSize { 341ebc9ac7cSZack Rusin uint32 stride; 342ebc9ac7cSZack Rusin uint32 offset; 343ebc9ac7cSZack Rusin uint32 sizeInBytes; 344ebc9ac7cSZack Rusin } SVGA3dVertexBufferOffsetAndSize; 345ebc9ac7cSZack Rusin #pragma pack(pop) 346ebc9ac7cSZack Rusin 347ebc9ac7cSZack Rusin #pragma pack(push, 1) 348ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetVertexBuffersOffsetAndSize { 349ebc9ac7cSZack Rusin uint32 startBuffer; 350ebc9ac7cSZack Rusin 351ebc9ac7cSZack Rusin } SVGA3dCmdDXSetVertexBuffersOffsetAndSize; 352ebc9ac7cSZack Rusin #pragma pack(pop) 353ebc9ac7cSZack Rusin 354ebc9ac7cSZack Rusin #pragma pack(push, 1) 355ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetIndexBuffer { 3568ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 3578ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 3588ce75f8aSSinclair Yeh uint32 offset; 359ebc9ac7cSZack Rusin } SVGA3dCmdDXSetIndexBuffer; 360ebc9ac7cSZack Rusin #pragma pack(pop) 3618ce75f8aSSinclair Yeh 362ebc9ac7cSZack Rusin #pragma pack(push, 1) 363ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetIndexBuffer_v2 { 364ebc9ac7cSZack Rusin SVGA3dSurfaceId sid; 365ebc9ac7cSZack Rusin SVGA3dSurfaceFormat format; 366ebc9ac7cSZack Rusin uint32 offset; 367ebc9ac7cSZack Rusin uint32 sizeInBytes; 368ebc9ac7cSZack Rusin } SVGA3dCmdDXSetIndexBuffer_v2; 369ebc9ac7cSZack Rusin #pragma pack(pop) 370ebc9ac7cSZack Rusin 371ebc9ac7cSZack Rusin #pragma pack(push, 1) 372ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetIndexBufferOffsetAndSize { 373ebc9ac7cSZack Rusin SVGA3dSurfaceFormat format; 374ebc9ac7cSZack Rusin uint32 offset; 375ebc9ac7cSZack Rusin uint32 sizeInBytes; 376ebc9ac7cSZack Rusin } SVGA3dCmdDXSetIndexBufferOffsetAndSize; 377ebc9ac7cSZack Rusin #pragma pack(pop) 378ebc9ac7cSZack Rusin 379ebc9ac7cSZack Rusin #pragma pack(push, 1) 380ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetTopology { 3818ce75f8aSSinclair Yeh SVGA3dPrimitiveType topology; 382ebc9ac7cSZack Rusin } SVGA3dCmdDXSetTopology; 383ebc9ac7cSZack Rusin #pragma pack(pop) 3848ce75f8aSSinclair Yeh 385ebc9ac7cSZack Rusin #pragma pack(push, 1) 386ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetRenderTargets { 3878ce75f8aSSinclair Yeh SVGA3dDepthStencilViewId depthStencilViewId; 3888ce75f8aSSinclair Yeh 389ebc9ac7cSZack Rusin } SVGA3dCmdDXSetRenderTargets; 390ebc9ac7cSZack Rusin #pragma pack(pop) 391ebc9ac7cSZack Rusin 392ebc9ac7cSZack Rusin #pragma pack(push, 1) 393ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetBlendState { 3948ce75f8aSSinclair Yeh SVGA3dBlendStateId blendId; 3958ce75f8aSSinclair Yeh float blendFactor[4]; 3968ce75f8aSSinclair Yeh uint32 sampleMask; 397ebc9ac7cSZack Rusin } SVGA3dCmdDXSetBlendState; 398ebc9ac7cSZack Rusin #pragma pack(pop) 3998ce75f8aSSinclair Yeh 400ebc9ac7cSZack Rusin #pragma pack(push, 1) 401ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetDepthStencilState { 4028ce75f8aSSinclair Yeh SVGA3dDepthStencilStateId depthStencilId; 4038ce75f8aSSinclair Yeh uint32 stencilRef; 404ebc9ac7cSZack Rusin } SVGA3dCmdDXSetDepthStencilState; 405ebc9ac7cSZack Rusin #pragma pack(pop) 4068ce75f8aSSinclair Yeh 407ebc9ac7cSZack Rusin #pragma pack(push, 1) 408ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetRasterizerState { 4098ce75f8aSSinclair Yeh SVGA3dRasterizerStateId rasterizerId; 410ebc9ac7cSZack Rusin } SVGA3dCmdDXSetRasterizerState; 411ebc9ac7cSZack Rusin #pragma pack(pop) 4128ce75f8aSSinclair Yeh 4138ce75f8aSSinclair Yeh #define SVGA3D_DXQUERY_FLAG_PREDICATEHINT (1 << 0) 4148ce75f8aSSinclair Yeh typedef uint32 SVGA3dDXQueryFlags; 4158ce75f8aSSinclair Yeh 416ebc9ac7cSZack Rusin #define SVGADX_QDSTATE_INVALID ((uint8)-1) 4178ce75f8aSSinclair Yeh #define SVGADX_QDSTATE_MIN 0 418ebc9ac7cSZack Rusin #define SVGADX_QDSTATE_IDLE 0 419ebc9ac7cSZack Rusin #define SVGADX_QDSTATE_ACTIVE 1 420ebc9ac7cSZack Rusin #define SVGADX_QDSTATE_PENDING 2 421ebc9ac7cSZack Rusin #define SVGADX_QDSTATE_FINISHED 3 4228ce75f8aSSinclair Yeh #define SVGADX_QDSTATE_MAX 4 4238ce75f8aSSinclair Yeh typedef uint8 SVGADXQueryDeviceState; 4248ce75f8aSSinclair Yeh 425ebc9ac7cSZack Rusin #pragma pack(push, 1) 426ebc9ac7cSZack Rusin typedef struct { 4278ce75f8aSSinclair Yeh SVGA3dQueryTypeUint8 type; 4288ce75f8aSSinclair Yeh uint16 pad0; 4298ce75f8aSSinclair Yeh SVGADXQueryDeviceState state; 4308ce75f8aSSinclair Yeh SVGA3dDXQueryFlags flags; 4318ce75f8aSSinclair Yeh SVGAMobId mobid; 4328ce75f8aSSinclair Yeh uint32 offset; 433ebc9ac7cSZack Rusin } SVGACOTableDXQueryEntry; 434ebc9ac7cSZack Rusin #pragma pack(pop) 4358ce75f8aSSinclair Yeh 436ebc9ac7cSZack Rusin #pragma pack(push, 1) 437ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineQuery { 4388ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 4398ce75f8aSSinclair Yeh SVGA3dQueryType type; 4408ce75f8aSSinclair Yeh SVGA3dDXQueryFlags flags; 441ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineQuery; 442ebc9ac7cSZack Rusin #pragma pack(pop) 4438ce75f8aSSinclair Yeh 444ebc9ac7cSZack Rusin #pragma pack(push, 1) 445ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyQuery { 4468ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 447ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyQuery; 448ebc9ac7cSZack Rusin #pragma pack(pop) 4498ce75f8aSSinclair Yeh 450ebc9ac7cSZack Rusin #pragma pack(push, 1) 451ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindQuery { 4528ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 4538ce75f8aSSinclair Yeh SVGAMobId mobid; 454ebc9ac7cSZack Rusin } SVGA3dCmdDXBindQuery; 455ebc9ac7cSZack Rusin #pragma pack(pop) 4568ce75f8aSSinclair Yeh 457ebc9ac7cSZack Rusin #pragma pack(push, 1) 458ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetQueryOffset { 4598ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 4608ce75f8aSSinclair Yeh uint32 mobOffset; 461ebc9ac7cSZack Rusin } SVGA3dCmdDXSetQueryOffset; 462ebc9ac7cSZack Rusin #pragma pack(pop) 4638ce75f8aSSinclair Yeh 464ebc9ac7cSZack Rusin #pragma pack(push, 1) 465ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBeginQuery { 4668ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 467ebc9ac7cSZack Rusin } SVGA3dCmdDXBeginQuery; 468ebc9ac7cSZack Rusin #pragma pack(pop) 4698ce75f8aSSinclair Yeh 470ebc9ac7cSZack Rusin #pragma pack(push, 1) 471ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXEndQuery { 4728ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 473ebc9ac7cSZack Rusin } SVGA3dCmdDXEndQuery; 474ebc9ac7cSZack Rusin #pragma pack(pop) 4758ce75f8aSSinclair Yeh 476ebc9ac7cSZack Rusin #pragma pack(push, 1) 477ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXReadbackQuery { 4788ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 479ebc9ac7cSZack Rusin } SVGA3dCmdDXReadbackQuery; 480ebc9ac7cSZack Rusin #pragma pack(pop) 4818ce75f8aSSinclair Yeh 482ebc9ac7cSZack Rusin #pragma pack(push, 1) 483ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXMoveQuery { 4848ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 4858ce75f8aSSinclair Yeh SVGAMobId mobid; 4868ce75f8aSSinclair Yeh uint32 mobOffset; 487ebc9ac7cSZack Rusin } SVGA3dCmdDXMoveQuery; 488ebc9ac7cSZack Rusin #pragma pack(pop) 4898ce75f8aSSinclair Yeh 490ebc9ac7cSZack Rusin #pragma pack(push, 1) 491ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindAllQuery { 4928ce75f8aSSinclair Yeh uint32 cid; 4938ce75f8aSSinclair Yeh SVGAMobId mobid; 494ebc9ac7cSZack Rusin } SVGA3dCmdDXBindAllQuery; 495ebc9ac7cSZack Rusin #pragma pack(pop) 4968ce75f8aSSinclair Yeh 497ebc9ac7cSZack Rusin #pragma pack(push, 1) 498ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXReadbackAllQuery { 4998ce75f8aSSinclair Yeh uint32 cid; 500ebc9ac7cSZack Rusin } SVGA3dCmdDXReadbackAllQuery; 501ebc9ac7cSZack Rusin #pragma pack(pop) 5028ce75f8aSSinclair Yeh 503ebc9ac7cSZack Rusin #pragma pack(push, 1) 504ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetPredication { 5058ce75f8aSSinclair Yeh SVGA3dQueryId queryId; 5068ce75f8aSSinclair Yeh uint32 predicateValue; 507ebc9ac7cSZack Rusin } SVGA3dCmdDXSetPredication; 508ebc9ac7cSZack Rusin #pragma pack(pop) 5098ce75f8aSSinclair Yeh 510ebc9ac7cSZack Rusin #pragma pack(push, 1) 511*b05fa564SZack Rusin typedef struct SVGA3dDXSOState { 512ebc9ac7cSZack Rusin uint32 offset; 513ebc9ac7cSZack Rusin uint32 intOffset; 514*b05fa564SZack Rusin uint32 dead1; 515*b05fa564SZack Rusin uint32 dead2; 516ebc9ac7cSZack Rusin } SVGA3dDXSOState; 517ebc9ac7cSZack Rusin #pragma pack(pop) 5188ce75f8aSSinclair Yeh 5198ce75f8aSSinclair Yeh #define SVGA3D_DX_SO_OFFSET_APPEND ((uint32)~0u) 5208ce75f8aSSinclair Yeh 521ebc9ac7cSZack Rusin #pragma pack(push, 1) 522ebc9ac7cSZack Rusin typedef struct SVGA3dSoTarget { 5238ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 5248ce75f8aSSinclair Yeh uint32 offset; 5258ce75f8aSSinclair Yeh uint32 sizeInBytes; 526ebc9ac7cSZack Rusin } SVGA3dSoTarget; 527ebc9ac7cSZack Rusin #pragma pack(pop) 5288ce75f8aSSinclair Yeh 529ebc9ac7cSZack Rusin #pragma pack(push, 1) 530ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetSOTargets { 5318ce75f8aSSinclair Yeh uint32 pad0; 5328ce75f8aSSinclair Yeh 533ebc9ac7cSZack Rusin } SVGA3dCmdDXSetSOTargets; 534ebc9ac7cSZack Rusin #pragma pack(pop) 535ebc9ac7cSZack Rusin 536ebc9ac7cSZack Rusin #pragma pack(push, 1) 537ebc9ac7cSZack Rusin typedef struct SVGA3dViewport { 5388ce75f8aSSinclair Yeh float x; 5398ce75f8aSSinclair Yeh float y; 5408ce75f8aSSinclair Yeh float width; 5418ce75f8aSSinclair Yeh float height; 5428ce75f8aSSinclair Yeh float minDepth; 5438ce75f8aSSinclair Yeh float maxDepth; 544ebc9ac7cSZack Rusin } SVGA3dViewport; 545ebc9ac7cSZack Rusin #pragma pack(pop) 5468ce75f8aSSinclair Yeh 547ebc9ac7cSZack Rusin #pragma pack(push, 1) 548ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetViewports { 5498ce75f8aSSinclair Yeh uint32 pad0; 550ebc9ac7cSZack Rusin 551ebc9ac7cSZack Rusin } SVGA3dCmdDXSetViewports; 552ebc9ac7cSZack Rusin #pragma pack(pop) 5538ce75f8aSSinclair Yeh 5548ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_VIEWPORTS 16 5558ce75f8aSSinclair Yeh 556ebc9ac7cSZack Rusin #pragma pack(push, 1) 557ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetScissorRects { 5588ce75f8aSSinclair Yeh uint32 pad0; 559ebc9ac7cSZack Rusin 560ebc9ac7cSZack Rusin } SVGA3dCmdDXSetScissorRects; 561ebc9ac7cSZack Rusin #pragma pack(pop) 5628ce75f8aSSinclair Yeh 5638ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_SCISSORRECTS 16 5648ce75f8aSSinclair Yeh 565ebc9ac7cSZack Rusin #pragma pack(push, 1) 566ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXClearRenderTargetView { 5678ce75f8aSSinclair Yeh SVGA3dRenderTargetViewId renderTargetViewId; 5688ce75f8aSSinclair Yeh SVGA3dRGBAFloat rgba; 569ebc9ac7cSZack Rusin } SVGA3dCmdDXClearRenderTargetView; 570ebc9ac7cSZack Rusin #pragma pack(pop) 5718ce75f8aSSinclair Yeh 572ebc9ac7cSZack Rusin #pragma pack(push, 1) 573ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXClearDepthStencilView { 5748ce75f8aSSinclair Yeh uint16 flags; 5758ce75f8aSSinclair Yeh uint16 stencil; 5768ce75f8aSSinclair Yeh SVGA3dDepthStencilViewId depthStencilViewId; 5778ce75f8aSSinclair Yeh float depth; 578ebc9ac7cSZack Rusin } SVGA3dCmdDXClearDepthStencilView; 579ebc9ac7cSZack Rusin #pragma pack(pop) 5808ce75f8aSSinclair Yeh 581ebc9ac7cSZack Rusin #pragma pack(push, 1) 582ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredCopyRegion { 5838ce75f8aSSinclair Yeh SVGA3dSurfaceId dstSid; 5848ce75f8aSSinclair Yeh uint32 dstSubResource; 5858ce75f8aSSinclair Yeh SVGA3dSurfaceId srcSid; 5868ce75f8aSSinclair Yeh uint32 srcSubResource; 5878ce75f8aSSinclair Yeh SVGA3dCopyBox box; 588ebc9ac7cSZack Rusin } SVGA3dCmdDXPredCopyRegion; 589ebc9ac7cSZack Rusin #pragma pack(pop) 5908ce75f8aSSinclair Yeh 591ebc9ac7cSZack Rusin #pragma pack(push, 1) 592ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredStagingCopyRegion { 593ebc9ac7cSZack Rusin SVGA3dSurfaceId dstSid; 594ebc9ac7cSZack Rusin uint32 dstSubResource; 595ebc9ac7cSZack Rusin SVGA3dSurfaceId srcSid; 596ebc9ac7cSZack Rusin uint32 srcSubResource; 597ebc9ac7cSZack Rusin SVGA3dCopyBox box; 598ebc9ac7cSZack Rusin uint8 readback; 599ebc9ac7cSZack Rusin uint8 unsynchronized; 600ebc9ac7cSZack Rusin uint8 mustBeZero[2]; 601ebc9ac7cSZack Rusin } SVGA3dCmdDXPredStagingCopyRegion; 602ebc9ac7cSZack Rusin #pragma pack(pop) 603ebc9ac7cSZack Rusin 604ebc9ac7cSZack Rusin #pragma pack(push, 1) 605ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredCopy { 6068ce75f8aSSinclair Yeh SVGA3dSurfaceId dstSid; 6078ce75f8aSSinclair Yeh SVGA3dSurfaceId srcSid; 608ebc9ac7cSZack Rusin } SVGA3dCmdDXPredCopy; 609ebc9ac7cSZack Rusin #pragma pack(pop) 6108ce75f8aSSinclair Yeh 611ebc9ac7cSZack Rusin #pragma pack(push, 1) 612ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredConvertRegion { 613dc75e733SDeepak Rawat SVGA3dSurfaceId dstSid; 614dc75e733SDeepak Rawat uint32 dstSubResource; 615dc75e733SDeepak Rawat SVGA3dBox destBox; 616dc75e733SDeepak Rawat SVGA3dSurfaceId srcSid; 617dc75e733SDeepak Rawat uint32 srcSubResource; 618dc75e733SDeepak Rawat SVGA3dBox srcBox; 619ebc9ac7cSZack Rusin } SVGA3dCmdDXPredConvertRegion; 620ebc9ac7cSZack Rusin #pragma pack(pop) 621dc75e733SDeepak Rawat 622ebc9ac7cSZack Rusin #pragma pack(push, 1) 623ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredStagingConvertRegion { 624ebc9ac7cSZack Rusin SVGA3dSurfaceId dstSid; 625ebc9ac7cSZack Rusin uint32 dstSubResource; 626ebc9ac7cSZack Rusin SVGA3dBox destBox; 627ebc9ac7cSZack Rusin SVGA3dSurfaceId srcSid; 628ebc9ac7cSZack Rusin uint32 srcSubResource; 629ebc9ac7cSZack Rusin SVGA3dBox srcBox; 630ebc9ac7cSZack Rusin uint8 readback; 631ebc9ac7cSZack Rusin uint8 unsynchronized; 632ebc9ac7cSZack Rusin uint8 mustBeZero[2]; 633ebc9ac7cSZack Rusin } SVGA3dCmdDXPredStagingConvertRegion; 634ebc9ac7cSZack Rusin #pragma pack(pop) 635ebc9ac7cSZack Rusin 636ebc9ac7cSZack Rusin #pragma pack(push, 1) 637ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredConvert { 638dc75e733SDeepak Rawat SVGA3dSurfaceId dstSid; 639dc75e733SDeepak Rawat SVGA3dSurfaceId srcSid; 640ebc9ac7cSZack Rusin } SVGA3dCmdDXPredConvert; 641ebc9ac7cSZack Rusin #pragma pack(pop) 642dc75e733SDeepak Rawat 643ebc9ac7cSZack Rusin #pragma pack(push, 1) 644ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredStagingConvert { 645ebc9ac7cSZack Rusin SVGA3dSurfaceId dstSid; 646ebc9ac7cSZack Rusin SVGA3dSurfaceId srcSid; 647ebc9ac7cSZack Rusin uint8 readback; 648ebc9ac7cSZack Rusin uint8 unsynchronized; 649ebc9ac7cSZack Rusin uint8 mustBeZero[2]; 650ebc9ac7cSZack Rusin } SVGA3dCmdDXPredStagingConvert; 651ebc9ac7cSZack Rusin #pragma pack(pop) 652ebc9ac7cSZack Rusin 653ebc9ac7cSZack Rusin #pragma pack(push, 1) 654ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBufferCopy { 6558ce75f8aSSinclair Yeh SVGA3dSurfaceId dest; 6568ce75f8aSSinclair Yeh SVGA3dSurfaceId src; 6578ce75f8aSSinclair Yeh uint32 destX; 6588ce75f8aSSinclair Yeh uint32 srcX; 6598ce75f8aSSinclair Yeh uint32 width; 660ebc9ac7cSZack Rusin } SVGA3dCmdDXBufferCopy; 661ebc9ac7cSZack Rusin #pragma pack(pop) 6628ce75f8aSSinclair Yeh 663ebc9ac7cSZack Rusin #pragma pack(push, 1) 664ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXStagingBufferCopy { 665ebc9ac7cSZack Rusin SVGA3dSurfaceId dest; 666ebc9ac7cSZack Rusin SVGA3dSurfaceId src; 667ebc9ac7cSZack Rusin uint32 destX; 668ebc9ac7cSZack Rusin uint32 srcX; 669ebc9ac7cSZack Rusin uint32 width; 670ebc9ac7cSZack Rusin uint8 readback; 671ebc9ac7cSZack Rusin uint8 unsynchronized; 672ebc9ac7cSZack Rusin uint8 mustBeZero[2]; 673ebc9ac7cSZack Rusin } SVGA3dCmdDXStagingBufferCopy; 674ebc9ac7cSZack Rusin #pragma pack(pop) 675ebc9ac7cSZack Rusin 676ebc9ac7cSZack Rusin #pragma pack(push, 1) 677ebc9ac7cSZack Rusin typedef struct { 678dc75e733SDeepak Rawat SVGA3dSurfaceId dstSid; 679dc75e733SDeepak Rawat uint32 dstSubResource; 680dc75e733SDeepak Rawat SVGA3dSurfaceId srcSid; 681dc75e733SDeepak Rawat uint32 srcSubResource; 682dc75e733SDeepak Rawat SVGA3dSurfaceFormat copyFormat; 683ebc9ac7cSZack Rusin } SVGA3dCmdDXResolveCopy; 684ebc9ac7cSZack Rusin #pragma pack(pop) 685dc75e733SDeepak Rawat 686ebc9ac7cSZack Rusin #pragma pack(push, 1) 687ebc9ac7cSZack Rusin typedef struct { 688dc75e733SDeepak Rawat SVGA3dSurfaceId dstSid; 689dc75e733SDeepak Rawat uint32 dstSubResource; 690dc75e733SDeepak Rawat SVGA3dSurfaceId srcSid; 691dc75e733SDeepak Rawat uint32 srcSubResource; 692dc75e733SDeepak Rawat SVGA3dSurfaceFormat copyFormat; 693ebc9ac7cSZack Rusin } SVGA3dCmdDXPredResolveCopy; 694ebc9ac7cSZack Rusin #pragma pack(pop) 695dc75e733SDeepak Rawat 696dc75e733SDeepak Rawat typedef uint32 SVGA3dDXPresentBltMode; 697dc75e733SDeepak Rawat #define SVGADX_PRESENTBLT_LINEAR (1 << 0) 698dc75e733SDeepak Rawat #define SVGADX_PRESENTBLT_FORCE_SRC_SRGB (1 << 1) 699dc75e733SDeepak Rawat #define SVGADX_PRESENTBLT_FORCE_SRC_XRBIAS (1 << 2) 700dc75e733SDeepak Rawat #define SVGADX_PRESENTBLT_MODE_MAX (1 << 3) 7018ce75f8aSSinclair Yeh 702ebc9ac7cSZack Rusin #pragma pack(push, 1) 703ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPresentBlt { 7048ce75f8aSSinclair Yeh SVGA3dSurfaceId srcSid; 7058ce75f8aSSinclair Yeh uint32 srcSubResource; 7068ce75f8aSSinclair Yeh SVGA3dSurfaceId dstSid; 7078ce75f8aSSinclair Yeh uint32 destSubResource; 7088ce75f8aSSinclair Yeh SVGA3dBox boxSrc; 7098ce75f8aSSinclair Yeh SVGA3dBox boxDest; 710dc75e733SDeepak Rawat SVGA3dDXPresentBltMode mode; 711ebc9ac7cSZack Rusin } SVGA3dCmdDXPresentBlt; 712ebc9ac7cSZack Rusin #pragma pack(pop) 7138ce75f8aSSinclair Yeh 714ebc9ac7cSZack Rusin #pragma pack(push, 1) 715ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXGenMips { 7168ce75f8aSSinclair Yeh SVGA3dShaderResourceViewId shaderResourceViewId; 717ebc9ac7cSZack Rusin } SVGA3dCmdDXGenMips; 718ebc9ac7cSZack Rusin #pragma pack(pop) 7198ce75f8aSSinclair Yeh 720ebc9ac7cSZack Rusin #pragma pack(push, 1) 721ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXUpdateSubResource { 7228ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 7238ce75f8aSSinclair Yeh uint32 subResource; 7248ce75f8aSSinclair Yeh SVGA3dBox box; 725ebc9ac7cSZack Rusin } SVGA3dCmdDXUpdateSubResource; 726ebc9ac7cSZack Rusin #pragma pack(pop) 7278ce75f8aSSinclair Yeh 728ebc9ac7cSZack Rusin #pragma pack(push, 1) 729ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXReadbackSubResource { 7308ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 7318ce75f8aSSinclair Yeh uint32 subResource; 732ebc9ac7cSZack Rusin } SVGA3dCmdDXReadbackSubResource; 733ebc9ac7cSZack Rusin #pragma pack(pop) 7348ce75f8aSSinclair Yeh 735ebc9ac7cSZack Rusin #pragma pack(push, 1) 736ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXInvalidateSubResource { 7378ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 7388ce75f8aSSinclair Yeh uint32 subResource; 739ebc9ac7cSZack Rusin } SVGA3dCmdDXInvalidateSubResource; 740ebc9ac7cSZack Rusin #pragma pack(pop) 7418ce75f8aSSinclair Yeh 742ebc9ac7cSZack Rusin #pragma pack(push, 1) 743ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXTransferFromBuffer { 7448ce75f8aSSinclair Yeh SVGA3dSurfaceId srcSid; 7458ce75f8aSSinclair Yeh uint32 srcOffset; 7468ce75f8aSSinclair Yeh uint32 srcPitch; 7478ce75f8aSSinclair Yeh uint32 srcSlicePitch; 7488ce75f8aSSinclair Yeh SVGA3dSurfaceId destSid; 7498ce75f8aSSinclair Yeh uint32 destSubResource; 7508ce75f8aSSinclair Yeh SVGA3dBox destBox; 751ebc9ac7cSZack Rusin } SVGA3dCmdDXTransferFromBuffer; 752ebc9ac7cSZack Rusin #pragma pack(pop) 7538ce75f8aSSinclair Yeh 7540651dfabSDeepak Rawat #define SVGA3D_TRANSFER_TO_BUFFER_READBACK (1 << 0) 7550651dfabSDeepak Rawat #define SVGA3D_TRANSFER_TO_BUFFER_FLAGS_MASK (1 << 0) 7560651dfabSDeepak Rawat typedef uint32 SVGA3dTransferToBufferFlags; 7570651dfabSDeepak Rawat 758ebc9ac7cSZack Rusin #pragma pack(push, 1) 759ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXTransferToBuffer { 7600651dfabSDeepak Rawat SVGA3dSurfaceId srcSid; 7610651dfabSDeepak Rawat uint32 srcSubResource; 7620651dfabSDeepak Rawat SVGA3dBox srcBox; 7630651dfabSDeepak Rawat SVGA3dSurfaceId destSid; 7640651dfabSDeepak Rawat uint32 destOffset; 7650651dfabSDeepak Rawat uint32 destPitch; 7660651dfabSDeepak Rawat uint32 destSlicePitch; 7670651dfabSDeepak Rawat SVGA3dTransferToBufferFlags flags; 768ebc9ac7cSZack Rusin } SVGA3dCmdDXTransferToBuffer; 769ebc9ac7cSZack Rusin #pragma pack(pop) 7700651dfabSDeepak Rawat 771ebc9ac7cSZack Rusin #pragma pack(push, 1) 772ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredTransferFromBuffer { 7738ce75f8aSSinclair Yeh SVGA3dSurfaceId srcSid; 7748ce75f8aSSinclair Yeh uint32 srcOffset; 7758ce75f8aSSinclair Yeh uint32 srcPitch; 7768ce75f8aSSinclair Yeh uint32 srcSlicePitch; 7778ce75f8aSSinclair Yeh SVGA3dSurfaceId destSid; 7788ce75f8aSSinclair Yeh uint32 destSubResource; 7798ce75f8aSSinclair Yeh SVGA3dBox destBox; 780ebc9ac7cSZack Rusin } SVGA3dCmdDXPredTransferFromBuffer; 781ebc9ac7cSZack Rusin #pragma pack(pop) 7828ce75f8aSSinclair Yeh 783ebc9ac7cSZack Rusin #pragma pack(push, 1) 784ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSurfaceCopyAndReadback { 7858ce75f8aSSinclair Yeh SVGA3dSurfaceId srcSid; 7868ce75f8aSSinclair Yeh SVGA3dSurfaceId destSid; 7878ce75f8aSSinclair Yeh SVGA3dCopyBox box; 788ebc9ac7cSZack Rusin } SVGA3dCmdDXSurfaceCopyAndReadback; 789ebc9ac7cSZack Rusin #pragma pack(pop) 7908ce75f8aSSinclair Yeh 791dc75e733SDeepak Rawat typedef uint32 SVGADXHintId; 792dc75e733SDeepak Rawat #define SVGA_DX_HINT_NONE 0 793dc75e733SDeepak Rawat #define SVGA_DX_HINT_PREFETCH_OBJECT 1 794dc75e733SDeepak Rawat #define SVGA_DX_HINT_PREEVICT_OBJECT 2 795dc75e733SDeepak Rawat #define SVGA_DX_HINT_PREFETCH_COBJECT 3 796dc75e733SDeepak Rawat #define SVGA_DX_HINT_PREEVICT_COBJECT 4 797dc75e733SDeepak Rawat #define SVGA_DX_HINT_MAX 5 798dc75e733SDeepak Rawat 799ebc9ac7cSZack Rusin #pragma pack(push, 1) 800ebc9ac7cSZack Rusin typedef struct SVGAObjectRef { 801dc75e733SDeepak Rawat SVGAOTableType type; 802dc75e733SDeepak Rawat uint32 id; 803ebc9ac7cSZack Rusin } SVGAObjectRef; 804ebc9ac7cSZack Rusin #pragma pack(pop) 805dc75e733SDeepak Rawat 806ebc9ac7cSZack Rusin #pragma pack(push, 1) 807ebc9ac7cSZack Rusin typedef struct SVGACObjectRef { 808dc75e733SDeepak Rawat SVGACOTableType type; 809dc75e733SDeepak Rawat uint32 cid; 810dc75e733SDeepak Rawat uint32 id; 811ebc9ac7cSZack Rusin } SVGACObjectRef; 812ebc9ac7cSZack Rusin #pragma pack(pop) 813dc75e733SDeepak Rawat 814ebc9ac7cSZack Rusin #pragma pack(push, 1) 815ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXHint { 816dc75e733SDeepak Rawat SVGADXHintId hintId; 817dc75e733SDeepak Rawat 818ebc9ac7cSZack Rusin } SVGA3dCmdDXHint; 819ebc9ac7cSZack Rusin #pragma pack(pop) 820dc75e733SDeepak Rawat 821ebc9ac7cSZack Rusin #pragma pack(push, 1) 822ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBufferUpdate { 823dc75e733SDeepak Rawat SVGA3dSurfaceId sid; 824dc75e733SDeepak Rawat uint32 x; 825dc75e733SDeepak Rawat uint32 width; 826ebc9ac7cSZack Rusin } SVGA3dCmdDXBufferUpdate; 827ebc9ac7cSZack Rusin #pragma pack(pop) 828dc75e733SDeepak Rawat 829ebc9ac7cSZack Rusin #pragma pack(push, 1) 830ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetConstantBufferOffset { 831dc75e733SDeepak Rawat uint32 slot; 832dc75e733SDeepak Rawat uint32 offsetInBytes; 833ebc9ac7cSZack Rusin } SVGA3dCmdDXSetConstantBufferOffset; 834ebc9ac7cSZack Rusin #pragma pack(pop) 835dc75e733SDeepak Rawat 836dc75e733SDeepak Rawat typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetVSConstantBufferOffset; 837dc75e733SDeepak Rawat 838dc75e733SDeepak Rawat typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetPSConstantBufferOffset; 839dc75e733SDeepak Rawat 840dc75e733SDeepak Rawat typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetGSConstantBufferOffset; 841dc75e733SDeepak Rawat 8420651dfabSDeepak Rawat typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetHSConstantBufferOffset; 8430651dfabSDeepak Rawat 8440651dfabSDeepak Rawat typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetDSConstantBufferOffset; 8450651dfabSDeepak Rawat 8460651dfabSDeepak Rawat typedef SVGA3dCmdDXSetConstantBufferOffset SVGA3dCmdDXSetCSConstantBufferOffset; 8470651dfabSDeepak Rawat 8480651dfabSDeepak Rawat #define SVGA3D_BUFFEREX_SRV_RAW (1 << 0) 8490651dfabSDeepak Rawat #define SVGA3D_BUFFEREX_SRV_FLAGS_MAX (1 << 1) 8500651dfabSDeepak Rawat #define SVGA3D_BUFFEREX_SRV_FLAGS_MASK (SVGA3D_BUFFEREX_SRV_FLAGS_MAX - 1) 8510651dfabSDeepak Rawat typedef uint32 SVGA3dBufferExFlags; 8528ce75f8aSSinclair Yeh 853ebc9ac7cSZack Rusin #pragma pack(push, 1) 854ebc9ac7cSZack Rusin typedef struct { 8558ce75f8aSSinclair Yeh union { 8568ce75f8aSSinclair Yeh struct { 8578ce75f8aSSinclair Yeh uint32 firstElement; 8588ce75f8aSSinclair Yeh uint32 numElements; 8598ce75f8aSSinclair Yeh uint32 pad0; 8608ce75f8aSSinclair Yeh uint32 pad1; 8618ce75f8aSSinclair Yeh } buffer; 8628ce75f8aSSinclair Yeh struct { 8638ce75f8aSSinclair Yeh uint32 mostDetailedMip; 8648ce75f8aSSinclair Yeh uint32 firstArraySlice; 8658ce75f8aSSinclair Yeh uint32 mipLevels; 8668ce75f8aSSinclair Yeh uint32 arraySize; 867ebc9ac7cSZack Rusin } tex; 8688ce75f8aSSinclair Yeh struct { 8698ce75f8aSSinclair Yeh uint32 firstElement; 8708ce75f8aSSinclair Yeh uint32 numElements; 8710651dfabSDeepak Rawat SVGA3dBufferExFlags flags; 8728ce75f8aSSinclair Yeh uint32 pad0; 8738ce75f8aSSinclair Yeh } bufferex; 8748ce75f8aSSinclair Yeh }; 875ebc9ac7cSZack Rusin } SVGA3dShaderResourceViewDesc; 876ebc9ac7cSZack Rusin #pragma pack(pop) 8778ce75f8aSSinclair Yeh 878ebc9ac7cSZack Rusin #pragma pack(push, 1) 879ebc9ac7cSZack Rusin typedef struct { 8808ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 8818ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 8828ce75f8aSSinclair Yeh SVGA3dResourceType resourceDimension; 8838ce75f8aSSinclair Yeh SVGA3dShaderResourceViewDesc desc; 8848ce75f8aSSinclair Yeh uint32 pad; 885ebc9ac7cSZack Rusin } SVGACOTableDXSRViewEntry; 886ebc9ac7cSZack Rusin #pragma pack(pop) 8878ce75f8aSSinclair Yeh 888ebc9ac7cSZack Rusin #pragma pack(push, 1) 889ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineShaderResourceView { 8908ce75f8aSSinclair Yeh SVGA3dShaderResourceViewId shaderResourceViewId; 8918ce75f8aSSinclair Yeh 8928ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 8938ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 8948ce75f8aSSinclair Yeh SVGA3dResourceType resourceDimension; 8958ce75f8aSSinclair Yeh 8968ce75f8aSSinclair Yeh SVGA3dShaderResourceViewDesc desc; 897ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineShaderResourceView; 898ebc9ac7cSZack Rusin #pragma pack(pop) 8998ce75f8aSSinclair Yeh 900ebc9ac7cSZack Rusin #pragma pack(push, 1) 901ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyShaderResourceView { 9028ce75f8aSSinclair Yeh SVGA3dShaderResourceViewId shaderResourceViewId; 903ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyShaderResourceView; 904ebc9ac7cSZack Rusin #pragma pack(pop) 9058ce75f8aSSinclair Yeh 906ebc9ac7cSZack Rusin #pragma pack(push, 1) 907ebc9ac7cSZack Rusin typedef struct SVGA3dRenderTargetViewDesc { 9088ce75f8aSSinclair Yeh union { 9098ce75f8aSSinclair Yeh struct { 9108ce75f8aSSinclair Yeh uint32 firstElement; 9118ce75f8aSSinclair Yeh uint32 numElements; 912dc75e733SDeepak Rawat uint32 padding0; 9138ce75f8aSSinclair Yeh } buffer; 9148ce75f8aSSinclair Yeh struct { 9158ce75f8aSSinclair Yeh uint32 mipSlice; 9168ce75f8aSSinclair Yeh uint32 firstArraySlice; 9178ce75f8aSSinclair Yeh uint32 arraySize; 918ebc9ac7cSZack Rusin } tex; 9198ce75f8aSSinclair Yeh struct { 9208ce75f8aSSinclair Yeh uint32 mipSlice; 9218ce75f8aSSinclair Yeh uint32 firstW; 9228ce75f8aSSinclair Yeh uint32 wSize; 9238ce75f8aSSinclair Yeh } tex3D; 9248ce75f8aSSinclair Yeh }; 925ebc9ac7cSZack Rusin } SVGA3dRenderTargetViewDesc; 926ebc9ac7cSZack Rusin #pragma pack(pop) 9278ce75f8aSSinclair Yeh 928ebc9ac7cSZack Rusin #pragma pack(push, 1) 929ebc9ac7cSZack Rusin typedef struct { 9308ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 9318ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 9328ce75f8aSSinclair Yeh SVGA3dResourceType resourceDimension; 9338ce75f8aSSinclair Yeh SVGA3dRenderTargetViewDesc desc; 9348ce75f8aSSinclair Yeh uint32 pad[2]; 935ebc9ac7cSZack Rusin } SVGACOTableDXRTViewEntry; 936ebc9ac7cSZack Rusin #pragma pack(pop) 9378ce75f8aSSinclair Yeh 938ebc9ac7cSZack Rusin #pragma pack(push, 1) 939ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineRenderTargetView { 9408ce75f8aSSinclair Yeh SVGA3dRenderTargetViewId renderTargetViewId; 9418ce75f8aSSinclair Yeh 9428ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 9438ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 9448ce75f8aSSinclair Yeh SVGA3dResourceType resourceDimension; 9458ce75f8aSSinclair Yeh 9468ce75f8aSSinclair Yeh SVGA3dRenderTargetViewDesc desc; 947ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineRenderTargetView; 948ebc9ac7cSZack Rusin #pragma pack(pop) 9498ce75f8aSSinclair Yeh 950ebc9ac7cSZack Rusin #pragma pack(push, 1) 951ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyRenderTargetView { 9528ce75f8aSSinclair Yeh SVGA3dRenderTargetViewId renderTargetViewId; 953ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyRenderTargetView; 954ebc9ac7cSZack Rusin #pragma pack(pop) 9558ce75f8aSSinclair Yeh 9568ce75f8aSSinclair Yeh #define SVGA3D_DXDSVIEW_CREATE_READ_ONLY_DEPTH 0x01 9578ce75f8aSSinclair Yeh #define SVGA3D_DXDSVIEW_CREATE_READ_ONLY_STENCIL 0x02 9588ce75f8aSSinclair Yeh #define SVGA3D_DXDSVIEW_CREATE_FLAG_MASK 0x03 9598ce75f8aSSinclair Yeh typedef uint8 SVGA3DCreateDSViewFlags; 9608ce75f8aSSinclair Yeh 961ebc9ac7cSZack Rusin #pragma pack(push, 1) 962ebc9ac7cSZack Rusin typedef struct { 9638ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 9648ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 9658ce75f8aSSinclair Yeh SVGA3dResourceType resourceDimension; 9668ce75f8aSSinclair Yeh uint32 mipSlice; 9678ce75f8aSSinclair Yeh uint32 firstArraySlice; 9688ce75f8aSSinclair Yeh uint32 arraySize; 9698ce75f8aSSinclair Yeh SVGA3DCreateDSViewFlags flags; 9708ce75f8aSSinclair Yeh uint8 pad0; 9718ce75f8aSSinclair Yeh uint16 pad1; 9728ce75f8aSSinclair Yeh uint32 pad2; 973ebc9ac7cSZack Rusin } SVGACOTableDXDSViewEntry; 974ebc9ac7cSZack Rusin #pragma pack(pop) 9758ce75f8aSSinclair Yeh 976ebc9ac7cSZack Rusin #pragma pack(push, 1) 977ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineDepthStencilView { 9788ce75f8aSSinclair Yeh SVGA3dDepthStencilViewId depthStencilViewId; 9798ce75f8aSSinclair Yeh 9808ce75f8aSSinclair Yeh SVGA3dSurfaceId sid; 9818ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 9828ce75f8aSSinclair Yeh SVGA3dResourceType resourceDimension; 9838ce75f8aSSinclair Yeh uint32 mipSlice; 9848ce75f8aSSinclair Yeh uint32 firstArraySlice; 9858ce75f8aSSinclair Yeh uint32 arraySize; 9868ce75f8aSSinclair Yeh SVGA3DCreateDSViewFlags flags; 9878ce75f8aSSinclair Yeh uint8 pad0; 9888ce75f8aSSinclair Yeh uint16 pad1; 989ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineDepthStencilView; 990ebc9ac7cSZack Rusin #pragma pack(pop) 9918ce75f8aSSinclair Yeh 992ebc9ac7cSZack Rusin #pragma pack(push, 1) 993ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineDepthStencilView_v2 { 9940651dfabSDeepak Rawat SVGA3dDepthStencilViewId depthStencilViewId; 9950651dfabSDeepak Rawat 9960651dfabSDeepak Rawat SVGA3dSurfaceId sid; 9970651dfabSDeepak Rawat SVGA3dSurfaceFormat format; 9980651dfabSDeepak Rawat SVGA3dResourceType resourceDimension; 9990651dfabSDeepak Rawat uint32 mipSlice; 10000651dfabSDeepak Rawat uint32 firstArraySlice; 10010651dfabSDeepak Rawat uint32 arraySize; 10020651dfabSDeepak Rawat SVGA3DCreateDSViewFlags flags; 10030651dfabSDeepak Rawat uint8 pad0; 10040651dfabSDeepak Rawat uint16 pad1; 1005ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineDepthStencilView_v2; 1006ebc9ac7cSZack Rusin #pragma pack(pop) 10070651dfabSDeepak Rawat 1008ebc9ac7cSZack Rusin #pragma pack(push, 1) 1009ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyDepthStencilView { 10108ce75f8aSSinclair Yeh SVGA3dDepthStencilViewId depthStencilViewId; 1011ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyDepthStencilView; 1012ebc9ac7cSZack Rusin #pragma pack(pop) 10130651dfabSDeepak Rawat 10140651dfabSDeepak Rawat #define SVGA3D_UABUFFER_RAW (1 << 0) 10150651dfabSDeepak Rawat #define SVGA3D_UABUFFER_APPEND (1 << 1) 10160651dfabSDeepak Rawat #define SVGA3D_UABUFFER_COUNTER (1 << 2) 10170651dfabSDeepak Rawat typedef uint32 SVGA3dUABufferFlags; 10180651dfabSDeepak Rawat 1019ebc9ac7cSZack Rusin #pragma pack(push, 1) 1020ebc9ac7cSZack Rusin typedef struct { 10210651dfabSDeepak Rawat union { 10220651dfabSDeepak Rawat struct { 10230651dfabSDeepak Rawat uint32 firstElement; 10240651dfabSDeepak Rawat uint32 numElements; 10250651dfabSDeepak Rawat SVGA3dUABufferFlags flags; 10260651dfabSDeepak Rawat uint32 padding0; 10270651dfabSDeepak Rawat uint32 padding1; 10280651dfabSDeepak Rawat } buffer; 10290651dfabSDeepak Rawat struct { 10300651dfabSDeepak Rawat uint32 mipSlice; 10310651dfabSDeepak Rawat uint32 firstArraySlice; 10320651dfabSDeepak Rawat uint32 arraySize; 10330651dfabSDeepak Rawat uint32 padding0; 10340651dfabSDeepak Rawat uint32 padding1; 1035ebc9ac7cSZack Rusin } tex; 10360651dfabSDeepak Rawat struct { 10370651dfabSDeepak Rawat uint32 mipSlice; 10380651dfabSDeepak Rawat uint32 firstW; 10390651dfabSDeepak Rawat uint32 wSize; 10400651dfabSDeepak Rawat uint32 padding0; 10410651dfabSDeepak Rawat uint32 padding1; 10420651dfabSDeepak Rawat } tex3D; 10430651dfabSDeepak Rawat }; 1044ebc9ac7cSZack Rusin } SVGA3dUAViewDesc; 1045ebc9ac7cSZack Rusin #pragma pack(pop) 10460651dfabSDeepak Rawat 1047ebc9ac7cSZack Rusin #pragma pack(push, 1) 1048ebc9ac7cSZack Rusin typedef struct { 10490651dfabSDeepak Rawat SVGA3dSurfaceId sid; 10500651dfabSDeepak Rawat SVGA3dSurfaceFormat format; 10510651dfabSDeepak Rawat SVGA3dResourceType resourceDimension; 10520651dfabSDeepak Rawat SVGA3dUAViewDesc desc; 10530651dfabSDeepak Rawat uint32 structureCount; 10540651dfabSDeepak Rawat uint32 pad[7]; 1055ebc9ac7cSZack Rusin } SVGACOTableDXUAViewEntry; 1056ebc9ac7cSZack Rusin #pragma pack(pop) 10570651dfabSDeepak Rawat 1058ebc9ac7cSZack Rusin #pragma pack(push, 1) 1059ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineUAView { 10600651dfabSDeepak Rawat SVGA3dUAViewId uaViewId; 10610651dfabSDeepak Rawat 10620651dfabSDeepak Rawat SVGA3dSurfaceId sid; 10630651dfabSDeepak Rawat SVGA3dSurfaceFormat format; 10640651dfabSDeepak Rawat SVGA3dResourceType resourceDimension; 10650651dfabSDeepak Rawat 10660651dfabSDeepak Rawat SVGA3dUAViewDesc desc; 1067ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineUAView; 1068ebc9ac7cSZack Rusin #pragma pack(pop) 10690651dfabSDeepak Rawat 1070ebc9ac7cSZack Rusin #pragma pack(push, 1) 1071ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyUAView { 10720651dfabSDeepak Rawat SVGA3dUAViewId uaViewId; 1073ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyUAView; 1074ebc9ac7cSZack Rusin #pragma pack(pop) 10750651dfabSDeepak Rawat 1076ebc9ac7cSZack Rusin #pragma pack(push, 1) 1077ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXClearUAViewUint { 10780651dfabSDeepak Rawat SVGA3dUAViewId uaViewId; 10790651dfabSDeepak Rawat SVGA3dRGBAUint32 value; 1080ebc9ac7cSZack Rusin } SVGA3dCmdDXClearUAViewUint; 1081ebc9ac7cSZack Rusin #pragma pack(pop) 10820651dfabSDeepak Rawat 1083ebc9ac7cSZack Rusin #pragma pack(push, 1) 1084ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXClearUAViewFloat { 10850651dfabSDeepak Rawat SVGA3dUAViewId uaViewId; 10860651dfabSDeepak Rawat SVGA3dRGBAFloat value; 1087ebc9ac7cSZack Rusin } SVGA3dCmdDXClearUAViewFloat; 1088ebc9ac7cSZack Rusin #pragma pack(pop) 10890651dfabSDeepak Rawat 1090ebc9ac7cSZack Rusin #pragma pack(push, 1) 1091ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXCopyStructureCount { 10920651dfabSDeepak Rawat SVGA3dUAViewId srcUAViewId; 10930651dfabSDeepak Rawat SVGA3dSurfaceId destSid; 10940651dfabSDeepak Rawat uint32 destByteOffset; 1095ebc9ac7cSZack Rusin } SVGA3dCmdDXCopyStructureCount; 1096ebc9ac7cSZack Rusin #pragma pack(pop) 10970651dfabSDeepak Rawat 1098ebc9ac7cSZack Rusin #pragma pack(push, 1) 1099ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetStructureCount { 11000651dfabSDeepak Rawat SVGA3dUAViewId uaViewId; 11010651dfabSDeepak Rawat uint32 structureCount; 1102ebc9ac7cSZack Rusin } SVGA3dCmdDXSetStructureCount; 1103ebc9ac7cSZack Rusin #pragma pack(pop) 11040651dfabSDeepak Rawat 1105ebc9ac7cSZack Rusin #pragma pack(push, 1) 1106ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetUAViews { 11070651dfabSDeepak Rawat uint32 uavSpliceIndex; 11080651dfabSDeepak Rawat 1109ebc9ac7cSZack Rusin } SVGA3dCmdDXSetUAViews; 1110ebc9ac7cSZack Rusin #pragma pack(pop) 1111ebc9ac7cSZack Rusin 1112ebc9ac7cSZack Rusin #pragma pack(push, 1) 1113ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetCSUAViews { 11140651dfabSDeepak Rawat uint32 startIndex; 11150651dfabSDeepak Rawat 1116ebc9ac7cSZack Rusin } SVGA3dCmdDXSetCSUAViews; 1117ebc9ac7cSZack Rusin #pragma pack(pop) 1118ebc9ac7cSZack Rusin 1119ebc9ac7cSZack Rusin #pragma pack(push, 1) 1120ebc9ac7cSZack Rusin typedef struct SVGA3dInputElementDesc { 11218ce75f8aSSinclair Yeh uint32 inputSlot; 11228ce75f8aSSinclair Yeh uint32 alignedByteOffset; 11238ce75f8aSSinclair Yeh SVGA3dSurfaceFormat format; 11248ce75f8aSSinclair Yeh SVGA3dInputClassification inputSlotClass; 11258ce75f8aSSinclair Yeh uint32 instanceDataStepRate; 11268ce75f8aSSinclair Yeh uint32 inputRegister; 1127ebc9ac7cSZack Rusin } SVGA3dInputElementDesc; 1128ebc9ac7cSZack Rusin #pragma pack(pop) 11298ce75f8aSSinclair Yeh 1130ebc9ac7cSZack Rusin #pragma pack(push, 1) 1131ebc9ac7cSZack Rusin typedef struct { 11328ce75f8aSSinclair Yeh uint32 elid; 11338ce75f8aSSinclair Yeh uint32 numDescs; 11340651dfabSDeepak Rawat SVGA3dInputElementDesc descs[32]; 11358ce75f8aSSinclair Yeh uint32 pad[62]; 1136ebc9ac7cSZack Rusin } SVGACOTableDXElementLayoutEntry; 1137ebc9ac7cSZack Rusin #pragma pack(pop) 11388ce75f8aSSinclair Yeh 1139ebc9ac7cSZack Rusin #pragma pack(push, 1) 1140ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineElementLayout { 11418ce75f8aSSinclair Yeh SVGA3dElementLayoutId elementLayoutId; 11428ce75f8aSSinclair Yeh 1143ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineElementLayout; 1144ebc9ac7cSZack Rusin #pragma pack(pop) 1145ebc9ac7cSZack Rusin 1146ebc9ac7cSZack Rusin #pragma pack(push, 1) 1147ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyElementLayout { 11488ce75f8aSSinclair Yeh SVGA3dElementLayoutId elementLayoutId; 1149ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyElementLayout; 1150ebc9ac7cSZack Rusin #pragma pack(pop) 11518ce75f8aSSinclair Yeh 11528ce75f8aSSinclair Yeh #define SVGA3D_DX_MAX_RENDER_TARGETS 8 11538ce75f8aSSinclair Yeh 1154ebc9ac7cSZack Rusin #pragma pack(push, 1) 1155ebc9ac7cSZack Rusin typedef struct SVGA3dDXBlendStatePerRT { 11568ce75f8aSSinclair Yeh uint8 blendEnable; 11578ce75f8aSSinclair Yeh uint8 srcBlend; 11588ce75f8aSSinclair Yeh uint8 destBlend; 11598ce75f8aSSinclair Yeh uint8 blendOp; 11608ce75f8aSSinclair Yeh uint8 srcBlendAlpha; 11618ce75f8aSSinclair Yeh uint8 destBlendAlpha; 11628ce75f8aSSinclair Yeh uint8 blendOpAlpha; 1163dc75e733SDeepak Rawat SVGA3dColorWriteEnable renderTargetWriteMask; 11648ce75f8aSSinclair Yeh uint8 logicOpEnable; 11658ce75f8aSSinclair Yeh uint8 logicOp; 11668ce75f8aSSinclair Yeh uint16 pad0; 1167ebc9ac7cSZack Rusin } SVGA3dDXBlendStatePerRT; 1168ebc9ac7cSZack Rusin #pragma pack(pop) 11698ce75f8aSSinclair Yeh 1170ebc9ac7cSZack Rusin #pragma pack(push, 1) 1171ebc9ac7cSZack Rusin typedef struct { 11728ce75f8aSSinclair Yeh uint8 alphaToCoverageEnable; 11738ce75f8aSSinclair Yeh uint8 independentBlendEnable; 11748ce75f8aSSinclair Yeh uint16 pad0; 1175ebc9ac7cSZack Rusin SVGA3dDXBlendStatePerRT perRT[SVGA3D_DX_MAX_RENDER_TARGETS]; 11768ce75f8aSSinclair Yeh uint32 pad1[7]; 1177ebc9ac7cSZack Rusin } SVGACOTableDXBlendStateEntry; 1178ebc9ac7cSZack Rusin #pragma pack(pop) 11798ce75f8aSSinclair Yeh 1180ebc9ac7cSZack Rusin #pragma pack(push, 1) 1181ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineBlendState { 11828ce75f8aSSinclair Yeh SVGA3dBlendStateId blendId; 11838ce75f8aSSinclair Yeh uint8 alphaToCoverageEnable; 11848ce75f8aSSinclair Yeh uint8 independentBlendEnable; 11858ce75f8aSSinclair Yeh uint16 pad0; 1186ebc9ac7cSZack Rusin SVGA3dDXBlendStatePerRT perRT[SVGA3D_DX_MAX_RENDER_TARGETS]; 1187ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineBlendState; 1188ebc9ac7cSZack Rusin #pragma pack(pop) 11898ce75f8aSSinclair Yeh 1190ebc9ac7cSZack Rusin #pragma pack(push, 1) 1191ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyBlendState { 11928ce75f8aSSinclair Yeh SVGA3dBlendStateId blendId; 1193ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyBlendState; 1194ebc9ac7cSZack Rusin #pragma pack(pop) 11958ce75f8aSSinclair Yeh 1196ebc9ac7cSZack Rusin #pragma pack(push, 1) 1197ebc9ac7cSZack Rusin typedef struct { 11988ce75f8aSSinclair Yeh uint8 depthEnable; 11998ce75f8aSSinclair Yeh SVGA3dDepthWriteMask depthWriteMask; 12008ce75f8aSSinclair Yeh SVGA3dComparisonFunc depthFunc; 12018ce75f8aSSinclair Yeh uint8 stencilEnable; 12028ce75f8aSSinclair Yeh uint8 frontEnable; 12038ce75f8aSSinclair Yeh uint8 backEnable; 12048ce75f8aSSinclair Yeh uint8 stencilReadMask; 12058ce75f8aSSinclair Yeh uint8 stencilWriteMask; 12068ce75f8aSSinclair Yeh 12078ce75f8aSSinclair Yeh uint8 frontStencilFailOp; 12088ce75f8aSSinclair Yeh uint8 frontStencilDepthFailOp; 12098ce75f8aSSinclair Yeh uint8 frontStencilPassOp; 12108ce75f8aSSinclair Yeh SVGA3dComparisonFunc frontStencilFunc; 12118ce75f8aSSinclair Yeh 12128ce75f8aSSinclair Yeh uint8 backStencilFailOp; 12138ce75f8aSSinclair Yeh uint8 backStencilDepthFailOp; 12148ce75f8aSSinclair Yeh uint8 backStencilPassOp; 12158ce75f8aSSinclair Yeh SVGA3dComparisonFunc backStencilFunc; 1216ebc9ac7cSZack Rusin } SVGACOTableDXDepthStencilEntry; 1217ebc9ac7cSZack Rusin #pragma pack(pop) 12188ce75f8aSSinclair Yeh 1219ebc9ac7cSZack Rusin #pragma pack(push, 1) 1220ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineDepthStencilState { 12218ce75f8aSSinclair Yeh SVGA3dDepthStencilStateId depthStencilId; 12228ce75f8aSSinclair Yeh 12238ce75f8aSSinclair Yeh uint8 depthEnable; 12248ce75f8aSSinclair Yeh SVGA3dDepthWriteMask depthWriteMask; 12258ce75f8aSSinclair Yeh SVGA3dComparisonFunc depthFunc; 12268ce75f8aSSinclair Yeh uint8 stencilEnable; 12278ce75f8aSSinclair Yeh uint8 frontEnable; 12288ce75f8aSSinclair Yeh uint8 backEnable; 12298ce75f8aSSinclair Yeh uint8 stencilReadMask; 12308ce75f8aSSinclair Yeh uint8 stencilWriteMask; 12318ce75f8aSSinclair Yeh 12328ce75f8aSSinclair Yeh uint8 frontStencilFailOp; 12338ce75f8aSSinclair Yeh uint8 frontStencilDepthFailOp; 12348ce75f8aSSinclair Yeh uint8 frontStencilPassOp; 12358ce75f8aSSinclair Yeh SVGA3dComparisonFunc frontStencilFunc; 12368ce75f8aSSinclair Yeh 12378ce75f8aSSinclair Yeh uint8 backStencilFailOp; 12388ce75f8aSSinclair Yeh uint8 backStencilDepthFailOp; 12398ce75f8aSSinclair Yeh uint8 backStencilPassOp; 12408ce75f8aSSinclair Yeh SVGA3dComparisonFunc backStencilFunc; 1241ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineDepthStencilState; 1242ebc9ac7cSZack Rusin #pragma pack(pop) 12438ce75f8aSSinclair Yeh 1244ebc9ac7cSZack Rusin #pragma pack(push, 1) 1245ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyDepthStencilState { 12468ce75f8aSSinclair Yeh SVGA3dDepthStencilStateId depthStencilId; 1247ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyDepthStencilState; 1248ebc9ac7cSZack Rusin #pragma pack(pop) 12498ce75f8aSSinclair Yeh 1250ebc9ac7cSZack Rusin #pragma pack(push, 1) 1251ebc9ac7cSZack Rusin typedef struct { 12528ce75f8aSSinclair Yeh uint8 fillMode; 12538ce75f8aSSinclair Yeh SVGA3dCullMode cullMode; 12548ce75f8aSSinclair Yeh uint8 frontCounterClockwise; 12558ce75f8aSSinclair Yeh uint8 provokingVertexLast; 12568ce75f8aSSinclair Yeh int32 depthBias; 12578ce75f8aSSinclair Yeh float depthBiasClamp; 12588ce75f8aSSinclair Yeh float slopeScaledDepthBias; 12598ce75f8aSSinclair Yeh uint8 depthClipEnable; 12608ce75f8aSSinclair Yeh uint8 scissorEnable; 1261dc75e733SDeepak Rawat SVGA3dMultisampleRastEnable multisampleEnable; 12628ce75f8aSSinclair Yeh uint8 antialiasedLineEnable; 12638ce75f8aSSinclair Yeh float lineWidth; 12648ce75f8aSSinclair Yeh uint8 lineStippleEnable; 12658ce75f8aSSinclair Yeh uint8 lineStippleFactor; 12668ce75f8aSSinclair Yeh uint16 lineStipplePattern; 12670651dfabSDeepak Rawat uint8 forcedSampleCount; 12680651dfabSDeepak Rawat uint8 mustBeZero[3]; 1269ebc9ac7cSZack Rusin } SVGACOTableDXRasterizerStateEntry; 1270ebc9ac7cSZack Rusin #pragma pack(pop) 12718ce75f8aSSinclair Yeh 1272ebc9ac7cSZack Rusin #pragma pack(push, 1) 1273ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineRasterizerState { 12748ce75f8aSSinclair Yeh SVGA3dRasterizerStateId rasterizerId; 12758ce75f8aSSinclair Yeh 12768ce75f8aSSinclair Yeh uint8 fillMode; 12778ce75f8aSSinclair Yeh SVGA3dCullMode cullMode; 12788ce75f8aSSinclair Yeh uint8 frontCounterClockwise; 12798ce75f8aSSinclair Yeh uint8 provokingVertexLast; 12808ce75f8aSSinclair Yeh int32 depthBias; 12818ce75f8aSSinclair Yeh float depthBiasClamp; 12828ce75f8aSSinclair Yeh float slopeScaledDepthBias; 12838ce75f8aSSinclair Yeh uint8 depthClipEnable; 12848ce75f8aSSinclair Yeh uint8 scissorEnable; 1285dc75e733SDeepak Rawat SVGA3dMultisampleRastEnable multisampleEnable; 12868ce75f8aSSinclair Yeh uint8 antialiasedLineEnable; 12878ce75f8aSSinclair Yeh float lineWidth; 12888ce75f8aSSinclair Yeh uint8 lineStippleEnable; 12898ce75f8aSSinclair Yeh uint8 lineStippleFactor; 12908ce75f8aSSinclair Yeh uint16 lineStipplePattern; 1291ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineRasterizerState; 1292ebc9ac7cSZack Rusin #pragma pack(pop) 12938ce75f8aSSinclair Yeh 1294ebc9ac7cSZack Rusin #pragma pack(push, 1) 1295ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineRasterizerState_v2 { 12968ce75f8aSSinclair Yeh SVGA3dRasterizerStateId rasterizerId; 12978ce75f8aSSinclair Yeh 1298ebc9ac7cSZack Rusin uint8 fillMode; 1299ebc9ac7cSZack Rusin SVGA3dCullMode cullMode; 1300ebc9ac7cSZack Rusin uint8 frontCounterClockwise; 1301ebc9ac7cSZack Rusin uint8 provokingVertexLast; 1302ebc9ac7cSZack Rusin int32 depthBias; 1303ebc9ac7cSZack Rusin float depthBiasClamp; 1304ebc9ac7cSZack Rusin float slopeScaledDepthBias; 1305ebc9ac7cSZack Rusin uint8 depthClipEnable; 1306ebc9ac7cSZack Rusin uint8 scissorEnable; 1307ebc9ac7cSZack Rusin SVGA3dMultisampleRastEnable multisampleEnable; 1308ebc9ac7cSZack Rusin uint8 antialiasedLineEnable; 1309ebc9ac7cSZack Rusin float lineWidth; 1310ebc9ac7cSZack Rusin uint8 lineStippleEnable; 1311ebc9ac7cSZack Rusin uint8 lineStippleFactor; 1312ebc9ac7cSZack Rusin uint16 lineStipplePattern; 1313ebc9ac7cSZack Rusin uint32 forcedSampleCount; 1314ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineRasterizerState_v2; 1315ebc9ac7cSZack Rusin #pragma pack(pop) 1316ebc9ac7cSZack Rusin 1317ebc9ac7cSZack Rusin #pragma pack(push, 1) 1318ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyRasterizerState { 1319ebc9ac7cSZack Rusin SVGA3dRasterizerStateId rasterizerId; 1320ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyRasterizerState; 1321ebc9ac7cSZack Rusin #pragma pack(pop) 1322ebc9ac7cSZack Rusin 1323ebc9ac7cSZack Rusin #pragma pack(push, 1) 1324ebc9ac7cSZack Rusin typedef struct { 13258ce75f8aSSinclair Yeh SVGA3dFilter filter; 13268ce75f8aSSinclair Yeh uint8 addressU; 13278ce75f8aSSinclair Yeh uint8 addressV; 13288ce75f8aSSinclair Yeh uint8 addressW; 13298ce75f8aSSinclair Yeh uint8 pad0; 13308ce75f8aSSinclair Yeh float mipLODBias; 13318ce75f8aSSinclair Yeh uint8 maxAnisotropy; 13328ce75f8aSSinclair Yeh SVGA3dComparisonFunc comparisonFunc; 13338ce75f8aSSinclair Yeh uint16 pad1; 13348ce75f8aSSinclair Yeh SVGA3dRGBAFloat borderColor; 13358ce75f8aSSinclair Yeh float minLOD; 13368ce75f8aSSinclair Yeh float maxLOD; 13378ce75f8aSSinclair Yeh uint32 pad2[6]; 1338ebc9ac7cSZack Rusin } SVGACOTableDXSamplerEntry; 1339ebc9ac7cSZack Rusin #pragma pack(pop) 13408ce75f8aSSinclair Yeh 1341ebc9ac7cSZack Rusin #pragma pack(push, 1) 1342ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineSamplerState { 13438ce75f8aSSinclair Yeh SVGA3dSamplerId samplerId; 13448ce75f8aSSinclair Yeh SVGA3dFilter filter; 13458ce75f8aSSinclair Yeh uint8 addressU; 13468ce75f8aSSinclair Yeh uint8 addressV; 13478ce75f8aSSinclair Yeh uint8 addressW; 13488ce75f8aSSinclair Yeh uint8 pad0; 13498ce75f8aSSinclair Yeh float mipLODBias; 13508ce75f8aSSinclair Yeh uint8 maxAnisotropy; 13518ce75f8aSSinclair Yeh SVGA3dComparisonFunc comparisonFunc; 13528ce75f8aSSinclair Yeh uint16 pad1; 13538ce75f8aSSinclair Yeh SVGA3dRGBAFloat borderColor; 13548ce75f8aSSinclair Yeh float minLOD; 13558ce75f8aSSinclair Yeh float maxLOD; 1356ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineSamplerState; 1357ebc9ac7cSZack Rusin #pragma pack(pop) 13588ce75f8aSSinclair Yeh 1359ebc9ac7cSZack Rusin #pragma pack(push, 1) 1360ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroySamplerState { 13618ce75f8aSSinclair Yeh SVGA3dSamplerId samplerId; 1362ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroySamplerState; 1363ebc9ac7cSZack Rusin #pragma pack(pop) 13640651dfabSDeepak Rawat 13650651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED 0 13660651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_POSITION 1 13670651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_CLIP_DISTANCE 2 13680651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_CULL_DISTANCE 3 13690651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_RENDER_TARGET_ARRAY_INDEX 4 13700651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_VIEWPORT_ARRAY_INDEX 5 13710651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_VERTEX_ID 6 13720651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_PRIMITIVE_ID 7 13730651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_INSTANCE_ID 8 13740651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_IS_FRONT_FACE 9 13750651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_SAMPLE_INDEX 10 13760651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_QUAD_U_EQ_0_EDGE_TESSFACTOR 11 13770651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_QUAD_V_EQ_0_EDGE_TESSFACTOR 12 13780651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_QUAD_U_EQ_1_EDGE_TESSFACTOR 13 13790651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_QUAD_V_EQ_1_EDGE_TESSFACTOR 14 13800651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_QUAD_U_INSIDE_TESSFACTOR 15 13810651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_QUAD_V_INSIDE_TESSFACTOR 16 13820651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_TRI_U_EQ_0_EDGE_TESSFACTOR 17 13830651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_TRI_V_EQ_0_EDGE_TESSFACTOR 18 13840651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_TRI_W_EQ_0_EDGE_TESSFACTOR 19 13850651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_TRI_INSIDE_TESSFACTOR 20 13860651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_LINE_DETAIL_TESSFACTOR 21 13870651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_FINAL_LINE_DENSITY_TESSFACTOR 22 13880651dfabSDeepak Rawat #define SVGADX_SIGNATURE_SEMANTIC_NAME_MAX 23 13890651dfabSDeepak Rawat typedef uint32 SVGA3dDXSignatureSemanticName; 13900651dfabSDeepak Rawat 13910651dfabSDeepak Rawat #define SVGADX_SIGNATURE_REGISTER_COMPONENT_UNKNOWN 0 13920651dfabSDeepak Rawat typedef uint32 SVGA3dDXSignatureRegisterComponentType; 13930651dfabSDeepak Rawat 13940651dfabSDeepak Rawat #define SVGADX_SIGNATURE_MIN_PRECISION_DEFAULT 0 13950651dfabSDeepak Rawat typedef uint32 SVGA3dDXSignatureMinPrecision; 13960651dfabSDeepak Rawat 1397ebc9ac7cSZack Rusin #pragma pack(push, 1) 1398ebc9ac7cSZack Rusin typedef struct SVGA3dDXSignatureEntry { 13990651dfabSDeepak Rawat uint32 registerIndex; 14000651dfabSDeepak Rawat SVGA3dDXSignatureSemanticName semanticName; 1401ebc9ac7cSZack Rusin uint32 mask; 14020651dfabSDeepak Rawat SVGA3dDXSignatureRegisterComponentType componentType; 14030651dfabSDeepak Rawat SVGA3dDXSignatureMinPrecision minPrecision; 1404ebc9ac7cSZack Rusin } SVGA3dDXShaderSignatureEntry; 1405ebc9ac7cSZack Rusin #pragma pack(pop) 14060651dfabSDeepak Rawat 14070651dfabSDeepak Rawat #define SVGADX_SIGNATURE_HEADER_VERSION_0 0x08a92d12 14080651dfabSDeepak Rawat 1409ebc9ac7cSZack Rusin #pragma pack(push, 1) 1410ebc9ac7cSZack Rusin typedef struct SVGA3dDXSignatureHeader { 14110651dfabSDeepak Rawat uint32 headerVersion; 14120651dfabSDeepak Rawat uint32 numInputSignatures; 14130651dfabSDeepak Rawat uint32 numOutputSignatures; 14140651dfabSDeepak Rawat uint32 numPatchConstantSignatures; 1415ebc9ac7cSZack Rusin } SVGA3dDXShaderSignatureHeader; 1416ebc9ac7cSZack Rusin #pragma pack(pop) 14170651dfabSDeepak Rawat 1418ebc9ac7cSZack Rusin #pragma pack(push, 1) 1419ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineShader { 14208ce75f8aSSinclair Yeh SVGA3dShaderId shaderId; 14218ce75f8aSSinclair Yeh SVGA3dShaderType type; 1422ebc9ac7cSZack Rusin uint32 sizeInBytes; 1423ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineShader; 1424ebc9ac7cSZack Rusin #pragma pack(pop) 14258ce75f8aSSinclair Yeh 1426ebc9ac7cSZack Rusin #pragma pack(push, 1) 1427ebc9ac7cSZack Rusin typedef struct SVGACOTableDXShaderEntry { 14288ce75f8aSSinclair Yeh SVGA3dShaderType type; 14298ce75f8aSSinclair Yeh uint32 sizeInBytes; 14308ce75f8aSSinclair Yeh uint32 offsetInBytes; 14318ce75f8aSSinclair Yeh SVGAMobId mobid; 1432dc75e733SDeepak Rawat uint32 pad[4]; 1433ebc9ac7cSZack Rusin } SVGACOTableDXShaderEntry; 1434ebc9ac7cSZack Rusin #pragma pack(pop) 14358ce75f8aSSinclair Yeh 1436ebc9ac7cSZack Rusin #pragma pack(push, 1) 1437ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyShader { 14388ce75f8aSSinclair Yeh SVGA3dShaderId shaderId; 1439ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyShader; 1440ebc9ac7cSZack Rusin #pragma pack(pop) 14418ce75f8aSSinclair Yeh 1442ebc9ac7cSZack Rusin #pragma pack(push, 1) 1443ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindShader { 14448ce75f8aSSinclair Yeh uint32 cid; 14458ce75f8aSSinclair Yeh uint32 shid; 14468ce75f8aSSinclair Yeh SVGAMobId mobid; 14478ce75f8aSSinclair Yeh uint32 offsetInBytes; 1448ebc9ac7cSZack Rusin } SVGA3dCmdDXBindShader; 1449ebc9ac7cSZack Rusin #pragma pack(pop) 14508ce75f8aSSinclair Yeh 1451ebc9ac7cSZack Rusin #pragma pack(push, 1) 1452ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindAllShader { 1453dc75e733SDeepak Rawat uint32 cid; 1454dc75e733SDeepak Rawat SVGAMobId mobid; 1455ebc9ac7cSZack Rusin } SVGA3dCmdDXBindAllShader; 1456ebc9ac7cSZack Rusin #pragma pack(pop) 1457dc75e733SDeepak Rawat 1458ebc9ac7cSZack Rusin #pragma pack(push, 1) 1459ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXCondBindAllShader { 1460dc75e733SDeepak Rawat uint32 cid; 1461dc75e733SDeepak Rawat SVGAMobId testMobid; 1462dc75e733SDeepak Rawat SVGAMobId mobid; 1463ebc9ac7cSZack Rusin } SVGA3dCmdDXCondBindAllShader; 1464ebc9ac7cSZack Rusin #pragma pack(pop) 1465dc75e733SDeepak Rawat 14660651dfabSDeepak Rawat #define SVGA3D_MAX_DX10_STREAMOUT_DECLS 64 14670651dfabSDeepak Rawat #define SVGA3D_MAX_STREAMOUT_DECLS 512 14688ce75f8aSSinclair Yeh 1469ebc9ac7cSZack Rusin #pragma pack(push, 1) 1470ebc9ac7cSZack Rusin typedef struct SVGA3dStreamOutputDeclarationEntry { 14718ce75f8aSSinclair Yeh uint32 outputSlot; 14728ce75f8aSSinclair Yeh uint32 registerIndex; 14738ce75f8aSSinclair Yeh uint8 registerMask; 14748ce75f8aSSinclair Yeh uint8 pad0; 14758ce75f8aSSinclair Yeh uint16 pad1; 14768ce75f8aSSinclair Yeh uint32 stream; 1477ebc9ac7cSZack Rusin } SVGA3dStreamOutputDeclarationEntry; 1478ebc9ac7cSZack Rusin #pragma pack(pop) 14798ce75f8aSSinclair Yeh 1480ebc9ac7cSZack Rusin #pragma pack(push, 1) 1481ebc9ac7cSZack Rusin typedef struct SVGAOTableStreamOutputEntry { 14828ce75f8aSSinclair Yeh uint32 numOutputStreamEntries; 14830651dfabSDeepak Rawat SVGA3dStreamOutputDeclarationEntry decl[SVGA3D_MAX_DX10_STREAMOUT_DECLS]; 14848ce75f8aSSinclair Yeh uint32 streamOutputStrideInBytes[SVGA3D_DX_MAX_SOTARGETS]; 14858ce75f8aSSinclair Yeh uint32 rasterizedStream; 14860651dfabSDeepak Rawat uint32 numOutputStreamStrides; 14870651dfabSDeepak Rawat uint32 mobid; 14880651dfabSDeepak Rawat uint32 offsetInBytes; 14890651dfabSDeepak Rawat uint8 usesMob; 14900651dfabSDeepak Rawat uint8 pad0; 14910651dfabSDeepak Rawat uint16 pad1; 14920651dfabSDeepak Rawat uint32 pad2[246]; 1493ebc9ac7cSZack Rusin } SVGACOTableDXStreamOutputEntry; 1494ebc9ac7cSZack Rusin #pragma pack(pop) 14958ce75f8aSSinclair Yeh 1496ebc9ac7cSZack Rusin #pragma pack(push, 1) 1497ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineStreamOutput { 14988ce75f8aSSinclair Yeh SVGA3dStreamOutputId soid; 14998ce75f8aSSinclair Yeh uint32 numOutputStreamEntries; 15000651dfabSDeepak Rawat SVGA3dStreamOutputDeclarationEntry decl[SVGA3D_MAX_DX10_STREAMOUT_DECLS]; 15018ce75f8aSSinclair Yeh uint32 streamOutputStrideInBytes[SVGA3D_DX_MAX_SOTARGETS]; 15028ce75f8aSSinclair Yeh uint32 rasterizedStream; 1503ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineStreamOutput; 1504ebc9ac7cSZack Rusin #pragma pack(pop) 15050651dfabSDeepak Rawat 15060651dfabSDeepak Rawat #define SVGA3D_DX_SO_NO_RASTERIZED_STREAM 0xFFFFFFFF 15070651dfabSDeepak Rawat 1508ebc9ac7cSZack Rusin #pragma pack(push, 1) 1509ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDefineStreamOutputWithMob { 15100651dfabSDeepak Rawat SVGA3dStreamOutputId soid; 15110651dfabSDeepak Rawat uint32 numOutputStreamEntries; 15120651dfabSDeepak Rawat uint32 numOutputStreamStrides; 15130651dfabSDeepak Rawat uint32 streamOutputStrideInBytes[SVGA3D_DX_MAX_SOTARGETS]; 15140651dfabSDeepak Rawat uint32 rasterizedStream; 1515ebc9ac7cSZack Rusin } SVGA3dCmdDXDefineStreamOutputWithMob; 1516ebc9ac7cSZack Rusin #pragma pack(pop) 15170651dfabSDeepak Rawat 1518ebc9ac7cSZack Rusin #pragma pack(push, 1) 1519ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXBindStreamOutput { 15200651dfabSDeepak Rawat SVGA3dStreamOutputId soid; 15210651dfabSDeepak Rawat uint32 mobid; 15220651dfabSDeepak Rawat uint32 offsetInBytes; 15230651dfabSDeepak Rawat uint32 sizeInBytes; 1524ebc9ac7cSZack Rusin } SVGA3dCmdDXBindStreamOutput; 1525ebc9ac7cSZack Rusin #pragma pack(pop) 15260651dfabSDeepak Rawat 1527ebc9ac7cSZack Rusin #pragma pack(push, 1) 1528ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXDestroyStreamOutput { 15298ce75f8aSSinclair Yeh SVGA3dStreamOutputId soid; 1530ebc9ac7cSZack Rusin } SVGA3dCmdDXDestroyStreamOutput; 1531ebc9ac7cSZack Rusin #pragma pack(pop) 15328ce75f8aSSinclair Yeh 1533ebc9ac7cSZack Rusin #pragma pack(push, 1) 1534ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetStreamOutput { 15358ce75f8aSSinclair Yeh SVGA3dStreamOutputId soid; 1536ebc9ac7cSZack Rusin } SVGA3dCmdDXSetStreamOutput; 1537ebc9ac7cSZack Rusin #pragma pack(pop) 15388ce75f8aSSinclair Yeh 1539ebc9ac7cSZack Rusin #pragma pack(push, 1) 1540ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetMinLOD { 15410651dfabSDeepak Rawat SVGA3dSurfaceId sid; 15420651dfabSDeepak Rawat float minLOD; 1543ebc9ac7cSZack Rusin } SVGA3dCmdDXSetMinLOD; 1544ebc9ac7cSZack Rusin #pragma pack(pop) 15450651dfabSDeepak Rawat 1546ebc9ac7cSZack Rusin #pragma pack(push, 1) 1547ebc9ac7cSZack Rusin typedef struct { 15488ce75f8aSSinclair Yeh uint64 value; 15498ce75f8aSSinclair Yeh uint32 mobId; 15508ce75f8aSSinclair Yeh uint32 mobOffset; 1551ebc9ac7cSZack Rusin } SVGA3dCmdDXMobFence64; 1552ebc9ac7cSZack Rusin #pragma pack(pop) 15538ce75f8aSSinclair Yeh 1554ebc9ac7cSZack Rusin #pragma pack(push, 1) 1555ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXSetCOTable { 15568ce75f8aSSinclair Yeh uint32 cid; 15578ce75f8aSSinclair Yeh uint32 mobid; 15588ce75f8aSSinclair Yeh SVGACOTableType type; 15598ce75f8aSSinclair Yeh uint32 validSizeInBytes; 1560ebc9ac7cSZack Rusin } SVGA3dCmdDXSetCOTable; 1561ebc9ac7cSZack Rusin #pragma pack(pop) 15628ce75f8aSSinclair Yeh 1563ebc9ac7cSZack Rusin #pragma pack(push, 1) 1564ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXGrowCOTable { 1565dc75e733SDeepak Rawat uint32 cid; 1566dc75e733SDeepak Rawat uint32 mobid; 1567dc75e733SDeepak Rawat SVGACOTableType type; 1568dc75e733SDeepak Rawat uint32 validSizeInBytes; 1569ebc9ac7cSZack Rusin } SVGA3dCmdDXGrowCOTable; 1570ebc9ac7cSZack Rusin #pragma pack(pop) 1571dc75e733SDeepak Rawat 1572ebc9ac7cSZack Rusin #pragma pack(push, 1) 1573ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXReadbackCOTable { 15748ce75f8aSSinclair Yeh uint32 cid; 15758ce75f8aSSinclair Yeh SVGACOTableType type; 1576ebc9ac7cSZack Rusin } SVGA3dCmdDXReadbackCOTable; 1577ebc9ac7cSZack Rusin #pragma pack(pop) 15788ce75f8aSSinclair Yeh 1579ebc9ac7cSZack Rusin #pragma pack(push, 1) 1580ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXCopyCOTableIntoMob { 1581ebc9ac7cSZack Rusin uint32 cid; 1582ebc9ac7cSZack Rusin SVGACOTableType type; 15838ce75f8aSSinclair Yeh uint32 mobid; 1584ebc9ac7cSZack Rusin } SVGA3dCmdDXCopyCOTableIntoMob; 1585ebc9ac7cSZack Rusin #pragma pack(pop) 15868ce75f8aSSinclair Yeh 1587ebc9ac7cSZack Rusin #pragma pack(push, 1) 1588ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXPredStagingCopy { 1589ebc9ac7cSZack Rusin SVGA3dSurfaceId dstSid; 1590ebc9ac7cSZack Rusin SVGA3dSurfaceId srcSid; 1591ebc9ac7cSZack Rusin uint8 readback; 1592ebc9ac7cSZack Rusin uint8 unsynchronized; 1593ebc9ac7cSZack Rusin uint8 mustBeZero[2]; 1594ebc9ac7cSZack Rusin 1595ebc9ac7cSZack Rusin } SVGA3dCmdDXPredStagingCopy; 1596ebc9ac7cSZack Rusin #pragma pack(pop) 1597ebc9ac7cSZack Rusin 1598ebc9ac7cSZack Rusin #pragma pack(push, 1) 1599ebc9ac7cSZack Rusin typedef struct SVGA3dCmdDXStagingCopy { 1600ebc9ac7cSZack Rusin SVGA3dSurfaceId dstSid; 1601ebc9ac7cSZack Rusin SVGA3dSurfaceId srcSid; 1602ebc9ac7cSZack Rusin uint8 readback; 1603ebc9ac7cSZack Rusin uint8 unsynchronized; 1604ebc9ac7cSZack Rusin uint8 mustBeZero[2]; 1605ebc9ac7cSZack Rusin 1606ebc9ac7cSZack Rusin } SVGA3dCmdDXStagingCopy; 1607ebc9ac7cSZack Rusin #pragma pack(pop) 1608ebc9ac7cSZack Rusin 1609ebc9ac7cSZack Rusin #pragma pack(push, 1) 1610ebc9ac7cSZack Rusin typedef struct SVGA3dCOTableData { 1611ebc9ac7cSZack Rusin uint32 mobid; 1612ebc9ac7cSZack Rusin } SVGA3dCOTableData; 1613ebc9ac7cSZack Rusin #pragma pack(pop) 1614ebc9ac7cSZack Rusin 1615ebc9ac7cSZack Rusin #pragma pack(push, 1) 1616ebc9ac7cSZack Rusin typedef struct SVGA3dBufferBinding { 16178ce75f8aSSinclair Yeh uint32 bufferId; 16188ce75f8aSSinclair Yeh uint32 stride; 16198ce75f8aSSinclair Yeh uint32 offset; 1620ebc9ac7cSZack Rusin } SVGA3dBufferBinding; 1621ebc9ac7cSZack Rusin #pragma pack(pop) 16228ce75f8aSSinclair Yeh 1623ebc9ac7cSZack Rusin #pragma pack(push, 1) 1624ebc9ac7cSZack Rusin typedef struct SVGA3dConstantBufferBinding { 16258ce75f8aSSinclair Yeh uint32 sid; 16268ce75f8aSSinclair Yeh uint32 offsetInBytes; 16278ce75f8aSSinclair Yeh uint32 sizeInBytes; 1628ebc9ac7cSZack Rusin } SVGA3dConstantBufferBinding; 1629ebc9ac7cSZack Rusin #pragma pack(pop) 16308ce75f8aSSinclair Yeh 1631ebc9ac7cSZack Rusin #pragma pack(push, 1) 1632ebc9ac7cSZack Rusin typedef struct SVGADXInputAssemblyMobFormat { 16338ce75f8aSSinclair Yeh uint32 layoutId; 16348ce75f8aSSinclair Yeh SVGA3dBufferBinding vertexBuffers[SVGA3D_DX_MAX_VERTEXBUFFERS]; 16358ce75f8aSSinclair Yeh uint32 indexBufferSid; 16368ce75f8aSSinclair Yeh uint32 pad; 16378ce75f8aSSinclair Yeh uint32 indexBufferOffset; 16388ce75f8aSSinclair Yeh uint32 indexBufferFormat; 16398ce75f8aSSinclair Yeh uint32 topology; 1640ebc9ac7cSZack Rusin } SVGADXInputAssemblyMobFormat; 1641ebc9ac7cSZack Rusin #pragma pack(pop) 16428ce75f8aSSinclair Yeh 1643ebc9ac7cSZack Rusin #pragma pack(push, 1) 1644ebc9ac7cSZack Rusin typedef struct SVGADXContextMobFormat { 16458ce75f8aSSinclair Yeh SVGADXInputAssemblyMobFormat inputAssembly; 16468ce75f8aSSinclair Yeh 16478ce75f8aSSinclair Yeh struct { 16488ce75f8aSSinclair Yeh uint32 blendStateId; 16498ce75f8aSSinclair Yeh uint32 blendFactor[4]; 16508ce75f8aSSinclair Yeh uint32 sampleMask; 16518ce75f8aSSinclair Yeh uint32 depthStencilStateId; 16528ce75f8aSSinclair Yeh uint32 stencilRef; 16538ce75f8aSSinclair Yeh uint32 rasterizerStateId; 16548ce75f8aSSinclair Yeh uint32 depthStencilViewId; 1655ebc9ac7cSZack Rusin uint32 renderTargetViewIds[SVGA3D_DX_MAX_RENDER_TARGETS]; 16568ce75f8aSSinclair Yeh } renderState; 16578ce75f8aSSinclair Yeh 16580651dfabSDeepak Rawat uint32 pad0[8]; 16590651dfabSDeepak Rawat 16608ce75f8aSSinclair Yeh struct { 16618ce75f8aSSinclair Yeh uint32 targets[SVGA3D_DX_MAX_SOTARGETS]; 16628ce75f8aSSinclair Yeh uint32 soid; 16638ce75f8aSSinclair Yeh } streamOut; 16640651dfabSDeepak Rawat 16650651dfabSDeepak Rawat uint32 pad1[10]; 16660651dfabSDeepak Rawat 16670651dfabSDeepak Rawat uint32 uavSpliceIndex; 16688ce75f8aSSinclair Yeh 16698ce75f8aSSinclair Yeh uint8 numViewports; 16708ce75f8aSSinclair Yeh uint8 numScissorRects; 16710651dfabSDeepak Rawat uint16 pad2[1]; 16728ce75f8aSSinclair Yeh 16730651dfabSDeepak Rawat uint32 pad3[3]; 16748ce75f8aSSinclair Yeh 16758ce75f8aSSinclair Yeh SVGA3dViewport viewports[SVGA3D_DX_MAX_VIEWPORTS]; 16760651dfabSDeepak Rawat uint32 pad4[32]; 16778ce75f8aSSinclair Yeh 16788ce75f8aSSinclair Yeh SVGASignedRect scissorRects[SVGA3D_DX_MAX_SCISSORRECTS]; 16790651dfabSDeepak Rawat uint32 pad5[64]; 16808ce75f8aSSinclair Yeh 16818ce75f8aSSinclair Yeh struct { 16828ce75f8aSSinclair Yeh uint32 queryID; 16838ce75f8aSSinclair Yeh uint32 value; 16848ce75f8aSSinclair Yeh } predication; 16858ce75f8aSSinclair Yeh 16860651dfabSDeepak Rawat SVGAMobId shaderIfaceMobid; 16870651dfabSDeepak Rawat uint32 shaderIfaceOffset; 16888ce75f8aSSinclair Yeh struct { 16898ce75f8aSSinclair Yeh uint32 shaderId; 1690ebc9ac7cSZack Rusin SVGA3dConstantBufferBinding 1691ebc9ac7cSZack Rusin constantBuffers[SVGA3D_DX_MAX_CONSTBUFFERS]; 16928ce75f8aSSinclair Yeh uint32 shaderResources[SVGA3D_DX_MAX_SRVIEWS]; 16938ce75f8aSSinclair Yeh uint32 samplers[SVGA3D_DX_MAX_SAMPLERS]; 16948ce75f8aSSinclair Yeh } shaderState[SVGA3D_NUM_SHADERTYPE]; 16958ce75f8aSSinclair Yeh uint32 pad6[26]; 16968ce75f8aSSinclair Yeh 16978ce75f8aSSinclair Yeh SVGA3dQueryId queryID[SVGA3D_MAX_QUERY]; 16988ce75f8aSSinclair Yeh 16998ce75f8aSSinclair Yeh SVGA3dCOTableData cotables[SVGA_COTABLE_MAX]; 17000651dfabSDeepak Rawat 17010651dfabSDeepak Rawat uint32 pad7[64]; 17020651dfabSDeepak Rawat 17030651dfabSDeepak Rawat uint32 uaViewIds[SVGA3D_DX11_1_MAX_UAVIEWS]; 17040651dfabSDeepak Rawat uint32 csuaViewIds[SVGA3D_DX11_1_MAX_UAVIEWS]; 17050651dfabSDeepak Rawat 17060651dfabSDeepak Rawat uint32 pad8[188]; 1707ebc9ac7cSZack Rusin } SVGADXContextMobFormat; 1708ebc9ac7cSZack Rusin #pragma pack(pop) 17098ce75f8aSSinclair Yeh 17100651dfabSDeepak Rawat #define SVGA3D_DX_MAX_CLASS_INSTANCES_PADDED 256 17110651dfabSDeepak Rawat 1712ebc9ac7cSZack Rusin #pragma pack(push, 1) 1713ebc9ac7cSZack Rusin typedef struct SVGADXShaderIfaceMobFormat { 17140651dfabSDeepak Rawat struct { 17150651dfabSDeepak Rawat uint32 numClassInstances; 17160651dfabSDeepak Rawat uint32 iface[SVGA3D_DX_MAX_CLASS_INSTANCES_PADDED]; 17170651dfabSDeepak Rawat SVGA3dIfaceData data[SVGA3D_DX_MAX_CLASS_INSTANCES_PADDED]; 17180651dfabSDeepak Rawat } shaderIfaceState[SVGA3D_NUM_SHADERTYPE]; 17190651dfabSDeepak Rawat 17200651dfabSDeepak Rawat uint32 pad0[1018]; 1721ebc9ac7cSZack Rusin } SVGADXShaderIfaceMobFormat; 1722ebc9ac7cSZack Rusin #pragma pack(pop) 17230651dfabSDeepak Rawat 1724ebc9ac7cSZack Rusin #endif 1725