1bf215546Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2bf215546Sopenharmony_ci/* 3bf215546Sopenharmony_ci * Copyright 2012-2022 VMware, Inc. 4bf215546Sopenharmony_ci * 5bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person 6bf215546Sopenharmony_ci * obtaining a copy of this software and associated documentation 7bf215546Sopenharmony_ci * files (the "Software"), to deal in the Software without 8bf215546Sopenharmony_ci * restriction, including without limitation the rights to use, copy, 9bf215546Sopenharmony_ci * modify, merge, publish, distribute, sublicense, and/or sell copies 10bf215546Sopenharmony_ci * of the Software, and to permit persons to whom the Software is 11bf215546Sopenharmony_ci * furnished to do so, subject to the following conditions: 12bf215546Sopenharmony_ci * 13bf215546Sopenharmony_ci * The above copyright notice and this permission notice shall be 14bf215546Sopenharmony_ci * included in all copies or substantial portions of the Software. 15bf215546Sopenharmony_ci * 16bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17bf215546Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18bf215546Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19bf215546Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20bf215546Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 21bf215546Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22bf215546Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23bf215546Sopenharmony_ci * SOFTWARE. 24bf215546Sopenharmony_ci * 25bf215546Sopenharmony_ci */ 26bf215546Sopenharmony_ci 27bf215546Sopenharmony_ci/* 28bf215546Sopenharmony_ci * svga3d_cmd.h -- 29bf215546Sopenharmony_ci * 30bf215546Sopenharmony_ci * SVGA 3d hardware cmd definitions 31bf215546Sopenharmony_ci */ 32bf215546Sopenharmony_ci 33bf215546Sopenharmony_ci#ifndef _SVGA3D_CMD_H_ 34bf215546Sopenharmony_ci#define _SVGA3D_CMD_H_ 35bf215546Sopenharmony_ci 36bf215546Sopenharmony_ci#define INCLUDE_ALLOW_MODULE 37bf215546Sopenharmony_ci#define INCLUDE_ALLOW_USERLEVEL 38bf215546Sopenharmony_ci#define INCLUDE_ALLOW_VMCORE 39bf215546Sopenharmony_ci 40bf215546Sopenharmony_ci#include "includeCheck.h" 41bf215546Sopenharmony_ci#include "svga3d_types.h" 42bf215546Sopenharmony_ci#include "svga3d_limits.h" 43bf215546Sopenharmony_ci 44bf215546Sopenharmony_ci/* 45bf215546Sopenharmony_ci * Identifiers for commands in the command FIFO. 46bf215546Sopenharmony_ci * 47bf215546Sopenharmony_ci * IDs between 1000 and 1039 (inclusive) were used by obsolete versions of 48bf215546Sopenharmony_ci * the SVGA3D protocol and remain reserved; they should not be used in the 49bf215546Sopenharmony_ci * future. 50bf215546Sopenharmony_ci * 51bf215546Sopenharmony_ci * IDs between 1040 and 2999 (inclusive) are available for use by the 52bf215546Sopenharmony_ci * current SVGA3D protocol. 53bf215546Sopenharmony_ci * 54bf215546Sopenharmony_ci * FIFO clients other than SVGA3D should stay below 1000, or at 3000 55bf215546Sopenharmony_ci * and up. 56bf215546Sopenharmony_ci */ 57bf215546Sopenharmony_ci 58bf215546Sopenharmony_citypedef enum { 59bf215546Sopenharmony_ci SVGA_3D_CMD_LEGACY_BASE = 1000, 60bf215546Sopenharmony_ci SVGA_3D_CMD_BASE = 1040, 61bf215546Sopenharmony_ci 62bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_DEFINE = 1040, 63bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_DESTROY = 1041, 64bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_COPY = 1042, 65bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_STRETCHBLT = 1043, 66bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_DMA = 1044, 67bf215546Sopenharmony_ci SVGA_3D_CMD_CONTEXT_DEFINE = 1045, 68bf215546Sopenharmony_ci SVGA_3D_CMD_CONTEXT_DESTROY = 1046, 69bf215546Sopenharmony_ci SVGA_3D_CMD_SETTRANSFORM = 1047, 70bf215546Sopenharmony_ci SVGA_3D_CMD_SETZRANGE = 1048, 71bf215546Sopenharmony_ci SVGA_3D_CMD_SETRENDERSTATE = 1049, 72bf215546Sopenharmony_ci SVGA_3D_CMD_SETRENDERTARGET = 1050, 73bf215546Sopenharmony_ci SVGA_3D_CMD_SETTEXTURESTATE = 1051, 74bf215546Sopenharmony_ci SVGA_3D_CMD_SETMATERIAL = 1052, 75bf215546Sopenharmony_ci SVGA_3D_CMD_SETLIGHTDATA = 1053, 76bf215546Sopenharmony_ci SVGA_3D_CMD_SETLIGHTENABLED = 1054, 77bf215546Sopenharmony_ci SVGA_3D_CMD_SETVIEWPORT = 1055, 78bf215546Sopenharmony_ci SVGA_3D_CMD_SETCLIPPLANE = 1056, 79bf215546Sopenharmony_ci SVGA_3D_CMD_CLEAR = 1057, 80bf215546Sopenharmony_ci SVGA_3D_CMD_PRESENT = 1058, 81bf215546Sopenharmony_ci SVGA_3D_CMD_SHADER_DEFINE = 1059, 82bf215546Sopenharmony_ci SVGA_3D_CMD_SHADER_DESTROY = 1060, 83bf215546Sopenharmony_ci SVGA_3D_CMD_SET_SHADER = 1061, 84bf215546Sopenharmony_ci SVGA_3D_CMD_SET_SHADER_CONST = 1062, 85bf215546Sopenharmony_ci SVGA_3D_CMD_DRAW_PRIMITIVES = 1063, 86bf215546Sopenharmony_ci SVGA_3D_CMD_SETSCISSORRECT = 1064, 87bf215546Sopenharmony_ci SVGA_3D_CMD_BEGIN_QUERY = 1065, 88bf215546Sopenharmony_ci SVGA_3D_CMD_END_QUERY = 1066, 89bf215546Sopenharmony_ci SVGA_3D_CMD_WAIT_FOR_QUERY = 1067, 90bf215546Sopenharmony_ci SVGA_3D_CMD_PRESENT_READBACK = 1068, 91bf215546Sopenharmony_ci SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN = 1069, 92bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_DEFINE_V2 = 1070, 93bf215546Sopenharmony_ci SVGA_3D_CMD_GENERATE_MIPMAPS = 1071, 94bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD4 = 1072, 95bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD5 = 1073, 96bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD6 = 1074, 97bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD7 = 1075, 98bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD8 = 1076, 99bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD9 = 1077, 100bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD10 = 1078, 101bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD11 = 1079, 102bf215546Sopenharmony_ci SVGA_3D_CMD_ACTIVATE_SURFACE = 1080, 103bf215546Sopenharmony_ci SVGA_3D_CMD_DEACTIVATE_SURFACE = 1081, 104bf215546Sopenharmony_ci SVGA_3D_CMD_SCREEN_DMA = 1082, 105bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD1 = 1083, 106bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD2 = 1084, 107bf215546Sopenharmony_ci 108bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD12 = 1085, 109bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD13 = 1086, 110bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD14 = 1087, 111bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD15 = 1088, 112bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD16 = 1089, 113bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD17 = 1090, 114bf215546Sopenharmony_ci 115bf215546Sopenharmony_ci SVGA_3D_CMD_SET_OTABLE_BASE = 1091, 116bf215546Sopenharmony_ci SVGA_3D_CMD_READBACK_OTABLE = 1092, 117bf215546Sopenharmony_ci 118bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_MOB = 1093, 119bf215546Sopenharmony_ci SVGA_3D_CMD_DESTROY_GB_MOB = 1094, 120bf215546Sopenharmony_ci SVGA_3D_CMD_DEAD3 = 1095, 121bf215546Sopenharmony_ci SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING = 1096, 122bf215546Sopenharmony_ci 123bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_SURFACE = 1097, 124bf215546Sopenharmony_ci SVGA_3D_CMD_DESTROY_GB_SURFACE = 1098, 125bf215546Sopenharmony_ci SVGA_3D_CMD_BIND_GB_SURFACE = 1099, 126bf215546Sopenharmony_ci SVGA_3D_CMD_COND_BIND_GB_SURFACE = 1100, 127bf215546Sopenharmony_ci SVGA_3D_CMD_UPDATE_GB_IMAGE = 1101, 128bf215546Sopenharmony_ci SVGA_3D_CMD_UPDATE_GB_SURFACE = 1102, 129bf215546Sopenharmony_ci SVGA_3D_CMD_READBACK_GB_IMAGE = 1103, 130bf215546Sopenharmony_ci SVGA_3D_CMD_READBACK_GB_SURFACE = 1104, 131bf215546Sopenharmony_ci SVGA_3D_CMD_INVALIDATE_GB_IMAGE = 1105, 132bf215546Sopenharmony_ci SVGA_3D_CMD_INVALIDATE_GB_SURFACE = 1106, 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_CONTEXT = 1107, 135bf215546Sopenharmony_ci SVGA_3D_CMD_DESTROY_GB_CONTEXT = 1108, 136bf215546Sopenharmony_ci SVGA_3D_CMD_BIND_GB_CONTEXT = 1109, 137bf215546Sopenharmony_ci SVGA_3D_CMD_READBACK_GB_CONTEXT = 1110, 138bf215546Sopenharmony_ci SVGA_3D_CMD_INVALIDATE_GB_CONTEXT = 1111, 139bf215546Sopenharmony_ci 140bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_SHADER = 1112, 141bf215546Sopenharmony_ci SVGA_3D_CMD_DESTROY_GB_SHADER = 1113, 142bf215546Sopenharmony_ci SVGA_3D_CMD_BIND_GB_SHADER = 1114, 143bf215546Sopenharmony_ci 144bf215546Sopenharmony_ci SVGA_3D_CMD_SET_OTABLE_BASE64 = 1115, 145bf215546Sopenharmony_ci 146bf215546Sopenharmony_ci SVGA_3D_CMD_BEGIN_GB_QUERY = 1116, 147bf215546Sopenharmony_ci SVGA_3D_CMD_END_GB_QUERY = 1117, 148bf215546Sopenharmony_ci SVGA_3D_CMD_WAIT_FOR_GB_QUERY = 1118, 149bf215546Sopenharmony_ci 150bf215546Sopenharmony_ci SVGA_3D_CMD_NOP = 1119, 151bf215546Sopenharmony_ci 152bf215546Sopenharmony_ci SVGA_3D_CMD_ENABLE_GART = 1120, 153bf215546Sopenharmony_ci SVGA_3D_CMD_DISABLE_GART = 1121, 154bf215546Sopenharmony_ci SVGA_3D_CMD_MAP_MOB_INTO_GART = 1122, 155bf215546Sopenharmony_ci SVGA_3D_CMD_UNMAP_GART_RANGE = 1123, 156bf215546Sopenharmony_ci 157bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_SCREENTARGET = 1124, 158bf215546Sopenharmony_ci SVGA_3D_CMD_DESTROY_GB_SCREENTARGET = 1125, 159bf215546Sopenharmony_ci SVGA_3D_CMD_BIND_GB_SCREENTARGET = 1126, 160bf215546Sopenharmony_ci SVGA_3D_CMD_UPDATE_GB_SCREENTARGET = 1127, 161bf215546Sopenharmony_ci 162bf215546Sopenharmony_ci SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL = 1128, 163bf215546Sopenharmony_ci SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL = 1129, 164bf215546Sopenharmony_ci 165bf215546Sopenharmony_ci SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE = 1130, 166bf215546Sopenharmony_ci 167bf215546Sopenharmony_ci SVGA_3D_CMD_GB_SCREEN_DMA = 1131, 168bf215546Sopenharmony_ci SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH = 1132, 169bf215546Sopenharmony_ci SVGA_3D_CMD_GB_MOB_FENCE = 1133, 170bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_SURFACE_V2 = 1134, 171bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_MOB64 = 1135, 172bf215546Sopenharmony_ci SVGA_3D_CMD_REDEFINE_GB_MOB64 = 1136, 173bf215546Sopenharmony_ci SVGA_3D_CMD_NOP_ERROR = 1137, 174bf215546Sopenharmony_ci 175bf215546Sopenharmony_ci SVGA_3D_CMD_SET_VERTEX_STREAMS = 1138, 176bf215546Sopenharmony_ci SVGA_3D_CMD_SET_VERTEX_DECLS = 1139, 177bf215546Sopenharmony_ci SVGA_3D_CMD_SET_VERTEX_DIVISORS = 1140, 178bf215546Sopenharmony_ci SVGA_3D_CMD_DRAW = 1141, 179bf215546Sopenharmony_ci SVGA_3D_CMD_DRAW_INDEXED = 1142, 180bf215546Sopenharmony_ci 181bf215546Sopenharmony_ci /* 182bf215546Sopenharmony_ci * DX10 Commands 183bf215546Sopenharmony_ci */ 184bf215546Sopenharmony_ci SVGA_3D_CMD_DX_MIN = 1143, 185bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_CONTEXT = 1143, 186bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_CONTEXT = 1144, 187bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_CONTEXT = 1145, 188bf215546Sopenharmony_ci SVGA_3D_CMD_DX_READBACK_CONTEXT = 1146, 189bf215546Sopenharmony_ci SVGA_3D_CMD_DX_INVALIDATE_CONTEXT = 1147, 190bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SINGLE_CONSTANT_BUFFER = 1148, 191bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SHADER_RESOURCES = 1149, 192bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SHADER = 1150, 193bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SAMPLERS = 1151, 194bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW = 1152, 195bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW_INDEXED = 1153, 196bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW_INSTANCED = 1154, 197bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED = 1155, 198bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW_AUTO = 1156, 199bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_INPUT_LAYOUT = 1157, 200bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS = 1158, 201bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_INDEX_BUFFER = 1159, 202bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_TOPOLOGY = 1160, 203bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_RENDERTARGETS = 1161, 204bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_BLEND_STATE = 1162, 205bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_DEPTHSTENCIL_STATE = 1163, 206bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_RASTERIZER_STATE = 1164, 207bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_QUERY = 1165, 208bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_QUERY = 1166, 209bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_QUERY = 1167, 210bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_QUERY_OFFSET = 1168, 211bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BEGIN_QUERY = 1169, 212bf215546Sopenharmony_ci SVGA_3D_CMD_DX_END_QUERY = 1170, 213bf215546Sopenharmony_ci SVGA_3D_CMD_DX_READBACK_QUERY = 1171, 214bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_PREDICATION = 1172, 215bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SOTARGETS = 1173, 216bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_VIEWPORTS = 1174, 217bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SCISSORRECTS = 1175, 218bf215546Sopenharmony_ci SVGA_3D_CMD_DX_CLEAR_RENDERTARGET_VIEW = 1176, 219bf215546Sopenharmony_ci SVGA_3D_CMD_DX_CLEAR_DEPTHSTENCIL_VIEW = 1177, 220bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_COPY_REGION = 1178, 221bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_COPY = 1179, 222bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRESENTBLT = 1180, 223bf215546Sopenharmony_ci SVGA_3D_CMD_DX_GENMIPS = 1181, 224bf215546Sopenharmony_ci SVGA_3D_CMD_DX_UPDATE_SUBRESOURCE = 1182, 225bf215546Sopenharmony_ci SVGA_3D_CMD_DX_READBACK_SUBRESOURCE = 1183, 226bf215546Sopenharmony_ci SVGA_3D_CMD_DX_INVALIDATE_SUBRESOURCE = 1184, 227bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_SHADERRESOURCE_VIEW = 1185, 228bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_SHADERRESOURCE_VIEW = 1186, 229bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW = 1187, 230bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_RENDERTARGET_VIEW = 1188, 231bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW = 1189, 232bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_VIEW = 1190, 233bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_ELEMENTLAYOUT = 1191, 234bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_ELEMENTLAYOUT = 1192, 235bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_BLEND_STATE = 1193, 236bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_BLEND_STATE = 1194, 237bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_STATE = 1195, 238bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_STATE = 1196, 239bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE = 1197, 240bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_RASTERIZER_STATE = 1198, 241bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_SAMPLER_STATE = 1199, 242bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_SAMPLER_STATE = 1200, 243bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_SHADER = 1201, 244bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_SHADER = 1202, 245bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_SHADER = 1203, 246bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT = 1204, 247bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_STREAMOUTPUT = 1205, 248bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_STREAMOUTPUT = 1206, 249bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_COTABLE = 1207, 250bf215546Sopenharmony_ci SVGA_3D_CMD_DX_READBACK_COTABLE = 1208, 251bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BUFFER_COPY = 1209, 252bf215546Sopenharmony_ci SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER = 1210, 253bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SURFACE_COPY_AND_READBACK = 1211, 254bf215546Sopenharmony_ci SVGA_3D_CMD_DX_MOVE_QUERY = 1212, 255bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_ALL_QUERY = 1213, 256bf215546Sopenharmony_ci SVGA_3D_CMD_DX_READBACK_ALL_QUERY = 1214, 257bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_TRANSFER_FROM_BUFFER = 1215, 258bf215546Sopenharmony_ci SVGA_3D_CMD_DX_MOB_FENCE_64 = 1216, 259bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_ALL_SHADER = 1217, 260bf215546Sopenharmony_ci SVGA_3D_CMD_DX_HINT = 1218, 261bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BUFFER_UPDATE = 1219, 262bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET = 1220, 263bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_PS_CONSTANT_BUFFER_OFFSET = 1221, 264bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_GS_CONSTANT_BUFFER_OFFSET = 1222, 265bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_HS_CONSTANT_BUFFER_OFFSET = 1223, 266bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_DS_CONSTANT_BUFFER_OFFSET = 1224, 267bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_CS_CONSTANT_BUFFER_OFFSET = 1225, 268bf215546Sopenharmony_ci 269bf215546Sopenharmony_ci SVGA_3D_CMD_DX_COND_BIND_ALL_SHADER = 1226, 270bf215546Sopenharmony_ci SVGA_3D_CMD_DX_MAX = 1227, 271bf215546Sopenharmony_ci 272bf215546Sopenharmony_ci SVGA_3D_CMD_SCREEN_COPY = 1227, 273bf215546Sopenharmony_ci 274bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_DEFINE_DECODER = 1228, 275bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_DESTROY_DECODER = 1229, 276bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_DEFINE_PROCESSOR = 1230, 277bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_DESTROY_PROCESSOR = 1231, 278bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_DECODE_FRAME = 1232, 279bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_PROCESS_FRAME = 1233, 280bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_BIND_DECODER_MOB = 1234, 281bf215546Sopenharmony_ci SVGA_3D_CMD_VIDEO_READBACK_DECODER_MOB = 1235, 282bf215546Sopenharmony_ci 283bf215546Sopenharmony_ci SVGA_3D_CMD_GROW_OTABLE = 1236, 284bf215546Sopenharmony_ci SVGA_3D_CMD_DX_GROW_COTABLE = 1237, 285bf215546Sopenharmony_ci SVGA_3D_CMD_INTRA_SURFACE_COPY = 1238, 286bf215546Sopenharmony_ci 287bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_SURFACE_V3 = 1239, 288bf215546Sopenharmony_ci 289bf215546Sopenharmony_ci SVGA_3D_CMD_DX_RESOLVE_COPY = 1240, 290bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_RESOLVE_COPY = 1241, 291bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_CONVERT_REGION = 1242, 292bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_CONVERT = 1243, 293bf215546Sopenharmony_ci SVGA_3D_CMD_WHOLE_SURFACE_COPY = 1244, 294bf215546Sopenharmony_ci 295bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_UA_VIEW = 1245, 296bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DESTROY_UA_VIEW = 1246, 297bf215546Sopenharmony_ci SVGA_3D_CMD_DX_CLEAR_UA_VIEW_UINT = 1247, 298bf215546Sopenharmony_ci SVGA_3D_CMD_DX_CLEAR_UA_VIEW_FLOAT = 1248, 299bf215546Sopenharmony_ci SVGA_3D_CMD_DX_COPY_STRUCTURE_COUNT = 1249, 300bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_UA_VIEWS = 1250, 301bf215546Sopenharmony_ci 302bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED_INDIRECT = 1251, 303bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DRAW_INSTANCED_INDIRECT = 1252, 304bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DISPATCH = 1253, 305bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DISPATCH_INDIRECT = 1254, 306bf215546Sopenharmony_ci 307bf215546Sopenharmony_ci SVGA_3D_CMD_WRITE_ZERO_SURFACE = 1255, 308bf215546Sopenharmony_ci SVGA_3D_CMD_HINT_ZERO_SURFACE = 1256, 309bf215546Sopenharmony_ci SVGA_3D_CMD_DX_TRANSFER_TO_BUFFER = 1257, 310bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_STRUCTURE_COUNT = 1258, 311bf215546Sopenharmony_ci 312bf215546Sopenharmony_ci SVGA_3D_CMD_LOGICOPS_BITBLT = 1259, 313bf215546Sopenharmony_ci SVGA_3D_CMD_LOGICOPS_TRANSBLT = 1260, 314bf215546Sopenharmony_ci SVGA_3D_CMD_LOGICOPS_STRETCHBLT = 1261, 315bf215546Sopenharmony_ci SVGA_3D_CMD_LOGICOPS_COLORFILL = 1262, 316bf215546Sopenharmony_ci SVGA_3D_CMD_LOGICOPS_ALPHABLEND = 1263, 317bf215546Sopenharmony_ci SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND = 1264, 318bf215546Sopenharmony_ci 319bf215546Sopenharmony_ci SVGA_3D_CMD_DX_COPY_COTABLE_INTO_MOB = 1265, 320bf215546Sopenharmony_ci 321bf215546Sopenharmony_ci SVGA_3D_CMD_UPDATE_GB_SCREENTARGET_V2 = 1266, 322bf215546Sopenharmony_ci SVGA_3D_CMD_DEFINE_GB_SURFACE_V4 = 1267, 323bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_CS_UA_VIEWS = 1268, 324bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_MIN_LOD = 1269, 325bf215546Sopenharmony_ci 326bf215546Sopenharmony_ci 327bf215546Sopenharmony_ci 328bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW_V2 = 1272, 329bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT_WITH_MOB = 1273, 330bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_SHADER_IFACE = 1274, 331bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_STREAMOUTPUT = 1275, 332bf215546Sopenharmony_ci SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS = 1276, 333bf215546Sopenharmony_ci SVGA_3D_CMD_DX_BIND_SHADER_IFACE = 1277, 334bf215546Sopenharmony_ci 335bf215546Sopenharmony_ci SVGA_3D_CMD_UPDATE_GB_SCREENTARGET_MOVE = 1278, 336bf215546Sopenharmony_ci 337bf215546Sopenharmony_ci 338bf215546Sopenharmony_ci 339bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_STAGING_COPY = 1281, 340bf215546Sopenharmony_ci SVGA_3D_CMD_DX_STAGING_COPY = 1282, 341bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_STAGING_COPY_REGION = 1283, 342bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS_V2 = 1284, 343bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_INDEX_BUFFER_V2 = 1285, 344bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS_OFFSET_AND_SIZE = 1286, 345bf215546Sopenharmony_ci SVGA_3D_CMD_DX_SET_INDEX_BUFFER_OFFSET_AND_SIZE = 1287, 346bf215546Sopenharmony_ci SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2 = 1288, 347bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_STAGING_CONVERT_REGION = 1289, 348bf215546Sopenharmony_ci SVGA_3D_CMD_DX_PRED_STAGING_CONVERT = 1290, 349bf215546Sopenharmony_ci SVGA_3D_CMD_DX_STAGING_BUFFER_COPY = 1291, 350bf215546Sopenharmony_ci 351bf215546Sopenharmony_ci 352bf215546Sopenharmony_ci 353bf215546Sopenharmony_ci 354bf215546Sopenharmony_ci 355bf215546Sopenharmony_ci SVGA_3D_CMD_MAX = 1303, 356bf215546Sopenharmony_ci SVGA_3D_CMD_FUTURE_MAX = 3000 357bf215546Sopenharmony_ci} SVGAFifo3dCmdId; 358bf215546Sopenharmony_ci 359bf215546Sopenharmony_ci#define SVGA_NUM_3D_CMD (SVGA_3D_CMD_MAX - SVGA_3D_CMD_BASE) 360bf215546Sopenharmony_ci 361bf215546Sopenharmony_ci 362bf215546Sopenharmony_ci 363bf215546Sopenharmony_ci/* 364bf215546Sopenharmony_ci * The data size header following cmdNum for every 3d command 365bf215546Sopenharmony_ci */ 366bf215546Sopenharmony_citypedef 367bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 368bf215546Sopenharmony_cistruct { 369bf215546Sopenharmony_ci uint32 id; 370bf215546Sopenharmony_ci uint32 size; 371bf215546Sopenharmony_ci} 372bf215546Sopenharmony_ci#include "vmware_pack_end.h" 373bf215546Sopenharmony_ciSVGA3dCmdHeader; 374bf215546Sopenharmony_ci 375bf215546Sopenharmony_citypedef 376bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 377bf215546Sopenharmony_cistruct { 378bf215546Sopenharmony_ci uint32 numMipLevels; 379bf215546Sopenharmony_ci} 380bf215546Sopenharmony_ci#include "vmware_pack_end.h" 381bf215546Sopenharmony_ciSVGA3dSurfaceFace; 382bf215546Sopenharmony_ci 383bf215546Sopenharmony_citypedef 384bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 385bf215546Sopenharmony_cistruct { 386bf215546Sopenharmony_ci uint32 sid; 387bf215546Sopenharmony_ci SVGA3dSurface1Flags surfaceFlags; 388bf215546Sopenharmony_ci SVGA3dSurfaceFormat format; 389bf215546Sopenharmony_ci 390bf215546Sopenharmony_ci /* 391bf215546Sopenharmony_ci * If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace 392bf215546Sopenharmony_ci * structures must have the same value of numMipLevels field. 393bf215546Sopenharmony_ci * Otherwise, all but the first SVGA3dSurfaceFace structures must have the 394bf215546Sopenharmony_ci * numMipLevels set to 0. 395bf215546Sopenharmony_ci */ 396bf215546Sopenharmony_ci SVGA3dSurfaceFace face[SVGA3D_MAX_SURFACE_FACES]; 397bf215546Sopenharmony_ci 398bf215546Sopenharmony_ci /* 399bf215546Sopenharmony_ci * Followed by an SVGA3dSize structure for each mip level in each face. 400bf215546Sopenharmony_ci * 401bf215546Sopenharmony_ci * A note on surface sizes: Sizes are always specified in pixels, 402bf215546Sopenharmony_ci * even if the true surface size is not a multiple of the minimum 403bf215546Sopenharmony_ci * block size of the surface's format. For example, a 3x3x1 DXT1 404bf215546Sopenharmony_ci * compressed texture would actually be stored as a 4x4x1 image in 405bf215546Sopenharmony_ci * memory. 406bf215546Sopenharmony_ci */ 407bf215546Sopenharmony_ci} 408bf215546Sopenharmony_ci#include "vmware_pack_end.h" 409bf215546Sopenharmony_ciSVGA3dCmdDefineSurface; /* SVGA_3D_CMD_SURFACE_DEFINE */ 410bf215546Sopenharmony_ci 411bf215546Sopenharmony_citypedef 412bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 413bf215546Sopenharmony_cistruct { 414bf215546Sopenharmony_ci uint32 sid; 415bf215546Sopenharmony_ci SVGA3dSurface1Flags surfaceFlags; 416bf215546Sopenharmony_ci SVGA3dSurfaceFormat format; 417bf215546Sopenharmony_ci 418bf215546Sopenharmony_ci /* 419bf215546Sopenharmony_ci * If surfaceFlags has SVGA3D_SURFACE_CUBEMAP bit set, all SVGA3dSurfaceFace 420bf215546Sopenharmony_ci * structures must have the same value of numMipLevels field. 421bf215546Sopenharmony_ci * Otherwise, all but the first SVGA3dSurfaceFace structures must have the 422bf215546Sopenharmony_ci * numMipLevels set to 0. 423bf215546Sopenharmony_ci */ 424bf215546Sopenharmony_ci SVGA3dSurfaceFace face[SVGA3D_MAX_SURFACE_FACES]; 425bf215546Sopenharmony_ci uint32 multisampleCount; 426bf215546Sopenharmony_ci SVGA3dTextureFilter autogenFilter; 427bf215546Sopenharmony_ci 428bf215546Sopenharmony_ci /* 429bf215546Sopenharmony_ci * Followed by an SVGA3dSize structure for each mip level in each face. 430bf215546Sopenharmony_ci * 431bf215546Sopenharmony_ci * A note on surface sizes: Sizes are always specified in pixels, 432bf215546Sopenharmony_ci * even if the true surface size is not a multiple of the minimum 433bf215546Sopenharmony_ci * block size of the surface's format. For example, a 3x3x1 DXT1 434bf215546Sopenharmony_ci * compressed texture would actually be stored as a 4x4x1 image in 435bf215546Sopenharmony_ci * memory. 436bf215546Sopenharmony_ci */ 437bf215546Sopenharmony_ci} 438bf215546Sopenharmony_ci#include "vmware_pack_end.h" 439bf215546Sopenharmony_ciSVGA3dCmdDefineSurface_v2; /* SVGA_3D_CMD_SURFACE_DEFINE_V2 */ 440bf215546Sopenharmony_ci 441bf215546Sopenharmony_citypedef 442bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 443bf215546Sopenharmony_cistruct { 444bf215546Sopenharmony_ci uint32 sid; 445bf215546Sopenharmony_ci} 446bf215546Sopenharmony_ci#include "vmware_pack_end.h" 447bf215546Sopenharmony_ciSVGA3dCmdDestroySurface; /* SVGA_3D_CMD_SURFACE_DESTROY */ 448bf215546Sopenharmony_ci 449bf215546Sopenharmony_citypedef 450bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 451bf215546Sopenharmony_cistruct { 452bf215546Sopenharmony_ci uint32 cid; 453bf215546Sopenharmony_ci} 454bf215546Sopenharmony_ci#include "vmware_pack_end.h" 455bf215546Sopenharmony_ciSVGA3dCmdDefineContext; /* SVGA_3D_CMD_CONTEXT_DEFINE */ 456bf215546Sopenharmony_ci 457bf215546Sopenharmony_citypedef 458bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 459bf215546Sopenharmony_cistruct { 460bf215546Sopenharmony_ci uint32 cid; 461bf215546Sopenharmony_ci} 462bf215546Sopenharmony_ci#include "vmware_pack_end.h" 463bf215546Sopenharmony_ciSVGA3dCmdDestroyContext; /* SVGA_3D_CMD_CONTEXT_DESTROY */ 464bf215546Sopenharmony_ci 465bf215546Sopenharmony_citypedef 466bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 467bf215546Sopenharmony_cistruct { 468bf215546Sopenharmony_ci uint32 cid; 469bf215546Sopenharmony_ci SVGA3dClearFlag clearFlag; 470bf215546Sopenharmony_ci uint32 color; 471bf215546Sopenharmony_ci float depth; 472bf215546Sopenharmony_ci uint32 stencil; 473bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dRect structures */ 474bf215546Sopenharmony_ci} 475bf215546Sopenharmony_ci#include "vmware_pack_end.h" 476bf215546Sopenharmony_ciSVGA3dCmdClear; /* SVGA_3D_CMD_CLEAR */ 477bf215546Sopenharmony_ci 478bf215546Sopenharmony_citypedef 479bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 480bf215546Sopenharmony_cistruct { 481bf215546Sopenharmony_ci SVGA3dLightType type; 482bf215546Sopenharmony_ci SVGA3dBool inWorldSpace; 483bf215546Sopenharmony_ci float diffuse[4]; 484bf215546Sopenharmony_ci float specular[4]; 485bf215546Sopenharmony_ci float ambient[4]; 486bf215546Sopenharmony_ci float position[4]; 487bf215546Sopenharmony_ci float direction[4]; 488bf215546Sopenharmony_ci float range; 489bf215546Sopenharmony_ci float falloff; 490bf215546Sopenharmony_ci float attenuation0; 491bf215546Sopenharmony_ci float attenuation1; 492bf215546Sopenharmony_ci float attenuation2; 493bf215546Sopenharmony_ci float theta; 494bf215546Sopenharmony_ci float phi; 495bf215546Sopenharmony_ci} 496bf215546Sopenharmony_ci#include "vmware_pack_end.h" 497bf215546Sopenharmony_ciSVGA3dLightData; 498bf215546Sopenharmony_ci 499bf215546Sopenharmony_citypedef 500bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 501bf215546Sopenharmony_cistruct { 502bf215546Sopenharmony_ci uint32 sid; 503bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dCopyRect structures */ 504bf215546Sopenharmony_ci} 505bf215546Sopenharmony_ci#include "vmware_pack_end.h" 506bf215546Sopenharmony_ciSVGA3dCmdPresent; /* SVGA_3D_CMD_PRESENT */ 507bf215546Sopenharmony_ci 508bf215546Sopenharmony_citypedef 509bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 510bf215546Sopenharmony_cistruct { 511bf215546Sopenharmony_ci SVGA3dRenderStateName state; 512bf215546Sopenharmony_ci union { 513bf215546Sopenharmony_ci uint32 uintValue; 514bf215546Sopenharmony_ci float floatValue; 515bf215546Sopenharmony_ci }; 516bf215546Sopenharmony_ci} 517bf215546Sopenharmony_ci#include "vmware_pack_end.h" 518bf215546Sopenharmony_ciSVGA3dRenderState; 519bf215546Sopenharmony_ci 520bf215546Sopenharmony_citypedef 521bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 522bf215546Sopenharmony_cistruct { 523bf215546Sopenharmony_ci uint32 cid; 524bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dRenderState structures */ 525bf215546Sopenharmony_ci} 526bf215546Sopenharmony_ci#include "vmware_pack_end.h" 527bf215546Sopenharmony_ciSVGA3dCmdSetRenderState; /* SVGA_3D_CMD_SETRENDERSTATE */ 528bf215546Sopenharmony_ci 529bf215546Sopenharmony_citypedef 530bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 531bf215546Sopenharmony_cistruct { 532bf215546Sopenharmony_ci uint32 cid; 533bf215546Sopenharmony_ci SVGA3dRenderTargetType type; 534bf215546Sopenharmony_ci SVGA3dSurfaceImageId target; 535bf215546Sopenharmony_ci} 536bf215546Sopenharmony_ci#include "vmware_pack_end.h" 537bf215546Sopenharmony_ciSVGA3dCmdSetRenderTarget; /* SVGA_3D_CMD_SETRENDERTARGET */ 538bf215546Sopenharmony_ci 539bf215546Sopenharmony_citypedef 540bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 541bf215546Sopenharmony_cistruct { 542bf215546Sopenharmony_ci SVGA3dSurfaceImageId src; 543bf215546Sopenharmony_ci SVGA3dSurfaceImageId dest; 544bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dCopyBox structures */ 545bf215546Sopenharmony_ci} 546bf215546Sopenharmony_ci#include "vmware_pack_end.h" 547bf215546Sopenharmony_ciSVGA3dCmdSurfaceCopy; /* SVGA_3D_CMD_SURFACE_COPY */ 548bf215546Sopenharmony_ci 549bf215546Sopenharmony_ci/* 550bf215546Sopenharmony_ci * Perform a surface copy within the same image. 551bf215546Sopenharmony_ci * The src/dest boxes are allowed to overlap. 552bf215546Sopenharmony_ci */ 553bf215546Sopenharmony_citypedef 554bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 555bf215546Sopenharmony_cistruct { 556bf215546Sopenharmony_ci SVGA3dSurfaceImageId surface; 557bf215546Sopenharmony_ci SVGA3dCopyBox box; 558bf215546Sopenharmony_ci} 559bf215546Sopenharmony_ci#include "vmware_pack_end.h" 560bf215546Sopenharmony_ciSVGA3dCmdIntraSurfaceCopy; /* SVGA_3D_CMD_INTRA_SURFACE_COPY */ 561bf215546Sopenharmony_ci 562bf215546Sopenharmony_citypedef 563bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 564bf215546Sopenharmony_cistruct { 565bf215546Sopenharmony_ci SVGA3dSurfaceImageId src; 566bf215546Sopenharmony_ci SVGA3dSurfaceImageId dest; 567bf215546Sopenharmony_ci SVGA3dBox boxSrc; 568bf215546Sopenharmony_ci SVGA3dBox boxDest; 569bf215546Sopenharmony_ci SVGA3dStretchBltMode mode; 570bf215546Sopenharmony_ci} 571bf215546Sopenharmony_ci#include "vmware_pack_end.h" 572bf215546Sopenharmony_ciSVGA3dCmdSurfaceStretchBlt; /* SVGA_3D_CMD_SURFACE_STRETCHBLT */ 573bf215546Sopenharmony_ci 574bf215546Sopenharmony_citypedef 575bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 576bf215546Sopenharmony_cistruct { 577bf215546Sopenharmony_ci /* 578bf215546Sopenharmony_ci * If the discard flag is present in a surface DMA operation, the host may 579bf215546Sopenharmony_ci * discard the contents of the current mipmap level and face of the target 580bf215546Sopenharmony_ci * surface before applying the surface DMA contents. 581bf215546Sopenharmony_ci */ 582bf215546Sopenharmony_ci uint32 discard : 1; 583bf215546Sopenharmony_ci 584bf215546Sopenharmony_ci /* 585bf215546Sopenharmony_ci * If the unsynchronized flag is present, the host may perform this upload 586bf215546Sopenharmony_ci * without syncing to pending reads on this surface. 587bf215546Sopenharmony_ci */ 588bf215546Sopenharmony_ci uint32 unsynchronized : 1; 589bf215546Sopenharmony_ci 590bf215546Sopenharmony_ci /* 591bf215546Sopenharmony_ci * Guests *MUST* set the reserved bits to 0 before submitting the command 592bf215546Sopenharmony_ci * suffix as future flags may occupy these bits. 593bf215546Sopenharmony_ci */ 594bf215546Sopenharmony_ci uint32 reserved : 30; 595bf215546Sopenharmony_ci} 596bf215546Sopenharmony_ci#include "vmware_pack_end.h" 597bf215546Sopenharmony_ciSVGA3dSurfaceDMAFlags; 598bf215546Sopenharmony_ci 599bf215546Sopenharmony_citypedef 600bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 601bf215546Sopenharmony_cistruct { 602bf215546Sopenharmony_ci SVGAGuestImage guest; 603bf215546Sopenharmony_ci SVGA3dSurfaceImageId host; 604bf215546Sopenharmony_ci SVGA3dTransferType transfer; 605bf215546Sopenharmony_ci 606bf215546Sopenharmony_ci /* 607bf215546Sopenharmony_ci * Followed by variable number of SVGA3dCopyBox structures. For consistency 608bf215546Sopenharmony_ci * in all clipping logic and coordinate translation, we define the 609bf215546Sopenharmony_ci * "source" in each copyBox as the guest image and the 610bf215546Sopenharmony_ci * "destination" as the host image, regardless of transfer 611bf215546Sopenharmony_ci * direction. 612bf215546Sopenharmony_ci * 613bf215546Sopenharmony_ci * For efficiency, the SVGA3D device is free to copy more data than 614bf215546Sopenharmony_ci * specified. For example, it may round copy boxes outwards such 615bf215546Sopenharmony_ci * that they lie on particular alignment boundaries. 616bf215546Sopenharmony_ci */ 617bf215546Sopenharmony_ci} 618bf215546Sopenharmony_ci#include "vmware_pack_end.h" 619bf215546Sopenharmony_ciSVGA3dCmdSurfaceDMA; /* SVGA_3D_CMD_SURFACE_DMA */ 620bf215546Sopenharmony_ci 621bf215546Sopenharmony_ci/* 622bf215546Sopenharmony_ci * SVGA3dCmdSurfaceDMASuffix -- 623bf215546Sopenharmony_ci * 624bf215546Sopenharmony_ci * This is a command suffix that will appear after a SurfaceDMA command in 625bf215546Sopenharmony_ci * the FIFO. It contains some extra information that hosts may use to 626bf215546Sopenharmony_ci * optimize performance or protect the guest. This suffix exists to preserve 627bf215546Sopenharmony_ci * backwards compatibility while also allowing for new functionality to be 628bf215546Sopenharmony_ci * implemented. 629bf215546Sopenharmony_ci */ 630bf215546Sopenharmony_ci 631bf215546Sopenharmony_citypedef 632bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 633bf215546Sopenharmony_cistruct { 634bf215546Sopenharmony_ci uint32 suffixSize; 635bf215546Sopenharmony_ci 636bf215546Sopenharmony_ci /* 637bf215546Sopenharmony_ci * The maximum offset is used to determine the maximum offset from the 638bf215546Sopenharmony_ci * guestPtr base address that will be accessed or written to during this 639bf215546Sopenharmony_ci * surfaceDMA. If the suffix is supported, the host will respect this 640bf215546Sopenharmony_ci * boundary while performing surface DMAs. 641bf215546Sopenharmony_ci * 642bf215546Sopenharmony_ci * Defaults to MAX_UINT32 643bf215546Sopenharmony_ci */ 644bf215546Sopenharmony_ci uint32 maximumOffset; 645bf215546Sopenharmony_ci 646bf215546Sopenharmony_ci /* 647bf215546Sopenharmony_ci * A set of flags that describes optimizations that the host may perform 648bf215546Sopenharmony_ci * while performing this surface DMA operation. The guest should never rely 649bf215546Sopenharmony_ci * on behaviour that is different when these flags are set for correctness. 650bf215546Sopenharmony_ci * 651bf215546Sopenharmony_ci * Defaults to 0 652bf215546Sopenharmony_ci */ 653bf215546Sopenharmony_ci SVGA3dSurfaceDMAFlags flags; 654bf215546Sopenharmony_ci} 655bf215546Sopenharmony_ci#include "vmware_pack_end.h" 656bf215546Sopenharmony_ciSVGA3dCmdSurfaceDMASuffix; 657bf215546Sopenharmony_ci 658bf215546Sopenharmony_ci/* 659bf215546Sopenharmony_ci * SVGA_3D_CMD_DRAW_PRIMITIVES -- 660bf215546Sopenharmony_ci * 661bf215546Sopenharmony_ci * This command is the SVGA3D device's generic drawing entry point. 662bf215546Sopenharmony_ci * It can draw multiple ranges of primitives, optionally using an 663bf215546Sopenharmony_ci * index buffer, using an arbitrary collection of vertex buffers. 664bf215546Sopenharmony_ci * 665bf215546Sopenharmony_ci * Each SVGA3dVertexDecl defines a distinct vertex array to bind 666bf215546Sopenharmony_ci * during this draw call. The declarations specify which surface 667bf215546Sopenharmony_ci * the vertex data lives in, what that vertex data is used for, 668bf215546Sopenharmony_ci * and how to interpret it. 669bf215546Sopenharmony_ci * 670bf215546Sopenharmony_ci * Each SVGA3dPrimitiveRange defines a collection of primitives 671bf215546Sopenharmony_ci * to render using the same vertex arrays. An index buffer is 672bf215546Sopenharmony_ci * optional. 673bf215546Sopenharmony_ci */ 674bf215546Sopenharmony_ci 675bf215546Sopenharmony_citypedef 676bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 677bf215546Sopenharmony_cistruct { 678bf215546Sopenharmony_ci /* 679bf215546Sopenharmony_ci * A range hint is an optional specification for the range of indices 680bf215546Sopenharmony_ci * in an SVGA3dArray that will be used. If 'last' is zero, it is assumed 681bf215546Sopenharmony_ci * that the entire array will be used. 682bf215546Sopenharmony_ci * 683bf215546Sopenharmony_ci * These are only hints. The SVGA3D device may use them for 684bf215546Sopenharmony_ci * performance optimization if possible, but it's also allowed to 685bf215546Sopenharmony_ci * ignore these values. 686bf215546Sopenharmony_ci */ 687bf215546Sopenharmony_ci uint32 first; 688bf215546Sopenharmony_ci uint32 last; 689bf215546Sopenharmony_ci} 690bf215546Sopenharmony_ci#include "vmware_pack_end.h" 691bf215546Sopenharmony_ciSVGA3dArrayRangeHint; 692bf215546Sopenharmony_ci 693bf215546Sopenharmony_citypedef 694bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 695bf215546Sopenharmony_cistruct { 696bf215546Sopenharmony_ci /* 697bf215546Sopenharmony_ci * Define the origin and shape of a vertex or index array. Both 698bf215546Sopenharmony_ci * 'offset' and 'stride' are in bytes. The provided surface will be 699bf215546Sopenharmony_ci * reinterpreted as a flat array of bytes in the same format used 700bf215546Sopenharmony_ci * by surface DMA operations. To avoid unnecessary conversions, the 701bf215546Sopenharmony_ci * surface should be created with the SVGA3D_BUFFER format. 702bf215546Sopenharmony_ci * 703bf215546Sopenharmony_ci * Index 0 in the array starts 'offset' bytes into the surface. 704bf215546Sopenharmony_ci * Index 1 begins at byte 'offset + stride', etc. Array indices may 705bf215546Sopenharmony_ci * not be negative. 706bf215546Sopenharmony_ci */ 707bf215546Sopenharmony_ci uint32 surfaceId; 708bf215546Sopenharmony_ci uint32 offset; 709bf215546Sopenharmony_ci uint32 stride; 710bf215546Sopenharmony_ci} 711bf215546Sopenharmony_ci#include "vmware_pack_end.h" 712bf215546Sopenharmony_ciSVGA3dArray; 713bf215546Sopenharmony_ci 714bf215546Sopenharmony_citypedef 715bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 716bf215546Sopenharmony_cistruct { 717bf215546Sopenharmony_ci /* 718bf215546Sopenharmony_ci * Describe a vertex array's data type, and define how it is to be 719bf215546Sopenharmony_ci * used by the fixed function pipeline or the vertex shader. It 720bf215546Sopenharmony_ci * isn't useful to have two VertexDecls with the same 721bf215546Sopenharmony_ci * VertexArrayIdentity in one draw call. 722bf215546Sopenharmony_ci */ 723bf215546Sopenharmony_ci SVGA3dDeclType type; 724bf215546Sopenharmony_ci SVGA3dDeclMethod method; 725bf215546Sopenharmony_ci SVGA3dDeclUsage usage; 726bf215546Sopenharmony_ci uint32 usageIndex; 727bf215546Sopenharmony_ci} 728bf215546Sopenharmony_ci#include "vmware_pack_end.h" 729bf215546Sopenharmony_ciSVGA3dVertexArrayIdentity; 730bf215546Sopenharmony_ci 731bf215546Sopenharmony_citypedef 732bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 733bf215546Sopenharmony_cistruct SVGA3dVertexDecl { 734bf215546Sopenharmony_ci SVGA3dVertexArrayIdentity identity; 735bf215546Sopenharmony_ci SVGA3dArray array; 736bf215546Sopenharmony_ci SVGA3dArrayRangeHint rangeHint; 737bf215546Sopenharmony_ci} 738bf215546Sopenharmony_ci#include "vmware_pack_end.h" 739bf215546Sopenharmony_ciSVGA3dVertexDecl; 740bf215546Sopenharmony_ci 741bf215546Sopenharmony_citypedef 742bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 743bf215546Sopenharmony_cistruct SVGA3dPrimitiveRange { 744bf215546Sopenharmony_ci /* 745bf215546Sopenharmony_ci * Define a group of primitives to render, from sequential indices. 746bf215546Sopenharmony_ci * 747bf215546Sopenharmony_ci * The value of 'primitiveType' and 'primitiveCount' imply the 748bf215546Sopenharmony_ci * total number of vertices that will be rendered. 749bf215546Sopenharmony_ci */ 750bf215546Sopenharmony_ci SVGA3dPrimitiveType primType; 751bf215546Sopenharmony_ci uint32 primitiveCount; 752bf215546Sopenharmony_ci 753bf215546Sopenharmony_ci /* 754bf215546Sopenharmony_ci * Optional index buffer. If indexArray.surfaceId is 755bf215546Sopenharmony_ci * SVGA3D_INVALID_ID, we render without an index buffer. Rendering 756bf215546Sopenharmony_ci * without an index buffer is identical to rendering with an index 757bf215546Sopenharmony_ci * buffer containing the sequence [0, 1, 2, 3, ...]. 758bf215546Sopenharmony_ci * 759bf215546Sopenharmony_ci * If an index buffer is in use, indexWidth specifies the width in 760bf215546Sopenharmony_ci * bytes of each index value. It must be less than or equal to 761bf215546Sopenharmony_ci * indexArray.stride. 762bf215546Sopenharmony_ci * 763bf215546Sopenharmony_ci * (Currently, the SVGA3D device requires index buffers to be tightly 764bf215546Sopenharmony_ci * packed. In other words, indexWidth == indexArray.stride) 765bf215546Sopenharmony_ci */ 766bf215546Sopenharmony_ci SVGA3dArray indexArray; 767bf215546Sopenharmony_ci uint32 indexWidth; 768bf215546Sopenharmony_ci 769bf215546Sopenharmony_ci /* 770bf215546Sopenharmony_ci * Optional index bias. This number is added to all indices from 771bf215546Sopenharmony_ci * indexArray before they are used as vertex array indices. This 772bf215546Sopenharmony_ci * can be used in multiple ways: 773bf215546Sopenharmony_ci * 774bf215546Sopenharmony_ci * - When not using an indexArray, this bias can be used to 775bf215546Sopenharmony_ci * specify where in the vertex arrays to begin rendering. 776bf215546Sopenharmony_ci * 777bf215546Sopenharmony_ci * - A positive number here is equivalent to increasing the 778bf215546Sopenharmony_ci * offset in each vertex array. 779bf215546Sopenharmony_ci * 780bf215546Sopenharmony_ci * - A negative number can be used to render using a small 781bf215546Sopenharmony_ci * vertex array and an index buffer that contains large 782bf215546Sopenharmony_ci * values. This may be used by some applications that 783bf215546Sopenharmony_ci * crop a vertex buffer without modifying their index 784bf215546Sopenharmony_ci * buffer. 785bf215546Sopenharmony_ci * 786bf215546Sopenharmony_ci * Note that rendering with a negative bias value may be slower and 787bf215546Sopenharmony_ci * use more memory than rendering with a positive or zero bias. 788bf215546Sopenharmony_ci */ 789bf215546Sopenharmony_ci int32 indexBias; 790bf215546Sopenharmony_ci} 791bf215546Sopenharmony_ci#include "vmware_pack_end.h" 792bf215546Sopenharmony_ciSVGA3dPrimitiveRange; 793bf215546Sopenharmony_ci 794bf215546Sopenharmony_citypedef 795bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 796bf215546Sopenharmony_cistruct { 797bf215546Sopenharmony_ci uint32 cid; 798bf215546Sopenharmony_ci uint32 numVertexDecls; 799bf215546Sopenharmony_ci uint32 numRanges; 800bf215546Sopenharmony_ci 801bf215546Sopenharmony_ci /* 802bf215546Sopenharmony_ci * There are two variable size arrays after the 803bf215546Sopenharmony_ci * SVGA3dCmdDrawPrimitives structure. In order, 804bf215546Sopenharmony_ci * they are: 805bf215546Sopenharmony_ci * 806bf215546Sopenharmony_ci * 1. SVGA3dVertexDecl, quantity 'numVertexDecls', but no more than 807bf215546Sopenharmony_ci * SVGA3D_MAX_VERTEX_ARRAYS; 808bf215546Sopenharmony_ci * 2. SVGA3dPrimitiveRange, quantity 'numRanges', but no more than 809bf215546Sopenharmony_ci * SVGA3D_MAX_DRAW_PRIMITIVE_RANGES; 810bf215546Sopenharmony_ci * 3. Optionally, SVGA3dVertexDivisor, quantity 'numVertexDecls' (contains 811bf215546Sopenharmony_ci * the frequency divisor for the corresponding vertex decl). 812bf215546Sopenharmony_ci */ 813bf215546Sopenharmony_ci} 814bf215546Sopenharmony_ci#include "vmware_pack_end.h" 815bf215546Sopenharmony_ciSVGA3dCmdDrawPrimitives; /* SVGA_3D_CMD_DRAWPRIMITIVES */ 816bf215546Sopenharmony_ci 817bf215546Sopenharmony_citypedef 818bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 819bf215546Sopenharmony_cistruct { 820bf215546Sopenharmony_ci uint32 cid; 821bf215546Sopenharmony_ci 822bf215546Sopenharmony_ci uint32 primitiveCount; // How many primitives to render 823bf215546Sopenharmony_ci uint32 startVertexLocation; // Which vertex do we start rendering at. 824bf215546Sopenharmony_ci 825bf215546Sopenharmony_ci uint8 primitiveType; // SVGA3dPrimitiveType 826bf215546Sopenharmony_ci uint8 padding[3]; 827bf215546Sopenharmony_ci} 828bf215546Sopenharmony_ci#include "vmware_pack_end.h" 829bf215546Sopenharmony_ciSVGA3dCmdDraw; 830bf215546Sopenharmony_ci 831bf215546Sopenharmony_citypedef 832bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 833bf215546Sopenharmony_cistruct { 834bf215546Sopenharmony_ci uint32 cid; 835bf215546Sopenharmony_ci 836bf215546Sopenharmony_ci uint8 primitiveType; // SVGA3dPrimitiveType 837bf215546Sopenharmony_ci 838bf215546Sopenharmony_ci uint32 indexBufferSid; // Valid index buffer sid. 839bf215546Sopenharmony_ci uint32 indexBufferOffset; // Byte offset into the vertex buffer, almost 840bf215546Sopenharmony_ci // always 0 for DX9 guests, non-zero for OpenGL 841bf215546Sopenharmony_ci // guests. We can't represent non-multiple of 842bf215546Sopenharmony_ci // stride offsets in D3D9Renderer... 843bf215546Sopenharmony_ci uint8 indexBufferStride; // Allowable values = 1, 2, or 4 844bf215546Sopenharmony_ci 845bf215546Sopenharmony_ci int32 baseVertexLocation; // Bias applied to the index when selecting a 846bf215546Sopenharmony_ci // vertex from the streams, may be negative 847bf215546Sopenharmony_ci 848bf215546Sopenharmony_ci uint32 primitiveCount; // How many primitives to render 849bf215546Sopenharmony_ci uint32 pad0; 850bf215546Sopenharmony_ci uint16 pad1; 851bf215546Sopenharmony_ci} 852bf215546Sopenharmony_ci#include "vmware_pack_end.h" 853bf215546Sopenharmony_ciSVGA3dCmdDrawIndexed; 854bf215546Sopenharmony_ci 855bf215546Sopenharmony_citypedef 856bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 857bf215546Sopenharmony_cistruct { 858bf215546Sopenharmony_ci /* 859bf215546Sopenharmony_ci * Describe a vertex array's data type, and define how it is to be 860bf215546Sopenharmony_ci * used by the fixed function pipeline or the vertex shader. It 861bf215546Sopenharmony_ci * isn't useful to have two VertexDecls with the same 862bf215546Sopenharmony_ci * VertexArrayIdentity in one draw call. 863bf215546Sopenharmony_ci */ 864bf215546Sopenharmony_ci uint16 streamOffset; 865bf215546Sopenharmony_ci uint8 stream; 866bf215546Sopenharmony_ci uint8 type; // SVGA3dDeclType 867bf215546Sopenharmony_ci uint8 method; // SVGA3dDeclMethod 868bf215546Sopenharmony_ci uint8 usage; // SVGA3dDeclUsage 869bf215546Sopenharmony_ci uint8 usageIndex; 870bf215546Sopenharmony_ci uint8 padding; 871bf215546Sopenharmony_ci 872bf215546Sopenharmony_ci} 873bf215546Sopenharmony_ci#include "vmware_pack_end.h" 874bf215546Sopenharmony_ciSVGA3dVertexElement; 875bf215546Sopenharmony_ci 876bf215546Sopenharmony_ci/* 877bf215546Sopenharmony_ci * Should the vertex element respect the stream value? The high bit of the 878bf215546Sopenharmony_ci * stream should be set to indicate that the stream should be respected. If 879bf215546Sopenharmony_ci * the high bit is not set, the stream will be ignored and replaced by the index 880bf215546Sopenharmony_ci * of the position of the currently considered vertex element. 881bf215546Sopenharmony_ci * 882bf215546Sopenharmony_ci * All guests should set this bit and correctly specify the stream going 883bf215546Sopenharmony_ci * forward. 884bf215546Sopenharmony_ci */ 885bf215546Sopenharmony_ci#define SVGA3D_VERTEX_ELEMENT_RESPECT_STREAM (1 << 7) 886bf215546Sopenharmony_ci 887bf215546Sopenharmony_citypedef 888bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 889bf215546Sopenharmony_cistruct { 890bf215546Sopenharmony_ci uint32 cid; 891bf215546Sopenharmony_ci 892bf215546Sopenharmony_ci uint32 numElements; 893bf215546Sopenharmony_ci 894bf215546Sopenharmony_ci /* 895bf215546Sopenharmony_ci * Followed by numElements SVGA3dVertexElement structures. 896bf215546Sopenharmony_ci * 897bf215546Sopenharmony_ci * If numElements < SVGA3D_MAX_VERTEX_ARRAYS, the remaining elements 898bf215546Sopenharmony_ci * are cleared and will not be used by following draws. 899bf215546Sopenharmony_ci */ 900bf215546Sopenharmony_ci} 901bf215546Sopenharmony_ci#include "vmware_pack_end.h" 902bf215546Sopenharmony_ciSVGA3dCmdSetVertexDecls; 903bf215546Sopenharmony_ci 904bf215546Sopenharmony_citypedef 905bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 906bf215546Sopenharmony_cistruct { 907bf215546Sopenharmony_ci uint32 sid; 908bf215546Sopenharmony_ci uint32 stride; 909bf215546Sopenharmony_ci uint32 offset; 910bf215546Sopenharmony_ci} 911bf215546Sopenharmony_ci#include "vmware_pack_end.h" 912bf215546Sopenharmony_ciSVGA3dVertexStream; 913bf215546Sopenharmony_ci 914bf215546Sopenharmony_citypedef 915bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 916bf215546Sopenharmony_cistruct { 917bf215546Sopenharmony_ci uint32 cid; 918bf215546Sopenharmony_ci 919bf215546Sopenharmony_ci uint32 numStreams; 920bf215546Sopenharmony_ci /* 921bf215546Sopenharmony_ci * Followed by numStream SVGA3dVertexStream structures. 922bf215546Sopenharmony_ci * 923bf215546Sopenharmony_ci * If numStreams < SVGA3D_MAX_VERTEX_ARRAYS, the remaining streams 924bf215546Sopenharmony_ci * are cleared and will not be used by following draws. 925bf215546Sopenharmony_ci */ 926bf215546Sopenharmony_ci} 927bf215546Sopenharmony_ci#include "vmware_pack_end.h" 928bf215546Sopenharmony_ciSVGA3dCmdSetVertexStreams; 929bf215546Sopenharmony_ci 930bf215546Sopenharmony_citypedef 931bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 932bf215546Sopenharmony_cistruct { 933bf215546Sopenharmony_ci uint32 cid; 934bf215546Sopenharmony_ci uint32 numDivisors; 935bf215546Sopenharmony_ci} 936bf215546Sopenharmony_ci#include "vmware_pack_end.h" 937bf215546Sopenharmony_ciSVGA3dCmdSetVertexDivisors; 938bf215546Sopenharmony_ci 939bf215546Sopenharmony_citypedef 940bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 941bf215546Sopenharmony_cistruct { 942bf215546Sopenharmony_ci uint32 stage; 943bf215546Sopenharmony_ci SVGA3dTextureStateName name; 944bf215546Sopenharmony_ci union { 945bf215546Sopenharmony_ci uint32 value; 946bf215546Sopenharmony_ci float floatValue; 947bf215546Sopenharmony_ci }; 948bf215546Sopenharmony_ci} 949bf215546Sopenharmony_ci#include "vmware_pack_end.h" 950bf215546Sopenharmony_ciSVGA3dTextureState; 951bf215546Sopenharmony_ci 952bf215546Sopenharmony_citypedef 953bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 954bf215546Sopenharmony_cistruct { 955bf215546Sopenharmony_ci uint32 cid; 956bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dTextureState structures */ 957bf215546Sopenharmony_ci} 958bf215546Sopenharmony_ci#include "vmware_pack_end.h" 959bf215546Sopenharmony_ciSVGA3dCmdSetTextureState; /* SVGA_3D_CMD_SETTEXTURESTATE */ 960bf215546Sopenharmony_ci 961bf215546Sopenharmony_citypedef 962bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 963bf215546Sopenharmony_cistruct { 964bf215546Sopenharmony_ci uint32 cid; 965bf215546Sopenharmony_ci SVGA3dTransformType type; 966bf215546Sopenharmony_ci float matrix[16]; 967bf215546Sopenharmony_ci} 968bf215546Sopenharmony_ci#include "vmware_pack_end.h" 969bf215546Sopenharmony_ciSVGA3dCmdSetTransform; /* SVGA_3D_CMD_SETTRANSFORM */ 970bf215546Sopenharmony_ci 971bf215546Sopenharmony_citypedef 972bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 973bf215546Sopenharmony_cistruct { 974bf215546Sopenharmony_ci float min; 975bf215546Sopenharmony_ci float max; 976bf215546Sopenharmony_ci} 977bf215546Sopenharmony_ci#include "vmware_pack_end.h" 978bf215546Sopenharmony_ciSVGA3dZRange; 979bf215546Sopenharmony_ci 980bf215546Sopenharmony_citypedef 981bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 982bf215546Sopenharmony_cistruct { 983bf215546Sopenharmony_ci uint32 cid; 984bf215546Sopenharmony_ci SVGA3dZRange zRange; 985bf215546Sopenharmony_ci} 986bf215546Sopenharmony_ci#include "vmware_pack_end.h" 987bf215546Sopenharmony_ciSVGA3dCmdSetZRange; /* SVGA_3D_CMD_SETZRANGE */ 988bf215546Sopenharmony_ci 989bf215546Sopenharmony_citypedef 990bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 991bf215546Sopenharmony_cistruct { 992bf215546Sopenharmony_ci float diffuse[4]; 993bf215546Sopenharmony_ci float ambient[4]; 994bf215546Sopenharmony_ci float specular[4]; 995bf215546Sopenharmony_ci float emissive[4]; 996bf215546Sopenharmony_ci float shininess; 997bf215546Sopenharmony_ci} 998bf215546Sopenharmony_ci#include "vmware_pack_end.h" 999bf215546Sopenharmony_ciSVGA3dMaterial; 1000bf215546Sopenharmony_ci 1001bf215546Sopenharmony_citypedef 1002bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1003bf215546Sopenharmony_cistruct { 1004bf215546Sopenharmony_ci uint32 cid; 1005bf215546Sopenharmony_ci SVGA3dFace face; 1006bf215546Sopenharmony_ci SVGA3dMaterial material; 1007bf215546Sopenharmony_ci} 1008bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1009bf215546Sopenharmony_ciSVGA3dCmdSetMaterial; /* SVGA_3D_CMD_SETMATERIAL */ 1010bf215546Sopenharmony_ci 1011bf215546Sopenharmony_citypedef 1012bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1013bf215546Sopenharmony_cistruct { 1014bf215546Sopenharmony_ci uint32 cid; 1015bf215546Sopenharmony_ci uint32 index; 1016bf215546Sopenharmony_ci SVGA3dLightData data; 1017bf215546Sopenharmony_ci} 1018bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1019bf215546Sopenharmony_ciSVGA3dCmdSetLightData; /* SVGA_3D_CMD_SETLIGHTDATA */ 1020bf215546Sopenharmony_ci 1021bf215546Sopenharmony_citypedef 1022bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1023bf215546Sopenharmony_cistruct { 1024bf215546Sopenharmony_ci uint32 cid; 1025bf215546Sopenharmony_ci uint32 index; 1026bf215546Sopenharmony_ci uint32 enabled; 1027bf215546Sopenharmony_ci} 1028bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1029bf215546Sopenharmony_ciSVGA3dCmdSetLightEnabled; /* SVGA_3D_CMD_SETLIGHTENABLED */ 1030bf215546Sopenharmony_ci 1031bf215546Sopenharmony_citypedef 1032bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1033bf215546Sopenharmony_cistruct { 1034bf215546Sopenharmony_ci uint32 cid; 1035bf215546Sopenharmony_ci SVGA3dRect rect; 1036bf215546Sopenharmony_ci} 1037bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1038bf215546Sopenharmony_ciSVGA3dCmdSetViewport; /* SVGA_3D_CMD_SETVIEWPORT */ 1039bf215546Sopenharmony_ci 1040bf215546Sopenharmony_citypedef 1041bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1042bf215546Sopenharmony_cistruct { 1043bf215546Sopenharmony_ci uint32 cid; 1044bf215546Sopenharmony_ci SVGA3dRect rect; 1045bf215546Sopenharmony_ci} 1046bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1047bf215546Sopenharmony_ciSVGA3dCmdSetScissorRect; /* SVGA_3D_CMD_SETSCISSORRECT */ 1048bf215546Sopenharmony_ci 1049bf215546Sopenharmony_citypedef 1050bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1051bf215546Sopenharmony_cistruct { 1052bf215546Sopenharmony_ci uint32 cid; 1053bf215546Sopenharmony_ci uint32 index; 1054bf215546Sopenharmony_ci float plane[4]; 1055bf215546Sopenharmony_ci} 1056bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1057bf215546Sopenharmony_ciSVGA3dCmdSetClipPlane; /* SVGA_3D_CMD_SETCLIPPLANE */ 1058bf215546Sopenharmony_ci 1059bf215546Sopenharmony_citypedef 1060bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1061bf215546Sopenharmony_cistruct { 1062bf215546Sopenharmony_ci uint32 cid; 1063bf215546Sopenharmony_ci uint32 shid; 1064bf215546Sopenharmony_ci SVGA3dShaderType type; 1065bf215546Sopenharmony_ci /* Followed by variable number of DWORDs for shader bycode */ 1066bf215546Sopenharmony_ci} 1067bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1068bf215546Sopenharmony_ciSVGA3dCmdDefineShader; /* SVGA_3D_CMD_SHADER_DEFINE */ 1069bf215546Sopenharmony_ci 1070bf215546Sopenharmony_citypedef 1071bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1072bf215546Sopenharmony_cistruct { 1073bf215546Sopenharmony_ci uint32 cid; 1074bf215546Sopenharmony_ci uint32 shid; 1075bf215546Sopenharmony_ci SVGA3dShaderType type; 1076bf215546Sopenharmony_ci} 1077bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1078bf215546Sopenharmony_ciSVGA3dCmdDestroyShader; /* SVGA_3D_CMD_SHADER_DESTROY */ 1079bf215546Sopenharmony_ci 1080bf215546Sopenharmony_citypedef 1081bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1082bf215546Sopenharmony_cistruct { 1083bf215546Sopenharmony_ci uint32 cid; 1084bf215546Sopenharmony_ci uint32 reg; /* register number */ 1085bf215546Sopenharmony_ci SVGA3dShaderType type; 1086bf215546Sopenharmony_ci SVGA3dShaderConstType ctype; 1087bf215546Sopenharmony_ci uint32 values[4]; 1088bf215546Sopenharmony_ci 1089bf215546Sopenharmony_ci /* 1090bf215546Sopenharmony_ci * Followed by a variable number of additional values. 1091bf215546Sopenharmony_ci */ 1092bf215546Sopenharmony_ci} 1093bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1094bf215546Sopenharmony_ciSVGA3dCmdSetShaderConst; /* SVGA_3D_CMD_SET_SHADER_CONST */ 1095bf215546Sopenharmony_ci 1096bf215546Sopenharmony_citypedef 1097bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1098bf215546Sopenharmony_cistruct { 1099bf215546Sopenharmony_ci uint32 cid; 1100bf215546Sopenharmony_ci SVGA3dShaderType type; 1101bf215546Sopenharmony_ci uint32 shid; 1102bf215546Sopenharmony_ci} 1103bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1104bf215546Sopenharmony_ciSVGA3dCmdSetShader; /* SVGA_3D_CMD_SET_SHADER */ 1105bf215546Sopenharmony_ci 1106bf215546Sopenharmony_citypedef 1107bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1108bf215546Sopenharmony_cistruct { 1109bf215546Sopenharmony_ci uint32 cid; 1110bf215546Sopenharmony_ci SVGA3dQueryType type; 1111bf215546Sopenharmony_ci} 1112bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1113bf215546Sopenharmony_ciSVGA3dCmdBeginQuery; /* SVGA_3D_CMD_BEGIN_QUERY */ 1114bf215546Sopenharmony_ci 1115bf215546Sopenharmony_citypedef 1116bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1117bf215546Sopenharmony_cistruct { 1118bf215546Sopenharmony_ci uint32 cid; 1119bf215546Sopenharmony_ci SVGA3dQueryType type; 1120bf215546Sopenharmony_ci SVGAGuestPtr guestResult; /* Points to an SVGA3dQueryResult structure */ 1121bf215546Sopenharmony_ci} 1122bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1123bf215546Sopenharmony_ciSVGA3dCmdEndQuery; /* SVGA_3D_CMD_END_QUERY */ 1124bf215546Sopenharmony_ci 1125bf215546Sopenharmony_ci 1126bf215546Sopenharmony_ci/* 1127bf215546Sopenharmony_ci * SVGA3D_CMD_WAIT_FOR_QUERY -- 1128bf215546Sopenharmony_ci * 1129bf215546Sopenharmony_ci * Will read the SVGA3dQueryResult structure pointed to by guestResult, 1130bf215546Sopenharmony_ci * and if the state member is set to anything else than 1131bf215546Sopenharmony_ci * SVGA3D_QUERYSTATE_PENDING, this command will always be a no-op. 1132bf215546Sopenharmony_ci * 1133bf215546Sopenharmony_ci * Otherwise, in addition to the query explicitly waited for, 1134bf215546Sopenharmony_ci * All queries with the same type and issued with the same cid, for which 1135bf215546Sopenharmony_ci * an SVGA_3D_CMD_END_QUERY command has previously been sent, will 1136bf215546Sopenharmony_ci * be finished after execution of this command. 1137bf215546Sopenharmony_ci * 1138bf215546Sopenharmony_ci * A query will be identified by the gmrId and offset of the guestResult 1139bf215546Sopenharmony_ci * member. If the device can't find an SVGA_3D_CMD_END_QUERY that has 1140bf215546Sopenharmony_ci * been sent previously with an identical gmrId and offset, it will 1141bf215546Sopenharmony_ci * effectively end all queries with an identical type issued with the 1142bf215546Sopenharmony_ci * same cid, and the SVGA3dQueryResult structure pointed to by 1143bf215546Sopenharmony_ci * guestResult will not be written to. This property can be used to 1144bf215546Sopenharmony_ci * implement a query barrier for a given cid and query type. 1145bf215546Sopenharmony_ci */ 1146bf215546Sopenharmony_ci 1147bf215546Sopenharmony_citypedef 1148bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1149bf215546Sopenharmony_cistruct { 1150bf215546Sopenharmony_ci uint32 cid; /* Same parameters passed to END_QUERY */ 1151bf215546Sopenharmony_ci SVGA3dQueryType type; 1152bf215546Sopenharmony_ci SVGAGuestPtr guestResult; 1153bf215546Sopenharmony_ci} 1154bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1155bf215546Sopenharmony_ciSVGA3dCmdWaitForQuery; /* SVGA_3D_CMD_WAIT_FOR_QUERY */ 1156bf215546Sopenharmony_ci 1157bf215546Sopenharmony_citypedef 1158bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1159bf215546Sopenharmony_cistruct { 1160bf215546Sopenharmony_ci uint32 totalSize; /* Set by guest before query is ended. */ 1161bf215546Sopenharmony_ci SVGA3dQueryState state; /* Set by host or guest. See SVGA3dQueryState. */ 1162bf215546Sopenharmony_ci union { /* Set by host on exit from PENDING state */ 1163bf215546Sopenharmony_ci uint32 result32; 1164bf215546Sopenharmony_ci uint32 queryCookie; /* May be used to identify which QueryGetData this 1165bf215546Sopenharmony_ci result corresponds to. */ 1166bf215546Sopenharmony_ci }; 1167bf215546Sopenharmony_ci} 1168bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1169bf215546Sopenharmony_ciSVGA3dQueryResult; 1170bf215546Sopenharmony_ci 1171bf215546Sopenharmony_ci 1172bf215546Sopenharmony_ci/* 1173bf215546Sopenharmony_ci * SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN -- 1174bf215546Sopenharmony_ci * 1175bf215546Sopenharmony_ci * This is a blit from an SVGA3D surface to a Screen Object. 1176bf215546Sopenharmony_ci * This blit must be directed at a specific screen. 1177bf215546Sopenharmony_ci * 1178bf215546Sopenharmony_ci * The blit copies from a rectangular region of an SVGA3D surface 1179bf215546Sopenharmony_ci * image to a rectangular region of a screen. 1180bf215546Sopenharmony_ci * 1181bf215546Sopenharmony_ci * This command takes an optional variable-length list of clipping 1182bf215546Sopenharmony_ci * rectangles after the body of the command. If no rectangles are 1183bf215546Sopenharmony_ci * specified, there is no clipping region. The entire destRect is 1184bf215546Sopenharmony_ci * drawn to. If one or more rectangles are included, they describe 1185bf215546Sopenharmony_ci * a clipping region. The clip rectangle coordinates are measured 1186bf215546Sopenharmony_ci * relative to the top-left corner of destRect. 1187bf215546Sopenharmony_ci * 1188bf215546Sopenharmony_ci * The srcImage must be from mip=0 face=0. 1189bf215546Sopenharmony_ci * 1190bf215546Sopenharmony_ci * This supports scaling if the src and dest are of different sizes. 1191bf215546Sopenharmony_ci * 1192bf215546Sopenharmony_ci * Availability: 1193bf215546Sopenharmony_ci * SVGA_FIFO_CAP_SCREEN_OBJECT 1194bf215546Sopenharmony_ci */ 1195bf215546Sopenharmony_ci 1196bf215546Sopenharmony_citypedef 1197bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1198bf215546Sopenharmony_cistruct { 1199bf215546Sopenharmony_ci SVGA3dSurfaceImageId srcImage; 1200bf215546Sopenharmony_ci SVGASignedRect srcRect; 1201bf215546Sopenharmony_ci uint32 destScreenId; /* Screen Object ID */ 1202bf215546Sopenharmony_ci SVGASignedRect destRect; 1203bf215546Sopenharmony_ci /* Clipping: zero or more SVGASignedRects follow */ 1204bf215546Sopenharmony_ci} 1205bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1206bf215546Sopenharmony_ciSVGA3dCmdBlitSurfaceToScreen; /* SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN */ 1207bf215546Sopenharmony_ci 1208bf215546Sopenharmony_citypedef 1209bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1210bf215546Sopenharmony_cistruct { 1211bf215546Sopenharmony_ci uint32 sid; 1212bf215546Sopenharmony_ci SVGA3dTextureFilter filter; 1213bf215546Sopenharmony_ci} 1214bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1215bf215546Sopenharmony_ciSVGA3dCmdGenerateMipmaps; /* SVGA_3D_CMD_GENERATE_MIPMAPS */ 1216bf215546Sopenharmony_ci 1217bf215546Sopenharmony_citypedef 1218bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1219bf215546Sopenharmony_cistruct { 1220bf215546Sopenharmony_ci uint32 sid; 1221bf215546Sopenharmony_ci} 1222bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1223bf215546Sopenharmony_ciSVGA3dCmdActivateSurface; /* SVGA_3D_CMD_ACTIVATE_SURFACE */ 1224bf215546Sopenharmony_ci 1225bf215546Sopenharmony_citypedef 1226bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1227bf215546Sopenharmony_cistruct { 1228bf215546Sopenharmony_ci uint32 sid; 1229bf215546Sopenharmony_ci} 1230bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1231bf215546Sopenharmony_ciSVGA3dCmdDeactivateSurface; /* SVGA_3D_CMD_DEACTIVATE_SURFACE */ 1232bf215546Sopenharmony_ci 1233bf215546Sopenharmony_ci/* 1234bf215546Sopenharmony_ci * Screen DMA command 1235bf215546Sopenharmony_ci * 1236bf215546Sopenharmony_ci * Available with SVGA_FIFO_CAP_SCREEN_OBJECT_2. The SVGA_CAP_3D device 1237bf215546Sopenharmony_ci * cap bit is not required. 1238bf215546Sopenharmony_ci * 1239bf215546Sopenharmony_ci * - refBuffer and destBuffer are 32bit BGRX; refBuffer and destBuffer could 1240bf215546Sopenharmony_ci * be different, but it is required that guest makes sure refBuffer has 1241bf215546Sopenharmony_ci * exactly the same contents that were written to when last time screen DMA 1242bf215546Sopenharmony_ci * command is received by host. 1243bf215546Sopenharmony_ci * 1244bf215546Sopenharmony_ci * - changemap is generated by lib/blit, and it has the changes from last 1245bf215546Sopenharmony_ci * received screen DMA or more. 1246bf215546Sopenharmony_ci */ 1247bf215546Sopenharmony_ci 1248bf215546Sopenharmony_citypedef 1249bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1250bf215546Sopenharmony_cistruct SVGA3dCmdScreenDMA { 1251bf215546Sopenharmony_ci uint32 screenId; 1252bf215546Sopenharmony_ci SVGAGuestImage refBuffer; 1253bf215546Sopenharmony_ci SVGAGuestImage destBuffer; 1254bf215546Sopenharmony_ci SVGAGuestImage changeMap; 1255bf215546Sopenharmony_ci} 1256bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1257bf215546Sopenharmony_ciSVGA3dCmdScreenDMA; /* SVGA_3D_CMD_SCREEN_DMA */ 1258bf215546Sopenharmony_ci 1259bf215546Sopenharmony_ci/* 1260bf215546Sopenharmony_ci * Logic ops 1261bf215546Sopenharmony_ci */ 1262bf215546Sopenharmony_ci 1263bf215546Sopenharmony_ci#define SVGA3D_LOTRANSBLT_HONORALPHA (0x01) 1264bf215546Sopenharmony_ci#define SVGA3D_LOSTRETCHBLT_MIRRORX (0x01) 1265bf215546Sopenharmony_ci#define SVGA3D_LOSTRETCHBLT_MIRRORY (0x02) 1266bf215546Sopenharmony_ci#define SVGA3D_LOALPHABLEND_SRCHASALPHA (0x01) 1267bf215546Sopenharmony_ci 1268bf215546Sopenharmony_citypedef 1269bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1270bf215546Sopenharmony_cistruct SVGA3dCmdLogicOpsBitBlt { 1271bf215546Sopenharmony_ci /* 1272bf215546Sopenharmony_ci * All LogicOps surfaces are one-level 1273bf215546Sopenharmony_ci * surfaces so mipmap & face should always 1274bf215546Sopenharmony_ci * be zero. 1275bf215546Sopenharmony_ci */ 1276bf215546Sopenharmony_ci SVGA3dSurfaceImageId src; 1277bf215546Sopenharmony_ci SVGA3dSurfaceImageId dst; 1278bf215546Sopenharmony_ci SVGA3dLogicOp logicOp; 1279bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dCopyBox structures */ 1280bf215546Sopenharmony_ci} 1281bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1282bf215546Sopenharmony_ciSVGA3dCmdLogicOpsBitBlt; /* SVGA_3D_CMD_LOGICOPS_BITBLT */ 1283bf215546Sopenharmony_ci 1284bf215546Sopenharmony_ci 1285bf215546Sopenharmony_citypedef 1286bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1287bf215546Sopenharmony_cistruct SVGA3dCmdLogicOpsTransBlt { 1288bf215546Sopenharmony_ci /* 1289bf215546Sopenharmony_ci * All LogicOps surfaces are one-level 1290bf215546Sopenharmony_ci * surfaces so mipmap & face should always 1291bf215546Sopenharmony_ci * be zero. 1292bf215546Sopenharmony_ci */ 1293bf215546Sopenharmony_ci SVGA3dSurfaceImageId src; 1294bf215546Sopenharmony_ci SVGA3dSurfaceImageId dst; 1295bf215546Sopenharmony_ci uint32 color; 1296bf215546Sopenharmony_ci uint32 flags; 1297bf215546Sopenharmony_ci SVGA3dBox srcBox; 1298bf215546Sopenharmony_ci SVGA3dBox dstBox; 1299bf215546Sopenharmony_ci} 1300bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1301bf215546Sopenharmony_ciSVGA3dCmdLogicOpsTransBlt; /* SVGA_3D_CMD_LOGICOPS_TRANSBLT */ 1302bf215546Sopenharmony_ci 1303bf215546Sopenharmony_ci 1304bf215546Sopenharmony_citypedef 1305bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1306bf215546Sopenharmony_cistruct SVGA3dCmdLogicOpsStretchBlt { 1307bf215546Sopenharmony_ci /* 1308bf215546Sopenharmony_ci * All LogicOps surfaces are one-level 1309bf215546Sopenharmony_ci * surfaces so mipmap & face should always 1310bf215546Sopenharmony_ci * be zero. 1311bf215546Sopenharmony_ci */ 1312bf215546Sopenharmony_ci SVGA3dSurfaceImageId src; 1313bf215546Sopenharmony_ci SVGA3dSurfaceImageId dst; 1314bf215546Sopenharmony_ci uint16 mode; 1315bf215546Sopenharmony_ci uint16 flags; 1316bf215546Sopenharmony_ci SVGA3dBox srcBox; 1317bf215546Sopenharmony_ci SVGA3dBox dstBox; 1318bf215546Sopenharmony_ci} 1319bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1320bf215546Sopenharmony_ciSVGA3dCmdLogicOpsStretchBlt; /* SVGA_3D_CMD_LOGICOPS_STRETCHBLT */ 1321bf215546Sopenharmony_ci 1322bf215546Sopenharmony_ci 1323bf215546Sopenharmony_citypedef 1324bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1325bf215546Sopenharmony_cistruct SVGA3dCmdLogicOpsColorFill { 1326bf215546Sopenharmony_ci /* 1327bf215546Sopenharmony_ci * All LogicOps surfaces are one-level 1328bf215546Sopenharmony_ci * surfaces so mipmap & face should always 1329bf215546Sopenharmony_ci * be zero. 1330bf215546Sopenharmony_ci */ 1331bf215546Sopenharmony_ci SVGA3dSurfaceImageId dst; 1332bf215546Sopenharmony_ci uint32 color; 1333bf215546Sopenharmony_ci SVGA3dLogicOp logicOp; 1334bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dRect structures. */ 1335bf215546Sopenharmony_ci} 1336bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1337bf215546Sopenharmony_ciSVGA3dCmdLogicOpsColorFill; /* SVGA_3D_CMD_LOGICOPS_COLORFILL */ 1338bf215546Sopenharmony_ci 1339bf215546Sopenharmony_ci 1340bf215546Sopenharmony_citypedef 1341bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1342bf215546Sopenharmony_cistruct SVGA3dCmdLogicOpsAlphaBlend { 1343bf215546Sopenharmony_ci /* 1344bf215546Sopenharmony_ci * All LogicOps surfaces are one-level 1345bf215546Sopenharmony_ci * surfaces so mipmap & face should always 1346bf215546Sopenharmony_ci * be zero. 1347bf215546Sopenharmony_ci */ 1348bf215546Sopenharmony_ci SVGA3dSurfaceImageId src; 1349bf215546Sopenharmony_ci SVGA3dSurfaceImageId dst; 1350bf215546Sopenharmony_ci uint32 alphaVal; 1351bf215546Sopenharmony_ci uint32 flags; 1352bf215546Sopenharmony_ci SVGA3dBox srcBox; 1353bf215546Sopenharmony_ci SVGA3dBox dstBox; 1354bf215546Sopenharmony_ci} 1355bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1356bf215546Sopenharmony_ciSVGA3dCmdLogicOpsAlphaBlend; /* SVGA_3D_CMD_LOGICOPS_ALPHABLEND */ 1357bf215546Sopenharmony_ci 1358bf215546Sopenharmony_ci#define SVGA3D_CLEARTYPE_INVALID_GAMMA_INDEX 0xFFFFFFFF 1359bf215546Sopenharmony_ci 1360bf215546Sopenharmony_ci#define SVGA3D_CLEARTYPE_GAMMA_WIDTH 512 1361bf215546Sopenharmony_ci#define SVGA3D_CLEARTYPE_GAMMA_HEIGHT 16 1362bf215546Sopenharmony_ci 1363bf215546Sopenharmony_citypedef 1364bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1365bf215546Sopenharmony_cistruct SVGA3dCmdLogicOpsClearTypeBlend { 1366bf215546Sopenharmony_ci /* 1367bf215546Sopenharmony_ci * All LogicOps surfaces are one-level 1368bf215546Sopenharmony_ci * surfaces so mipmap & face should always 1369bf215546Sopenharmony_ci * be zero. 1370bf215546Sopenharmony_ci */ 1371bf215546Sopenharmony_ci SVGA3dSurfaceImageId tmp; 1372bf215546Sopenharmony_ci SVGA3dSurfaceImageId dst; 1373bf215546Sopenharmony_ci SVGA3dSurfaceImageId gammaSurf; 1374bf215546Sopenharmony_ci SVGA3dSurfaceImageId alphaSurf; 1375bf215546Sopenharmony_ci uint32 gamma; 1376bf215546Sopenharmony_ci uint32 color; 1377bf215546Sopenharmony_ci uint32 color2; 1378bf215546Sopenharmony_ci int32 alphaOffsetX; 1379bf215546Sopenharmony_ci int32 alphaOffsetY; 1380bf215546Sopenharmony_ci /* Followed by variable number of SVGA3dBox structures */ 1381bf215546Sopenharmony_ci} 1382bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1383bf215546Sopenharmony_ciSVGA3dCmdLogicOpsClearTypeBlend; /* SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND */ 1384bf215546Sopenharmony_ci 1385bf215546Sopenharmony_ci 1386bf215546Sopenharmony_ci/* 1387bf215546Sopenharmony_ci * Guest-backed objects definitions. 1388bf215546Sopenharmony_ci */ 1389bf215546Sopenharmony_ci 1390bf215546Sopenharmony_citypedef 1391bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1392bf215546Sopenharmony_cistruct { 1393bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1394bf215546Sopenharmony_ci uint32 sizeInBytes; 1395bf215546Sopenharmony_ci PPN64 base; 1396bf215546Sopenharmony_ci} 1397bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1398bf215546Sopenharmony_ciSVGAOTableMobEntry; 1399bf215546Sopenharmony_ci 1400bf215546Sopenharmony_citypedef 1401bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1402bf215546Sopenharmony_cistruct { 1403bf215546Sopenharmony_ci SVGA3dSurfaceFormat format; 1404bf215546Sopenharmony_ci SVGA3dSurface1Flags surface1Flags; 1405bf215546Sopenharmony_ci uint32 numMipLevels; 1406bf215546Sopenharmony_ci uint32 multisampleCount; 1407bf215546Sopenharmony_ci SVGA3dTextureFilter autogenFilter; 1408bf215546Sopenharmony_ci SVGA3dSize size; 1409bf215546Sopenharmony_ci SVGAMobId mobid; 1410bf215546Sopenharmony_ci uint32 arraySize; 1411bf215546Sopenharmony_ci uint32 mobPitch; 1412bf215546Sopenharmony_ci SVGA3dSurface2Flags surface2Flags; 1413bf215546Sopenharmony_ci uint8 multisamplePattern; 1414bf215546Sopenharmony_ci uint8 pad0[3]; 1415bf215546Sopenharmony_ci uint32 pad1[3]; 1416bf215546Sopenharmony_ci} 1417bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1418bf215546Sopenharmony_ciSVGAOTableSurfaceEntry; 1419bf215546Sopenharmony_ci 1420bf215546Sopenharmony_citypedef 1421bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1422bf215546Sopenharmony_cistruct { 1423bf215546Sopenharmony_ci uint32 cid; 1424bf215546Sopenharmony_ci SVGAMobId mobid; 1425bf215546Sopenharmony_ci} 1426bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1427bf215546Sopenharmony_ciSVGAOTableContextEntry; 1428bf215546Sopenharmony_ci 1429bf215546Sopenharmony_citypedef 1430bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1431bf215546Sopenharmony_cistruct { 1432bf215546Sopenharmony_ci SVGA3dShaderType type; 1433bf215546Sopenharmony_ci uint32 sizeInBytes; 1434bf215546Sopenharmony_ci uint32 offsetInBytes; 1435bf215546Sopenharmony_ci SVGAMobId mobid; 1436bf215546Sopenharmony_ci} 1437bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1438bf215546Sopenharmony_ciSVGAOTableShaderEntry; 1439bf215546Sopenharmony_ci 1440bf215546Sopenharmony_ci#define SVGA_STFLAG_PRIMARY (1 << 0) 1441bf215546Sopenharmony_ci#define SVGA_STFLAG_RESERVED (1 << 1) /* Added with cap SVGA_CAP_HP_CMD_QUEUE */ 1442bf215546Sopenharmony_citypedef uint32 SVGAScreenTargetFlags; 1443bf215546Sopenharmony_ci 1444bf215546Sopenharmony_citypedef 1445bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1446bf215546Sopenharmony_cistruct { 1447bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 1448bf215546Sopenharmony_ci uint32 width; 1449bf215546Sopenharmony_ci uint32 height; 1450bf215546Sopenharmony_ci int32 xRoot; 1451bf215546Sopenharmony_ci int32 yRoot; 1452bf215546Sopenharmony_ci SVGAScreenTargetFlags flags; 1453bf215546Sopenharmony_ci uint32 dpi; 1454bf215546Sopenharmony_ci uint32 pad[7]; 1455bf215546Sopenharmony_ci} 1456bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1457bf215546Sopenharmony_ciSVGAOTableScreenTargetEntry; 1458bf215546Sopenharmony_ci 1459bf215546Sopenharmony_citypedef 1460bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1461bf215546Sopenharmony_cistruct { 1462bf215546Sopenharmony_ci float value[4]; 1463bf215546Sopenharmony_ci} 1464bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1465bf215546Sopenharmony_ciSVGA3dShaderConstFloat; 1466bf215546Sopenharmony_ci 1467bf215546Sopenharmony_citypedef 1468bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1469bf215546Sopenharmony_cistruct { 1470bf215546Sopenharmony_ci int32 value[4]; 1471bf215546Sopenharmony_ci} 1472bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1473bf215546Sopenharmony_ciSVGA3dShaderConstInt; 1474bf215546Sopenharmony_ci 1475bf215546Sopenharmony_citypedef 1476bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1477bf215546Sopenharmony_cistruct { 1478bf215546Sopenharmony_ci uint32 value; 1479bf215546Sopenharmony_ci} 1480bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1481bf215546Sopenharmony_ciSVGA3dShaderConstBool; 1482bf215546Sopenharmony_ci 1483bf215546Sopenharmony_citypedef 1484bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1485bf215546Sopenharmony_cistruct { 1486bf215546Sopenharmony_ci uint16 streamOffset; 1487bf215546Sopenharmony_ci uint8 stream; 1488bf215546Sopenharmony_ci uint8 type; 1489bf215546Sopenharmony_ci uint8 methodUsage; 1490bf215546Sopenharmony_ci uint8 usageIndex; 1491bf215546Sopenharmony_ci} 1492bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1493bf215546Sopenharmony_ciSVGAGBVertexElement; 1494bf215546Sopenharmony_ci 1495bf215546Sopenharmony_citypedef 1496bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1497bf215546Sopenharmony_cistruct { 1498bf215546Sopenharmony_ci uint32 sid; 1499bf215546Sopenharmony_ci uint16 stride; 1500bf215546Sopenharmony_ci uint32 offset; 1501bf215546Sopenharmony_ci} 1502bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1503bf215546Sopenharmony_ciSVGAGBVertexStream; 1504bf215546Sopenharmony_citypedef 1505bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1506bf215546Sopenharmony_cistruct { 1507bf215546Sopenharmony_ci SVGA3dRect viewport; 1508bf215546Sopenharmony_ci SVGA3dRect scissorRect; 1509bf215546Sopenharmony_ci SVGA3dZRange zRange; 1510bf215546Sopenharmony_ci 1511bf215546Sopenharmony_ci SVGA3dSurfaceImageId renderTargets[SVGA3D_RT_MAX]; 1512bf215546Sopenharmony_ci SVGAGBVertexElement decl1[4]; 1513bf215546Sopenharmony_ci 1514bf215546Sopenharmony_ci uint32 renderStates[SVGA3D_RS_MAX]; 1515bf215546Sopenharmony_ci SVGAGBVertexElement decl2[18]; 1516bf215546Sopenharmony_ci uint32 pad0[2]; 1517bf215546Sopenharmony_ci 1518bf215546Sopenharmony_ci struct { 1519bf215546Sopenharmony_ci SVGA3dFace face; 1520bf215546Sopenharmony_ci SVGA3dMaterial material; 1521bf215546Sopenharmony_ci } material; 1522bf215546Sopenharmony_ci 1523bf215546Sopenharmony_ci float clipPlanes[SVGA3D_NUM_CLIPPLANES][4]; 1524bf215546Sopenharmony_ci float matrices[SVGA3D_TRANSFORM_MAX][16]; 1525bf215546Sopenharmony_ci 1526bf215546Sopenharmony_ci SVGA3dBool lightEnabled[SVGA3D_NUM_LIGHTS]; 1527bf215546Sopenharmony_ci SVGA3dLightData lightData[SVGA3D_NUM_LIGHTS]; 1528bf215546Sopenharmony_ci 1529bf215546Sopenharmony_ci /* 1530bf215546Sopenharmony_ci * Shaders currently bound 1531bf215546Sopenharmony_ci */ 1532bf215546Sopenharmony_ci uint32 shaders[SVGA3D_NUM_SHADERTYPE_PREDX]; 1533bf215546Sopenharmony_ci SVGAGBVertexElement decl3[10]; 1534bf215546Sopenharmony_ci uint32 pad1[3]; 1535bf215546Sopenharmony_ci 1536bf215546Sopenharmony_ci uint32 occQueryActive; 1537bf215546Sopenharmony_ci uint32 occQueryValue; 1538bf215546Sopenharmony_ci 1539bf215546Sopenharmony_ci /* 1540bf215546Sopenharmony_ci * Int/Bool Shader constants 1541bf215546Sopenharmony_ci */ 1542bf215546Sopenharmony_ci SVGA3dShaderConstInt pShaderIValues[SVGA3D_CONSTINTREG_MAX]; 1543bf215546Sopenharmony_ci SVGA3dShaderConstInt vShaderIValues[SVGA3D_CONSTINTREG_MAX]; 1544bf215546Sopenharmony_ci uint16 pShaderBValues; 1545bf215546Sopenharmony_ci uint16 vShaderBValues; 1546bf215546Sopenharmony_ci 1547bf215546Sopenharmony_ci 1548bf215546Sopenharmony_ci SVGAGBVertexStream streams[SVGA3D_MAX_VERTEX_ARRAYS]; 1549bf215546Sopenharmony_ci SVGA3dVertexDivisor divisors[SVGA3D_MAX_VERTEX_ARRAYS]; 1550bf215546Sopenharmony_ci uint32 numVertexDecls; 1551bf215546Sopenharmony_ci uint32 numVertexStreams; 1552bf215546Sopenharmony_ci uint32 numVertexDivisors; 1553bf215546Sopenharmony_ci uint32 pad2[30]; 1554bf215546Sopenharmony_ci 1555bf215546Sopenharmony_ci /* 1556bf215546Sopenharmony_ci * Texture Stages 1557bf215546Sopenharmony_ci * 1558bf215546Sopenharmony_ci * SVGA3D_TS_INVALID through SVGA3D_TS_CONSTANT are in the 1559bf215546Sopenharmony_ci * textureStages array. 1560bf215546Sopenharmony_ci * SVGA3D_TS_COLOR_KEY is in tsColorKey. 1561bf215546Sopenharmony_ci */ 1562bf215546Sopenharmony_ci uint32 tsColorKey[SVGA3D_NUM_TEXTURE_UNITS]; 1563bf215546Sopenharmony_ci uint32 textureStages[SVGA3D_NUM_TEXTURE_UNITS][SVGA3D_TS_CONSTANT + 1]; 1564bf215546Sopenharmony_ci uint32 tsColorKeyEnable[SVGA3D_NUM_TEXTURE_UNITS]; 1565bf215546Sopenharmony_ci 1566bf215546Sopenharmony_ci /* 1567bf215546Sopenharmony_ci * Float Shader constants. 1568bf215546Sopenharmony_ci */ 1569bf215546Sopenharmony_ci SVGA3dShaderConstFloat pShaderFValues[SVGA3D_CONSTREG_MAX]; 1570bf215546Sopenharmony_ci SVGA3dShaderConstFloat vShaderFValues[SVGA3D_CONSTREG_MAX]; 1571bf215546Sopenharmony_ci} 1572bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1573bf215546Sopenharmony_ciSVGAGBContextData; 1574bf215546Sopenharmony_ci#define SVGA3D_CONTEXT_DATA_SIZE (sizeof(SVGAGBContextData)) 1575bf215546Sopenharmony_ci 1576bf215546Sopenharmony_ci/* 1577bf215546Sopenharmony_ci * SVGA3dCmdSetOTableBase -- 1578bf215546Sopenharmony_ci * 1579bf215546Sopenharmony_ci * This command allows the guest to specify the base PPN of the 1580bf215546Sopenharmony_ci * specified object table. 1581bf215546Sopenharmony_ci */ 1582bf215546Sopenharmony_ci 1583bf215546Sopenharmony_citypedef 1584bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1585bf215546Sopenharmony_cistruct { 1586bf215546Sopenharmony_ci SVGAOTableType type; 1587bf215546Sopenharmony_ci PPN baseAddress; 1588bf215546Sopenharmony_ci uint32 sizeInBytes; 1589bf215546Sopenharmony_ci uint32 validSizeInBytes; 1590bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1591bf215546Sopenharmony_ci} 1592bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1593bf215546Sopenharmony_ciSVGA3dCmdSetOTableBase; /* SVGA_3D_CMD_SET_OTABLE_BASE */ 1594bf215546Sopenharmony_ci 1595bf215546Sopenharmony_citypedef 1596bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1597bf215546Sopenharmony_cistruct { 1598bf215546Sopenharmony_ci SVGAOTableType type; 1599bf215546Sopenharmony_ci PPN64 baseAddress; 1600bf215546Sopenharmony_ci uint32 sizeInBytes; 1601bf215546Sopenharmony_ci uint32 validSizeInBytes; 1602bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1603bf215546Sopenharmony_ci} 1604bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1605bf215546Sopenharmony_ciSVGA3dCmdSetOTableBase64; /* SVGA_3D_CMD_SET_OTABLE_BASE64 */ 1606bf215546Sopenharmony_ci 1607bf215546Sopenharmony_ci/* 1608bf215546Sopenharmony_ci * Guests using SVGA_3D_CMD_GROW_OTABLE are promising that 1609bf215546Sopenharmony_ci * the new OTable contains the same contents as the old one, except possibly 1610bf215546Sopenharmony_ci * for some new invalid entries at the end. 1611bf215546Sopenharmony_ci * 1612bf215546Sopenharmony_ci * (Otherwise, guests should use one of the SetOTableBase commands.) 1613bf215546Sopenharmony_ci */ 1614bf215546Sopenharmony_citypedef 1615bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1616bf215546Sopenharmony_cistruct { 1617bf215546Sopenharmony_ci SVGAOTableType type; 1618bf215546Sopenharmony_ci PPN64 baseAddress; 1619bf215546Sopenharmony_ci uint32 sizeInBytes; 1620bf215546Sopenharmony_ci uint32 validSizeInBytes; 1621bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1622bf215546Sopenharmony_ci} 1623bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1624bf215546Sopenharmony_ciSVGA3dCmdGrowOTable; /* SVGA_3D_CMD_GROW_OTABLE */ 1625bf215546Sopenharmony_ci 1626bf215546Sopenharmony_citypedef 1627bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1628bf215546Sopenharmony_cistruct { 1629bf215546Sopenharmony_ci SVGAOTableType type; 1630bf215546Sopenharmony_ci} 1631bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1632bf215546Sopenharmony_ciSVGA3dCmdReadbackOTable; /* SVGA_3D_CMD_READBACK_OTABLE */ 1633bf215546Sopenharmony_ci 1634bf215546Sopenharmony_ci/* 1635bf215546Sopenharmony_ci * Define a memory object (Mob) in the OTable. 1636bf215546Sopenharmony_ci */ 1637bf215546Sopenharmony_ci 1638bf215546Sopenharmony_citypedef 1639bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1640bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBMob { 1641bf215546Sopenharmony_ci SVGAMobId mobid; 1642bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1643bf215546Sopenharmony_ci PPN base; 1644bf215546Sopenharmony_ci uint32 sizeInBytes; 1645bf215546Sopenharmony_ci} 1646bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1647bf215546Sopenharmony_ciSVGA3dCmdDefineGBMob; /* SVGA_3D_CMD_DEFINE_GB_MOB */ 1648bf215546Sopenharmony_ci 1649bf215546Sopenharmony_ci 1650bf215546Sopenharmony_ci/* 1651bf215546Sopenharmony_ci * Destroys an object in the OTable. 1652bf215546Sopenharmony_ci */ 1653bf215546Sopenharmony_ci 1654bf215546Sopenharmony_citypedef 1655bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1656bf215546Sopenharmony_cistruct SVGA3dCmdDestroyGBMob { 1657bf215546Sopenharmony_ci SVGAMobId mobid; 1658bf215546Sopenharmony_ci} 1659bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1660bf215546Sopenharmony_ciSVGA3dCmdDestroyGBMob; /* SVGA_3D_CMD_DESTROY_GB_MOB */ 1661bf215546Sopenharmony_ci 1662bf215546Sopenharmony_ci/* 1663bf215546Sopenharmony_ci * Define a memory object (Mob) in the OTable with a PPN64 base. 1664bf215546Sopenharmony_ci */ 1665bf215546Sopenharmony_ci 1666bf215546Sopenharmony_citypedef 1667bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1668bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBMob64 { 1669bf215546Sopenharmony_ci SVGAMobId mobid; 1670bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1671bf215546Sopenharmony_ci PPN64 base; 1672bf215546Sopenharmony_ci uint32 sizeInBytes; 1673bf215546Sopenharmony_ci} 1674bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1675bf215546Sopenharmony_ciSVGA3dCmdDefineGBMob64; /* SVGA_3D_CMD_DEFINE_GB_MOB64 */ 1676bf215546Sopenharmony_ci 1677bf215546Sopenharmony_ci/* 1678bf215546Sopenharmony_ci * Redefine an object in the OTable with PPN64 base. 1679bf215546Sopenharmony_ci */ 1680bf215546Sopenharmony_ci 1681bf215546Sopenharmony_citypedef 1682bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1683bf215546Sopenharmony_cistruct SVGA3dCmdRedefineGBMob64 { 1684bf215546Sopenharmony_ci SVGAMobId mobid; 1685bf215546Sopenharmony_ci SVGAMobFormat ptDepth; 1686bf215546Sopenharmony_ci PPN64 base; 1687bf215546Sopenharmony_ci uint32 sizeInBytes; 1688bf215546Sopenharmony_ci} 1689bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1690bf215546Sopenharmony_ciSVGA3dCmdRedefineGBMob64; /* SVGA_3D_CMD_REDEFINE_GB_MOB64 */ 1691bf215546Sopenharmony_ci 1692bf215546Sopenharmony_ci/* 1693bf215546Sopenharmony_ci * Notification that the page tables have been modified. 1694bf215546Sopenharmony_ci */ 1695bf215546Sopenharmony_ci 1696bf215546Sopenharmony_citypedef 1697bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1698bf215546Sopenharmony_cistruct SVGA3dCmdUpdateGBMobMapping { 1699bf215546Sopenharmony_ci SVGAMobId mobid; 1700bf215546Sopenharmony_ci} 1701bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1702bf215546Sopenharmony_ciSVGA3dCmdUpdateGBMobMapping; /* SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING */ 1703bf215546Sopenharmony_ci 1704bf215546Sopenharmony_ci/* 1705bf215546Sopenharmony_ci * Define a guest-backed surface. 1706bf215546Sopenharmony_ci */ 1707bf215546Sopenharmony_ci 1708bf215546Sopenharmony_citypedef 1709bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1710bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBSurface { 1711bf215546Sopenharmony_ci uint32 sid; 1712bf215546Sopenharmony_ci SVGA3dSurface1Flags surfaceFlags; 1713bf215546Sopenharmony_ci SVGA3dSurfaceFormat format; 1714bf215546Sopenharmony_ci uint32 numMipLevels; 1715bf215546Sopenharmony_ci uint32 multisampleCount; 1716bf215546Sopenharmony_ci SVGA3dTextureFilter autogenFilter; 1717bf215546Sopenharmony_ci SVGA3dSize size; 1718bf215546Sopenharmony_ci} 1719bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1720bf215546Sopenharmony_ciSVGA3dCmdDefineGBSurface; /* SVGA_3D_CMD_DEFINE_GB_SURFACE */ 1721bf215546Sopenharmony_ci 1722bf215546Sopenharmony_ci/* 1723bf215546Sopenharmony_ci * Defines a guest-backed surface, adding the arraySize field. 1724bf215546Sopenharmony_ci * 1725bf215546Sopenharmony_ci * See also: 1726bf215546Sopenharmony_ci * http://msdn.microsoft.com/en-us/library/ff541697%28v=VS.85%29.aspx 1727bf215546Sopenharmony_ci */ 1728bf215546Sopenharmony_citypedef 1729bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1730bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBSurface_v2 { 1731bf215546Sopenharmony_ci uint32 sid; 1732bf215546Sopenharmony_ci SVGA3dSurface1Flags surfaceFlags; 1733bf215546Sopenharmony_ci SVGA3dSurfaceFormat format; 1734bf215546Sopenharmony_ci uint32 numMipLevels; 1735bf215546Sopenharmony_ci uint32 multisampleCount; 1736bf215546Sopenharmony_ci SVGA3dTextureFilter autogenFilter; 1737bf215546Sopenharmony_ci SVGA3dSize size; 1738bf215546Sopenharmony_ci uint32 arraySize; 1739bf215546Sopenharmony_ci uint32 pad; 1740bf215546Sopenharmony_ci} 1741bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1742bf215546Sopenharmony_ciSVGA3dCmdDefineGBSurface_v2; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V2 */ 1743bf215546Sopenharmony_ci 1744bf215546Sopenharmony_ci/* 1745bf215546Sopenharmony_ci * Defines a guest-backed surface, adding the larger flags. 1746bf215546Sopenharmony_ci */ 1747bf215546Sopenharmony_citypedef 1748bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1749bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBSurface_v3 { 1750bf215546Sopenharmony_ci uint32 sid; 1751bf215546Sopenharmony_ci SVGA3dSurfaceAllFlags surfaceFlags; 1752bf215546Sopenharmony_ci SVGA3dSurfaceFormat format; 1753bf215546Sopenharmony_ci uint32 numMipLevels; 1754bf215546Sopenharmony_ci uint32 multisampleCount; 1755bf215546Sopenharmony_ci SVGA3dMSPattern multisamplePattern; 1756bf215546Sopenharmony_ci SVGA3dTextureFilter autogenFilter; 1757bf215546Sopenharmony_ci SVGA3dSize size; 1758bf215546Sopenharmony_ci uint32 arraySize; 1759bf215546Sopenharmony_ci} 1760bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1761bf215546Sopenharmony_ciSVGA3dCmdDefineGBSurface_v3; /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V3 */ 1762bf215546Sopenharmony_ci 1763bf215546Sopenharmony_ci/* 1764bf215546Sopenharmony_ci * Destroy a guest-backed surface. 1765bf215546Sopenharmony_ci */ 1766bf215546Sopenharmony_ci 1767bf215546Sopenharmony_citypedef 1768bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1769bf215546Sopenharmony_cistruct SVGA3dCmdDestroyGBSurface { 1770bf215546Sopenharmony_ci uint32 sid; 1771bf215546Sopenharmony_ci} 1772bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1773bf215546Sopenharmony_ciSVGA3dCmdDestroyGBSurface; /* SVGA_3D_CMD_DESTROY_GB_SURFACE */ 1774bf215546Sopenharmony_ci 1775bf215546Sopenharmony_ci/* 1776bf215546Sopenharmony_ci * Bind a guest-backed surface to a mob. 1777bf215546Sopenharmony_ci */ 1778bf215546Sopenharmony_ci 1779bf215546Sopenharmony_citypedef 1780bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1781bf215546Sopenharmony_cistruct SVGA3dCmdBindGBSurface { 1782bf215546Sopenharmony_ci uint32 sid; 1783bf215546Sopenharmony_ci SVGAMobId mobid; 1784bf215546Sopenharmony_ci} 1785bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1786bf215546Sopenharmony_ciSVGA3dCmdBindGBSurface; /* SVGA_3D_CMD_BIND_GB_SURFACE */ 1787bf215546Sopenharmony_ci 1788bf215546Sopenharmony_citypedef 1789bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1790bf215546Sopenharmony_cistruct SVGA3dCmdBindGBSurfaceWithPitch { 1791bf215546Sopenharmony_ci uint32 sid; 1792bf215546Sopenharmony_ci SVGAMobId mobid; 1793bf215546Sopenharmony_ci uint32 baseLevelPitch; 1794bf215546Sopenharmony_ci} 1795bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1796bf215546Sopenharmony_ciSVGA3dCmdBindGBSurfaceWithPitch; /* SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH */ 1797bf215546Sopenharmony_ci 1798bf215546Sopenharmony_ci/* 1799bf215546Sopenharmony_ci * Conditionally bind a mob to a guest-backed surface if testMobid 1800bf215546Sopenharmony_ci * matches the currently bound mob. Optionally issue a 1801bf215546Sopenharmony_ci * readback/update on the surface while it is still bound to the old 1802bf215546Sopenharmony_ci * mobid if the mobid is changed by this command. 1803bf215546Sopenharmony_ci */ 1804bf215546Sopenharmony_ci 1805bf215546Sopenharmony_ci#define SVGA3D_COND_BIND_GB_SURFACE_FLAG_READBACK (1 << 0) 1806bf215546Sopenharmony_ci#define SVGA3D_COND_BIND_GB_SURFACE_FLAG_UPDATE (1 << 1) 1807bf215546Sopenharmony_ci 1808bf215546Sopenharmony_citypedef 1809bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1810bf215546Sopenharmony_cistruct SVGA3dCmdCondBindGBSurface { 1811bf215546Sopenharmony_ci uint32 sid; 1812bf215546Sopenharmony_ci SVGAMobId testMobid; 1813bf215546Sopenharmony_ci SVGAMobId mobid; 1814bf215546Sopenharmony_ci uint32 flags; 1815bf215546Sopenharmony_ci} 1816bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1817bf215546Sopenharmony_ciSVGA3dCmdCondBindGBSurface; /* SVGA_3D_CMD_COND_BIND_GB_SURFACE */ 1818bf215546Sopenharmony_ci 1819bf215546Sopenharmony_ci/* 1820bf215546Sopenharmony_ci * Update an image in a guest-backed surface. 1821bf215546Sopenharmony_ci * (Inform the device that the guest-contents have been updated.) 1822bf215546Sopenharmony_ci */ 1823bf215546Sopenharmony_ci 1824bf215546Sopenharmony_citypedef 1825bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1826bf215546Sopenharmony_cistruct SVGA3dCmdUpdateGBImage { 1827bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 1828bf215546Sopenharmony_ci SVGA3dBox box; 1829bf215546Sopenharmony_ci} 1830bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1831bf215546Sopenharmony_ciSVGA3dCmdUpdateGBImage; /* SVGA_3D_CMD_UPDATE_GB_IMAGE */ 1832bf215546Sopenharmony_ci 1833bf215546Sopenharmony_ci/* 1834bf215546Sopenharmony_ci * Update an entire guest-backed surface. 1835bf215546Sopenharmony_ci * (Inform the device that the guest-contents have been updated.) 1836bf215546Sopenharmony_ci */ 1837bf215546Sopenharmony_ci 1838bf215546Sopenharmony_citypedef 1839bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1840bf215546Sopenharmony_cistruct SVGA3dCmdUpdateGBSurface { 1841bf215546Sopenharmony_ci uint32 sid; 1842bf215546Sopenharmony_ci} 1843bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1844bf215546Sopenharmony_ciSVGA3dCmdUpdateGBSurface; /* SVGA_3D_CMD_UPDATE_GB_SURFACE */ 1845bf215546Sopenharmony_ci 1846bf215546Sopenharmony_ci/* 1847bf215546Sopenharmony_ci * Readback an image in a guest-backed surface. 1848bf215546Sopenharmony_ci * (Request the device to flush the dirty contents into the guest.) 1849bf215546Sopenharmony_ci */ 1850bf215546Sopenharmony_ci 1851bf215546Sopenharmony_citypedef 1852bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1853bf215546Sopenharmony_cistruct SVGA3dCmdReadbackGBImage { 1854bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 1855bf215546Sopenharmony_ci} 1856bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1857bf215546Sopenharmony_ciSVGA3dCmdReadbackGBImage; /* SVGA_3D_CMD_READBACK_GB_IMAGE */ 1858bf215546Sopenharmony_ci 1859bf215546Sopenharmony_ci/* 1860bf215546Sopenharmony_ci * Readback an entire guest-backed surface. 1861bf215546Sopenharmony_ci * (Request the device to flush the dirty contents into the guest.) 1862bf215546Sopenharmony_ci */ 1863bf215546Sopenharmony_ci 1864bf215546Sopenharmony_citypedef 1865bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1866bf215546Sopenharmony_cistruct SVGA3dCmdReadbackGBSurface { 1867bf215546Sopenharmony_ci uint32 sid; 1868bf215546Sopenharmony_ci} 1869bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1870bf215546Sopenharmony_ciSVGA3dCmdReadbackGBSurface; /* SVGA_3D_CMD_READBACK_GB_SURFACE */ 1871bf215546Sopenharmony_ci 1872bf215546Sopenharmony_ci/* 1873bf215546Sopenharmony_ci * Readback a sub rect of an image in a guest-backed surface. After 1874bf215546Sopenharmony_ci * issuing this command the driver is required to issue an update call 1875bf215546Sopenharmony_ci * of the same region before issuing any other commands that reference 1876bf215546Sopenharmony_ci * this surface or rendering is not guaranteed. 1877bf215546Sopenharmony_ci */ 1878bf215546Sopenharmony_ci 1879bf215546Sopenharmony_citypedef 1880bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1881bf215546Sopenharmony_cistruct SVGA3dCmdReadbackGBImagePartial { 1882bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 1883bf215546Sopenharmony_ci SVGA3dBox box; 1884bf215546Sopenharmony_ci uint32 invertBox; 1885bf215546Sopenharmony_ci} 1886bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1887bf215546Sopenharmony_ciSVGA3dCmdReadbackGBImagePartial; /* SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL */ 1888bf215546Sopenharmony_ci 1889bf215546Sopenharmony_ci 1890bf215546Sopenharmony_ci/* 1891bf215546Sopenharmony_ci * Invalidate an image in a guest-backed surface. 1892bf215546Sopenharmony_ci * (Notify the device that the contents can be lost.) 1893bf215546Sopenharmony_ci */ 1894bf215546Sopenharmony_ci 1895bf215546Sopenharmony_citypedef 1896bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1897bf215546Sopenharmony_cistruct SVGA3dCmdInvalidateGBImage { 1898bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 1899bf215546Sopenharmony_ci} 1900bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1901bf215546Sopenharmony_ciSVGA3dCmdInvalidateGBImage; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE */ 1902bf215546Sopenharmony_ci 1903bf215546Sopenharmony_ci/* 1904bf215546Sopenharmony_ci * Invalidate an entire guest-backed surface. 1905bf215546Sopenharmony_ci * (Notify the device that the contents if all images can be lost.) 1906bf215546Sopenharmony_ci */ 1907bf215546Sopenharmony_ci 1908bf215546Sopenharmony_citypedef 1909bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1910bf215546Sopenharmony_cistruct SVGA3dCmdInvalidateGBSurface { 1911bf215546Sopenharmony_ci uint32 sid; 1912bf215546Sopenharmony_ci} 1913bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1914bf215546Sopenharmony_ciSVGA3dCmdInvalidateGBSurface; /* SVGA_3D_CMD_INVALIDATE_GB_SURFACE */ 1915bf215546Sopenharmony_ci 1916bf215546Sopenharmony_ci/* 1917bf215546Sopenharmony_ci * Invalidate a sub rect of an image in a guest-backed surface. After 1918bf215546Sopenharmony_ci * issuing this command the driver is required to issue an update call 1919bf215546Sopenharmony_ci * of the same region before issuing any other commands that reference 1920bf215546Sopenharmony_ci * this surface or rendering is not guaranteed. 1921bf215546Sopenharmony_ci */ 1922bf215546Sopenharmony_ci 1923bf215546Sopenharmony_citypedef 1924bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1925bf215546Sopenharmony_cistruct SVGA3dCmdInvalidateGBImagePartial { 1926bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 1927bf215546Sopenharmony_ci SVGA3dBox box; 1928bf215546Sopenharmony_ci uint32 invertBox; 1929bf215546Sopenharmony_ci} 1930bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1931bf215546Sopenharmony_ciSVGA3dCmdInvalidateGBImagePartial; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL */ 1932bf215546Sopenharmony_ci 1933bf215546Sopenharmony_ci 1934bf215546Sopenharmony_ci/* 1935bf215546Sopenharmony_ci * Define a guest-backed context. 1936bf215546Sopenharmony_ci */ 1937bf215546Sopenharmony_ci 1938bf215546Sopenharmony_citypedef 1939bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1940bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBContext { 1941bf215546Sopenharmony_ci uint32 cid; 1942bf215546Sopenharmony_ci} 1943bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1944bf215546Sopenharmony_ciSVGA3dCmdDefineGBContext; /* SVGA_3D_CMD_DEFINE_GB_CONTEXT */ 1945bf215546Sopenharmony_ci 1946bf215546Sopenharmony_ci/* 1947bf215546Sopenharmony_ci * Destroy a guest-backed context. 1948bf215546Sopenharmony_ci */ 1949bf215546Sopenharmony_ci 1950bf215546Sopenharmony_citypedef 1951bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1952bf215546Sopenharmony_cistruct SVGA3dCmdDestroyGBContext { 1953bf215546Sopenharmony_ci uint32 cid; 1954bf215546Sopenharmony_ci} 1955bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1956bf215546Sopenharmony_ciSVGA3dCmdDestroyGBContext; /* SVGA_3D_CMD_DESTROY_GB_CONTEXT */ 1957bf215546Sopenharmony_ci 1958bf215546Sopenharmony_ci/* 1959bf215546Sopenharmony_ci * Bind a guest-backed context. 1960bf215546Sopenharmony_ci * 1961bf215546Sopenharmony_ci * validContents should be set to 0 for new contexts, 1962bf215546Sopenharmony_ci * and 1 if this is an old context which is getting paged 1963bf215546Sopenharmony_ci * back on to the device. 1964bf215546Sopenharmony_ci * 1965bf215546Sopenharmony_ci * For new contexts, it is recommended that the driver 1966bf215546Sopenharmony_ci * issue commands to initialize all interesting state 1967bf215546Sopenharmony_ci * prior to rendering. 1968bf215546Sopenharmony_ci */ 1969bf215546Sopenharmony_ci 1970bf215546Sopenharmony_citypedef 1971bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1972bf215546Sopenharmony_cistruct SVGA3dCmdBindGBContext { 1973bf215546Sopenharmony_ci uint32 cid; 1974bf215546Sopenharmony_ci SVGAMobId mobid; 1975bf215546Sopenharmony_ci uint32 validContents; 1976bf215546Sopenharmony_ci} 1977bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1978bf215546Sopenharmony_ciSVGA3dCmdBindGBContext; /* SVGA_3D_CMD_BIND_GB_CONTEXT */ 1979bf215546Sopenharmony_ci 1980bf215546Sopenharmony_ci/* 1981bf215546Sopenharmony_ci * Readback a guest-backed context. 1982bf215546Sopenharmony_ci * (Request that the device flush the contents back into guest memory.) 1983bf215546Sopenharmony_ci */ 1984bf215546Sopenharmony_ci 1985bf215546Sopenharmony_citypedef 1986bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1987bf215546Sopenharmony_cistruct SVGA3dCmdReadbackGBContext { 1988bf215546Sopenharmony_ci uint32 cid; 1989bf215546Sopenharmony_ci} 1990bf215546Sopenharmony_ci#include "vmware_pack_end.h" 1991bf215546Sopenharmony_ciSVGA3dCmdReadbackGBContext; /* SVGA_3D_CMD_READBACK_GB_CONTEXT */ 1992bf215546Sopenharmony_ci 1993bf215546Sopenharmony_ci/* 1994bf215546Sopenharmony_ci * Invalidate a guest-backed context. 1995bf215546Sopenharmony_ci */ 1996bf215546Sopenharmony_citypedef 1997bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 1998bf215546Sopenharmony_cistruct SVGA3dCmdInvalidateGBContext { 1999bf215546Sopenharmony_ci uint32 cid; 2000bf215546Sopenharmony_ci} 2001bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2002bf215546Sopenharmony_ciSVGA3dCmdInvalidateGBContext; /* SVGA_3D_CMD_INVALIDATE_GB_CONTEXT */ 2003bf215546Sopenharmony_ci 2004bf215546Sopenharmony_ci/* 2005bf215546Sopenharmony_ci * Define a guest-backed shader. 2006bf215546Sopenharmony_ci */ 2007bf215546Sopenharmony_ci 2008bf215546Sopenharmony_citypedef 2009bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2010bf215546Sopenharmony_cistruct SVGA3dCmdDefineGBShader { 2011bf215546Sopenharmony_ci uint32 shid; 2012bf215546Sopenharmony_ci SVGA3dShaderType type; 2013bf215546Sopenharmony_ci uint32 sizeInBytes; 2014bf215546Sopenharmony_ci} 2015bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2016bf215546Sopenharmony_ciSVGA3dCmdDefineGBShader; /* SVGA_3D_CMD_DEFINE_GB_SHADER */ 2017bf215546Sopenharmony_ci 2018bf215546Sopenharmony_ci/* 2019bf215546Sopenharmony_ci * Bind a guest-backed shader. 2020bf215546Sopenharmony_ci */ 2021bf215546Sopenharmony_ci 2022bf215546Sopenharmony_citypedef 2023bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2024bf215546Sopenharmony_cistruct SVGA3dCmdBindGBShader { 2025bf215546Sopenharmony_ci uint32 shid; 2026bf215546Sopenharmony_ci SVGAMobId mobid; 2027bf215546Sopenharmony_ci uint32 offsetInBytes; 2028bf215546Sopenharmony_ci} 2029bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2030bf215546Sopenharmony_ciSVGA3dCmdBindGBShader; /* SVGA_3D_CMD_BIND_GB_SHADER */ 2031bf215546Sopenharmony_ci 2032bf215546Sopenharmony_ci/* 2033bf215546Sopenharmony_ci * Destroy a guest-backed shader. 2034bf215546Sopenharmony_ci */ 2035bf215546Sopenharmony_ci 2036bf215546Sopenharmony_citypedef 2037bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2038bf215546Sopenharmony_cistruct SVGA3dCmdDestroyGBShader { 2039bf215546Sopenharmony_ci uint32 shid; 2040bf215546Sopenharmony_ci} 2041bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2042bf215546Sopenharmony_ciSVGA3dCmdDestroyGBShader; /* SVGA_3D_CMD_DESTROY_GB_SHADER */ 2043bf215546Sopenharmony_ci 2044bf215546Sopenharmony_citypedef 2045bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2046bf215546Sopenharmony_cistruct { 2047bf215546Sopenharmony_ci uint32 cid; 2048bf215546Sopenharmony_ci uint32 regStart; 2049bf215546Sopenharmony_ci SVGA3dShaderType shaderType; 2050bf215546Sopenharmony_ci SVGA3dShaderConstType constType; 2051bf215546Sopenharmony_ci 2052bf215546Sopenharmony_ci /* 2053bf215546Sopenharmony_ci * Followed by a variable number of shader constants. 2054bf215546Sopenharmony_ci * 2055bf215546Sopenharmony_ci * Note that FLOAT and INT constants are 4-dwords in length, while 2056bf215546Sopenharmony_ci * BOOL constants are 1-dword in length. 2057bf215546Sopenharmony_ci */ 2058bf215546Sopenharmony_ci} 2059bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2060bf215546Sopenharmony_ciSVGA3dCmdSetGBShaderConstInline; /* SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE */ 2061bf215546Sopenharmony_ci 2062bf215546Sopenharmony_ci 2063bf215546Sopenharmony_citypedef 2064bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2065bf215546Sopenharmony_cistruct { 2066bf215546Sopenharmony_ci uint32 cid; 2067bf215546Sopenharmony_ci SVGA3dQueryType type; 2068bf215546Sopenharmony_ci} 2069bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2070bf215546Sopenharmony_ciSVGA3dCmdBeginGBQuery; /* SVGA_3D_CMD_BEGIN_GB_QUERY */ 2071bf215546Sopenharmony_ci 2072bf215546Sopenharmony_citypedef 2073bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2074bf215546Sopenharmony_cistruct { 2075bf215546Sopenharmony_ci uint32 cid; 2076bf215546Sopenharmony_ci SVGA3dQueryType type; 2077bf215546Sopenharmony_ci SVGAMobId mobid; 2078bf215546Sopenharmony_ci uint32 offset; 2079bf215546Sopenharmony_ci} 2080bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2081bf215546Sopenharmony_ciSVGA3dCmdEndGBQuery; /* SVGA_3D_CMD_END_GB_QUERY */ 2082bf215546Sopenharmony_ci 2083bf215546Sopenharmony_ci 2084bf215546Sopenharmony_ci/* 2085bf215546Sopenharmony_ci * SVGA_3D_CMD_WAIT_FOR_GB_QUERY -- 2086bf215546Sopenharmony_ci * 2087bf215546Sopenharmony_ci * The semantics of this command are identical to the 2088bf215546Sopenharmony_ci * SVGA_3D_CMD_WAIT_FOR_QUERY except that the results are written 2089bf215546Sopenharmony_ci * to a Mob instead of a GMR. 2090bf215546Sopenharmony_ci */ 2091bf215546Sopenharmony_ci 2092bf215546Sopenharmony_citypedef 2093bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2094bf215546Sopenharmony_cistruct { 2095bf215546Sopenharmony_ci uint32 cid; 2096bf215546Sopenharmony_ci SVGA3dQueryType type; 2097bf215546Sopenharmony_ci SVGAMobId mobid; 2098bf215546Sopenharmony_ci uint32 offset; 2099bf215546Sopenharmony_ci} 2100bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2101bf215546Sopenharmony_ciSVGA3dCmdWaitForGBQuery; /* SVGA_3D_CMD_WAIT_FOR_GB_QUERY */ 2102bf215546Sopenharmony_ci 2103bf215546Sopenharmony_ci 2104bf215546Sopenharmony_citypedef 2105bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2106bf215546Sopenharmony_cistruct { 2107bf215546Sopenharmony_ci SVGAMobId mobid; 2108bf215546Sopenharmony_ci uint32 mustBeZero; 2109bf215546Sopenharmony_ci uint32 initialized; 2110bf215546Sopenharmony_ci} 2111bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2112bf215546Sopenharmony_ciSVGA3dCmdEnableGart; /* SVGA_3D_CMD_ENABLE_GART */ 2113bf215546Sopenharmony_ci 2114bf215546Sopenharmony_citypedef 2115bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2116bf215546Sopenharmony_cistruct { 2117bf215546Sopenharmony_ci SVGAMobId mobid; 2118bf215546Sopenharmony_ci uint32 gartOffset; 2119bf215546Sopenharmony_ci} 2120bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2121bf215546Sopenharmony_ciSVGA3dCmdMapMobIntoGart; /* SVGA_3D_CMD_MAP_MOB_INTO_GART */ 2122bf215546Sopenharmony_ci 2123bf215546Sopenharmony_ci 2124bf215546Sopenharmony_citypedef 2125bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2126bf215546Sopenharmony_cistruct { 2127bf215546Sopenharmony_ci uint32 gartOffset; 2128bf215546Sopenharmony_ci uint32 numPages; 2129bf215546Sopenharmony_ci} 2130bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2131bf215546Sopenharmony_ciSVGA3dCmdUnmapGartRange; /* SVGA_3D_CMD_UNMAP_GART_RANGE */ 2132bf215546Sopenharmony_ci 2133bf215546Sopenharmony_ci 2134bf215546Sopenharmony_ci/* 2135bf215546Sopenharmony_ci * Screen Targets 2136bf215546Sopenharmony_ci */ 2137bf215546Sopenharmony_ci 2138bf215546Sopenharmony_citypedef 2139bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2140bf215546Sopenharmony_cistruct { 2141bf215546Sopenharmony_ci uint32 stid; 2142bf215546Sopenharmony_ci uint32 width; 2143bf215546Sopenharmony_ci uint32 height; 2144bf215546Sopenharmony_ci int32 xRoot; 2145bf215546Sopenharmony_ci int32 yRoot; 2146bf215546Sopenharmony_ci SVGAScreenTargetFlags flags; 2147bf215546Sopenharmony_ci 2148bf215546Sopenharmony_ci /* 2149bf215546Sopenharmony_ci * The physical DPI that the guest expects this screen displayed at. 2150bf215546Sopenharmony_ci * 2151bf215546Sopenharmony_ci * Guests which are not DPI-aware should set this to zero. 2152bf215546Sopenharmony_ci */ 2153bf215546Sopenharmony_ci uint32 dpi; 2154bf215546Sopenharmony_ci} 2155bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2156bf215546Sopenharmony_ciSVGA3dCmdDefineGBScreenTarget; /* SVGA_3D_CMD_DEFINE_GB_SCREENTARGET */ 2157bf215546Sopenharmony_ci 2158bf215546Sopenharmony_citypedef 2159bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2160bf215546Sopenharmony_cistruct { 2161bf215546Sopenharmony_ci uint32 stid; 2162bf215546Sopenharmony_ci} 2163bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2164bf215546Sopenharmony_ciSVGA3dCmdDestroyGBScreenTarget; /* SVGA_3D_CMD_DESTROY_GB_SCREENTARGET */ 2165bf215546Sopenharmony_ci 2166bf215546Sopenharmony_citypedef 2167bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2168bf215546Sopenharmony_cistruct { 2169bf215546Sopenharmony_ci uint32 stid; 2170bf215546Sopenharmony_ci SVGA3dSurfaceImageId image; 2171bf215546Sopenharmony_ci} 2172bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2173bf215546Sopenharmony_ciSVGA3dCmdBindGBScreenTarget; /* SVGA_3D_CMD_BIND_GB_SCREENTARGET */ 2174bf215546Sopenharmony_ci 2175bf215546Sopenharmony_citypedef 2176bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2177bf215546Sopenharmony_cistruct { 2178bf215546Sopenharmony_ci uint32 stid; 2179bf215546Sopenharmony_ci SVGA3dRect rect; 2180bf215546Sopenharmony_ci} 2181bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2182bf215546Sopenharmony_ciSVGA3dCmdUpdateGBScreenTarget; /* SVGA_3D_CMD_UPDATE_GB_SCREENTARGET */ 2183bf215546Sopenharmony_ci 2184bf215546Sopenharmony_citypedef 2185bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2186bf215546Sopenharmony_cistruct SVGA3dCmdGBScreenDMA { 2187bf215546Sopenharmony_ci uint32 screenId; 2188bf215546Sopenharmony_ci uint32 dead; 2189bf215546Sopenharmony_ci SVGAMobId destMobID; 2190bf215546Sopenharmony_ci uint32 destPitch; 2191bf215546Sopenharmony_ci SVGAMobId changeMapMobID; 2192bf215546Sopenharmony_ci} 2193bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2194bf215546Sopenharmony_ciSVGA3dCmdGBScreenDMA; /* SVGA_3D_CMD_GB_SCREEN_DMA */ 2195bf215546Sopenharmony_ci 2196bf215546Sopenharmony_citypedef 2197bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2198bf215546Sopenharmony_cistruct { 2199bf215546Sopenharmony_ci uint32 value; 2200bf215546Sopenharmony_ci uint32 mobId; 2201bf215546Sopenharmony_ci uint32 mobOffset; 2202bf215546Sopenharmony_ci} 2203bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2204bf215546Sopenharmony_ciSVGA3dCmdGBMobFence; /* SVGA_3D_CMD_GB_MOB_FENCE */ 2205bf215546Sopenharmony_ci 2206bf215546Sopenharmony_citypedef 2207bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 2208bf215546Sopenharmony_cistruct { 2209bf215546Sopenharmony_ci uint32 stid; 2210bf215546Sopenharmony_ci SVGA3dSurfaceImageId dest; 2211bf215546Sopenharmony_ci 2212bf215546Sopenharmony_ci uint32 statusMobId; 2213bf215546Sopenharmony_ci uint32 statusMobOffset; 2214bf215546Sopenharmony_ci 2215bf215546Sopenharmony_ci /* Reserved fields */ 2216bf215546Sopenharmony_ci uint32 mustBeInvalidId; 2217bf215546Sopenharmony_ci uint32 mustBeZero; 2218bf215546Sopenharmony_ci} 2219bf215546Sopenharmony_ci#include "vmware_pack_end.h" 2220bf215546Sopenharmony_ciSVGA3dCmdScreenCopy; /* SVGA_3D_CMD_SCREEN_COPY */ 2221bf215546Sopenharmony_ci 2222bf215546Sopenharmony_ci#define SVGA_SCREEN_COPY_STATUS_FAILURE 0x00 2223bf215546Sopenharmony_ci#define SVGA_SCREEN_COPY_STATUS_SUCCESS 0x01 2224bf215546Sopenharmony_ci#define SVGA_SCREEN_COPY_STATUS_INVALID 0xFFFFFFFF 2225bf215546Sopenharmony_ci 2226bf215546Sopenharmony_ci#endif // _SVGA3D_CMD_H_ 2227