Subversion Repositories Kolibri OS

Rev

Rev 4569 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4569 Rev 5078
Line 259... Line 259...
259
   SVGA3D_Z_D24S8_INT                  = 120,
259
   SVGA3D_Z_D24S8_INT                  = 120,
Line 260... Line 260...
260
 
260
 
261
   /* Planar video formats. */
261
   /* Planar video formats. */
Line 262... Line -...
262
   SVGA3D_YV12                         = 121,
-
 
263
 
-
 
264
   /* Shader constant formats. */
-
 
265
   SVGA3D_SURFACE_SHADERCONST_FLOAT    = 122,
-
 
266
   SVGA3D_SURFACE_SHADERCONST_INT      = 123,
-
 
267
   SVGA3D_SURFACE_SHADERCONST_BOOL     = 124,
262
   SVGA3D_YV12                         = 121,
268
 
263
 
Line 269... Line 264...
269
   SVGA3D_FORMAT_MAX                   = 125,
264
   SVGA3D_FORMAT_MAX                   = 122,
Line 270... Line 265...
270
} SVGA3dSurfaceFormat;
265
} SVGA3dSurfaceFormat;
Line 1221... Line 1216...
1221
 
1216
 
1222
#define SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL   1128
1217
#define SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL   1128
Line 1223... Line 1218...
1223
#define SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL 1129
1218
#define SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL 1129
1224
 
-
 
-
 
1219
 
-
 
1220
#define SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE  1130
-
 
1221
#define SVGA_3D_CMD_GB_SCREEN_DMA               1131
-
 
1222
#define SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH  1132
1225
#define SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE  1130
1223
#define SVGA_3D_CMD_GB_MOB_FENCE                1133
1226
 
1224
#define SVGA_3D_CMD_DEFINE_GB_SURFACE_V2        1134
-
 
1225
#define SVGA_3D_CMD_DEFINE_GB_MOB64          1135
-
 
1226
#define SVGA_3D_CMD_REDEFINE_GB_MOB64        1136
-
 
1227
#define SVGA_3D_CMD_NOP_ERROR                1137
-
 
1228
 
-
 
1229
#define SVGA_3D_CMD_RESERVED1                1138
-
 
1230
#define SVGA_3D_CMD_RESERVED2                1139
-
 
1231
#define SVGA_3D_CMD_RESERVED3                1140
Line 1227... Line 1232...
1227
#define SVGA_3D_CMD_DEFINE_GB_MOB64          1135
1232
#define SVGA_3D_CMD_RESERVED4                1141
1228
#define SVGA_3D_CMD_REDEFINE_GB_MOB64        1136
1233
#define SVGA_3D_CMD_RESERVED5                1142
Line 1229... Line 1234...
1229
 
1234
 
Line 1971... Line 1976...
1971
   SVGAOTableType type;
1976
   SVGAOTableType type;
1972
   PPN baseAddress;
1977
   PPN baseAddress;
1973
   uint32 sizeInBytes;
1978
   uint32 sizeInBytes;
1974
   uint32 validSizeInBytes;
1979
   uint32 validSizeInBytes;
1975
   SVGAMobFormat ptDepth;
1980
   SVGAMobFormat ptDepth;
1976
}
-
 
1977
__attribute__((__packed__))
1981
} __packed
1978
SVGA3dCmdSetOTableBase;  /* SVGA_3D_CMD_SET_OTABLE_BASE */
1982
SVGA3dCmdSetOTableBase;  /* SVGA_3D_CMD_SET_OTABLE_BASE */
Line 1979... Line 1983...
1979
 
1983
 
1980
typedef
1984
typedef
1981
struct {
1985
struct {
1982
   SVGAOTableType type;
1986
   SVGAOTableType type;
1983
   PPN64 baseAddress;
1987
   PPN64 baseAddress;
1984
   uint32 sizeInBytes;
1988
   uint32 sizeInBytes;
1985
   uint32 validSizeInBytes;
1989
   uint32 validSizeInBytes;
1986
   SVGAMobFormat ptDepth;
-
 
1987
}
1990
   SVGAMobFormat ptDepth;
1988
__attribute__((__packed__))
1991
} __packed
Line 1989... Line 1992...
1989
SVGA3dCmdSetOTableBase64;  /* SVGA_3D_CMD_SET_OTABLE_BASE64 */
1992
SVGA3dCmdSetOTableBase64;  /* SVGA_3D_CMD_SET_OTABLE_BASE64 */
1990
 
1993
 
1991
typedef
1994
typedef
1992
struct {
-
 
1993
   SVGAOTableType type;
1995
struct {
1994
}
1996
   SVGAOTableType type;
Line 1995... Line 1997...
1995
__attribute__((__packed__))
1997
} __packed
1996
SVGA3dCmdReadbackOTable;  /* SVGA_3D_CMD_READBACK_OTABLE */
1998
SVGA3dCmdReadbackOTable;  /* SVGA_3D_CMD_READBACK_OTABLE */
1997
 
1999
 
Line 2003... Line 2005...
2003
struct SVGA3dCmdDefineGBMob {
2005
struct SVGA3dCmdDefineGBMob {
2004
   SVGAMobId mobid;
2006
   SVGAMobId mobid;
2005
   SVGAMobFormat ptDepth;
2007
   SVGAMobFormat ptDepth;
2006
   PPN base;
2008
   PPN base;
2007
   uint32 sizeInBytes;
2009
   uint32 sizeInBytes;
2008
}
-
 
2009
__attribute__((__packed__))
2010
} __packed
2010
SVGA3dCmdDefineGBMob;   /* SVGA_3D_CMD_DEFINE_GB_MOB */
2011
SVGA3dCmdDefineGBMob;   /* SVGA_3D_CMD_DEFINE_GB_MOB */
Line 2011... Line 2012...
2011
 
2012
 
2012
 
2013
 
2013
/*
2014
/*
Line 2014... Line 2015...
2014
 * Destroys an object in the OTable.
2015
 * Destroys an object in the OTable.
2015
 */
2016
 */
2016
 
2017
 
2017
typedef
-
 
2018
struct SVGA3dCmdDestroyGBMob {
2018
typedef
2019
   SVGAMobId mobid;
2019
struct SVGA3dCmdDestroyGBMob {
Line 2020... Line 2020...
2020
}
2020
   SVGAMobId mobid;
2021
__attribute__((__packed__))
2021
} __packed
2022
SVGA3dCmdDestroyGBMob;   /* SVGA_3D_CMD_DESTROY_GB_MOB */
2022
SVGA3dCmdDestroyGBMob;   /* SVGA_3D_CMD_DESTROY_GB_MOB */
Line 2029... Line 2029...
2029
struct SVGA3dCmdRedefineGBMob {
2029
struct SVGA3dCmdRedefineGBMob {
2030
   SVGAMobId mobid;
2030
   SVGAMobId mobid;
2031
   SVGAMobFormat ptDepth;
2031
   SVGAMobFormat ptDepth;
2032
   PPN base;
2032
   PPN base;
2033
   uint32 sizeInBytes;
2033
   uint32 sizeInBytes;
2034
}
-
 
2035
__attribute__((__packed__))
2034
} __packed
2036
SVGA3dCmdRedefineGBMob;   /* SVGA_3D_CMD_REDEFINE_GB_MOB */
2035
SVGA3dCmdRedefineGBMob;   /* SVGA_3D_CMD_REDEFINE_GB_MOB */
Line 2037... Line 2036...
2037
 
2036
 
2038
/*
2037
/*
2039
 * Define a memory object (Mob) in the OTable with a PPN64 base.
2038
 * Define a memory object (Mob) in the OTable with a PPN64 base.
Line 2043... Line 2042...
2043
struct SVGA3dCmdDefineGBMob64 {
2042
struct SVGA3dCmdDefineGBMob64 {
2044
   SVGAMobId mobid;
2043
   SVGAMobId mobid;
2045
   SVGAMobFormat ptDepth;
2044
   SVGAMobFormat ptDepth;
2046
   PPN64 base;
2045
   PPN64 base;
2047
   uint32 sizeInBytes;
2046
   uint32 sizeInBytes;
2048
}
-
 
2049
__attribute__((__packed__))
2047
} __packed
2050
SVGA3dCmdDefineGBMob64;   /* SVGA_3D_CMD_DEFINE_GB_MOB64 */
2048
SVGA3dCmdDefineGBMob64;   /* SVGA_3D_CMD_DEFINE_GB_MOB64 */
Line 2051... Line 2049...
2051
 
2049
 
2052
/*
2050
/*
2053
 * Redefine an object in the OTable with PPN64 base.
2051
 * Redefine an object in the OTable with PPN64 base.
Line 2057... Line 2055...
2057
struct SVGA3dCmdRedefineGBMob64 {
2055
struct SVGA3dCmdRedefineGBMob64 {
2058
   SVGAMobId mobid;
2056
   SVGAMobId mobid;
2059
   SVGAMobFormat ptDepth;
2057
   SVGAMobFormat ptDepth;
2060
   PPN64 base;
2058
   PPN64 base;
2061
   uint32 sizeInBytes;
2059
   uint32 sizeInBytes;
2062
}
-
 
2063
__attribute__((__packed__))
2060
} __packed
2064
SVGA3dCmdRedefineGBMob64;   /* SVGA_3D_CMD_REDEFINE_GB_MOB64 */
2061
SVGA3dCmdRedefineGBMob64;   /* SVGA_3D_CMD_REDEFINE_GB_MOB64 */
Line 2065... Line 2062...
2065
 
2062
 
2066
/*
2063
/*
2067
 * Notification that the page tables have been modified.
2064
 * Notification that the page tables have been modified.
Line 2068... Line 2065...
2068
 */
2065
 */
2069
 
2066
 
2070
typedef
2067
typedef
2071
struct SVGA3dCmdUpdateGBMobMapping {
-
 
2072
   SVGAMobId mobid;
2068
struct SVGA3dCmdUpdateGBMobMapping {
2073
}
2069
   SVGAMobId mobid;
Line 2074... Line 2070...
2074
__attribute__((__packed__))
2070
} __packed
2075
SVGA3dCmdUpdateGBMobMapping;   /* SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING */
2071
SVGA3dCmdUpdateGBMobMapping;   /* SVGA_3D_CMD_UPDATE_GB_MOB_MAPPING */
2076
 
2072
 
Line 2085... Line 2081...
2085
   SVGA3dSurfaceFormat format;
2081
   SVGA3dSurfaceFormat format;
2086
   uint32 numMipLevels;
2082
   uint32 numMipLevels;
2087
   uint32 multisampleCount;
2083
   uint32 multisampleCount;
2088
   SVGA3dTextureFilter autogenFilter;
2084
   SVGA3dTextureFilter autogenFilter;
2089
   SVGA3dSize size;
2085
   SVGA3dSize size;
-
 
2086
} __packed
2090
} SVGA3dCmdDefineGBSurface;   /* SVGA_3D_CMD_DEFINE_GB_SURFACE */
2087
SVGA3dCmdDefineGBSurface;   /* SVGA_3D_CMD_DEFINE_GB_SURFACE */
Line 2091... Line 2088...
2091
 
2088
 
2092
/*
2089
/*
2093
 * Destroy a guest-backed surface.
2090
 * Destroy a guest-backed surface.
Line 2094... Line 2091...
2094
 */
2091
 */
2095
 
2092
 
2096
typedef
2093
typedef
-
 
2094
struct SVGA3dCmdDestroyGBSurface {
2097
struct SVGA3dCmdDestroyGBSurface {
2095
   uint32 sid;
Line 2098... Line 2096...
2098
   uint32 sid;
2096
} __packed
2099
} SVGA3dCmdDestroyGBSurface;   /* SVGA_3D_CMD_DESTROY_GB_SURFACE */
2097
SVGA3dCmdDestroyGBSurface;   /* SVGA_3D_CMD_DESTROY_GB_SURFACE */
2100
 
2098
 
Line 2101... Line 2099...
2101
/*
2099
/*
2102
 * Bind a guest-backed surface to an object.
2100
 * Bind a guest-backed surface to an object.
2103
 */
2101
 */
2104
 
2102
 
-
 
2103
typedef
2105
typedef
2104
struct SVGA3dCmdBindGBSurface {
Line 2106... Line 2105...
2106
struct SVGA3dCmdBindGBSurface {
2105
   uint32 sid;
2107
   uint32 sid;
2106
   SVGAMobId mobid;
2108
   SVGAMobId mobid;
2107
} __packed
2109
} SVGA3dCmdBindGBSurface;   /* SVGA_3D_CMD_BIND_GB_SURFACE */
2108
SVGA3dCmdBindGBSurface;   /* SVGA_3D_CMD_BIND_GB_SURFACE */
Line 2121... Line 2120...
2121
struct{
2120
struct{
2122
   uint32 sid;
2121
   uint32 sid;
2123
   SVGAMobId testMobid;
2122
   SVGAMobId testMobid;
2124
   SVGAMobId mobid;
2123
   SVGAMobId mobid;
2125
   uint32 flags;
2124
   uint32 flags;
2126
}
2125
} __packed
2127
SVGA3dCmdCondBindGBSurface;          /* SVGA_3D_CMD_COND_BIND_GB_SURFACE */
2126
SVGA3dCmdCondBindGBSurface;          /* SVGA_3D_CMD_COND_BIND_GB_SURFACE */
Line 2128... Line 2127...
2128
 
2127
 
2129
/*
2128
/*
2130
 * Update an image in a guest-backed surface.
2129
 * Update an image in a guest-backed surface.
Line 2133... Line 2132...
2133
 
2132
 
2134
typedef
2133
typedef
2135
struct SVGA3dCmdUpdateGBImage {
2134
struct SVGA3dCmdUpdateGBImage {
2136
   SVGA3dSurfaceImageId image;
2135
   SVGA3dSurfaceImageId image;
-
 
2136
   SVGA3dBox box;
2137
   SVGA3dBox box;
2137
} __packed
Line 2138... Line 2138...
2138
} SVGA3dCmdUpdateGBImage;   /* SVGA_3D_CMD_UPDATE_GB_IMAGE */
2138
SVGA3dCmdUpdateGBImage;   /* SVGA_3D_CMD_UPDATE_GB_IMAGE */
2139
 
2139
 
2140
/*
2140
/*
2141
 * Update an entire guest-backed surface.
2141
 * Update an entire guest-backed surface.
Line 2142... Line 2142...
2142
 * (Inform the device that the guest-contents have been updated.)
2142
 * (Inform the device that the guest-contents have been updated.)
2143
 */
2143
 */
2144
 
2144
 
-
 
2145
typedef
2145
typedef
2146
struct SVGA3dCmdUpdateGBSurface {
Line 2146... Line 2147...
2146
struct SVGA3dCmdUpdateGBSurface {
2147
   uint32 sid;
2147
   uint32 sid;
2148
} __packed
2148
} SVGA3dCmdUpdateGBSurface;   /* SVGA_3D_CMD_UPDATE_GB_SURFACE */
2149
SVGA3dCmdUpdateGBSurface;   /* SVGA_3D_CMD_UPDATE_GB_SURFACE */
2149
 
2150
 
Line 2150... Line 2151...
2150
/*
2151
/*
2151
 * Readback an image in a guest-backed surface.
2152
 * Readback an image in a guest-backed surface.
2152
 * (Request the device to flush the dirty contents into the guest.)
2153
 * (Request the device to flush the dirty contents into the guest.)
-
 
2154
 */
2153
 */
2155
 
Line 2154... Line 2156...
2154
 
2156
typedef
2155
typedef
2157
struct SVGA3dCmdReadbackGBImage {
2156
struct SVGA3dCmdReadbackGBImage {
2158
   SVGA3dSurfaceImageId image;
2157
   SVGA3dSurfaceImageId image;
2159
} __packed
Line 2158... Line 2160...
2158
} SVGA3dCmdReadbackGBImage;   /* SVGA_3D_CMD_READBACK_GB_IMAGE*/
2160
SVGA3dCmdReadbackGBImage;   /* SVGA_3D_CMD_READBACK_GB_IMAGE*/
2159
 
2161
 
2160
/*
2162
/*
-
 
2163
 * Readback an entire guest-backed surface.
2161
 * Readback an entire guest-backed surface.
2164
 * (Request the device to flush the dirty contents into the guest.)
Line 2162... Line 2165...
2162
 * (Request the device to flush the dirty contents into the guest.)
2165
 */
2163
 */
2166
 
2164
 
2167
typedef
2165
typedef
2168
struct SVGA3dCmdReadbackGBSurface {
Line 2177... Line 2180...
2177
typedef
2180
typedef
2178
struct SVGA3dCmdReadbackGBImagePartial {
2181
struct SVGA3dCmdReadbackGBImagePartial {
2179
   SVGA3dSurfaceImageId image;
2182
   SVGA3dSurfaceImageId image;
2180
   SVGA3dBox box;
2183
   SVGA3dBox box;
2181
   uint32 invertBox;
2184
   uint32 invertBox;
2182
}
2185
} __packed
2183
SVGA3dCmdReadbackGBImagePartial; /* SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL */
2186
SVGA3dCmdReadbackGBImagePartial; /* SVGA_3D_CMD_READBACK_GB_IMAGE_PARTIAL */
Line 2184... Line 2187...
2184
 
2187
 
2185
/*
2188
/*
2186
 * Invalidate an image in a guest-backed surface.
2189
 * Invalidate an image in a guest-backed surface.
2187
 * (Notify the device that the contents can be lost.)
2190
 * (Notify the device that the contents can be lost.)
Line 2188... Line 2191...
2188
 */
2191
 */
2189
 
2192
 
2190
typedef
2193
typedef
-
 
2194
struct SVGA3dCmdInvalidateGBImage {
2191
struct SVGA3dCmdInvalidateGBImage {
2195
   SVGA3dSurfaceImageId image;
Line 2192... Line 2196...
2192
   SVGA3dSurfaceImageId image;
2196
} __packed
2193
} SVGA3dCmdInvalidateGBImage;   /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE */
2197
SVGA3dCmdInvalidateGBImage;   /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE */
2194
 
2198
 
2195
/*
2199
/*
Line 2196... Line 2200...
2196
 * Invalidate an entire guest-backed surface.
2200
 * Invalidate an entire guest-backed surface.
2197
 * (Notify the device that the contents if all images can be lost.)
2201
 * (Notify the device that the contents if all images can be lost.)
2198
 */
2202
 */
-
 
2203
 
2199
 
2204
typedef
Line 2200... Line 2205...
2200
typedef
2205
struct SVGA3dCmdInvalidateGBSurface {
2201
struct SVGA3dCmdInvalidateGBSurface {
2206
   uint32 sid;
2202
   uint32 sid;
2207
} __packed
2203
} SVGA3dCmdInvalidateGBSurface; /* SVGA_3D_CMD_INVALIDATE_GB_SURFACE */
2208
SVGA3dCmdInvalidateGBSurface; /* SVGA_3D_CMD_INVALIDATE_GB_SURFACE */
Line 2212... Line 2217...
2212
typedef
2217
typedef
2213
struct SVGA3dCmdInvalidateGBImagePartial {
2218
struct SVGA3dCmdInvalidateGBImagePartial {
2214
   SVGA3dSurfaceImageId image;
2219
   SVGA3dSurfaceImageId image;
2215
   SVGA3dBox box;
2220
   SVGA3dBox box;
2216
   uint32 invertBox;
2221
   uint32 invertBox;
2217
}
2222
} __packed
2218
SVGA3dCmdInvalidateGBImagePartial; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL */
2223
SVGA3dCmdInvalidateGBImagePartial; /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE_PARTIAL */
Line 2219... Line 2224...
2219
 
2224
 
2220
/*
2225
/*
2221
 * Define a guest-backed context.
2226
 * Define a guest-backed context.
Line 2222... Line 2227...
2222
 */
2227
 */
2223
 
2228
 
2224
typedef
2229
typedef
-
 
2230
struct SVGA3dCmdDefineGBContext {
2225
struct SVGA3dCmdDefineGBContext {
2231
   uint32 cid;
Line 2226... Line 2232...
2226
   uint32 cid;
2232
} __packed
2227
} SVGA3dCmdDefineGBContext;   /* SVGA_3D_CMD_DEFINE_GB_CONTEXT */
2233
SVGA3dCmdDefineGBContext;   /* SVGA_3D_CMD_DEFINE_GB_CONTEXT */
2228
 
2234
 
Line 2229... Line 2235...
2229
/*
2235
/*
2230
 * Destroy a guest-backed context.
2236
 * Destroy a guest-backed context.
2231
 */
2237
 */
-
 
2238
 
2232
 
2239
typedef
Line 2233... Line 2240...
2233
typedef
2240
struct SVGA3dCmdDestroyGBContext {
2234
struct SVGA3dCmdDestroyGBContext {
2241
   uint32 cid;
2235
   uint32 cid;
2242
} __packed
2236
} SVGA3dCmdDestroyGBContext;   /* SVGA_3D_CMD_DESTROY_GB_CONTEXT */
2243
SVGA3dCmdDestroyGBContext;   /* SVGA_3D_CMD_DESTROY_GB_CONTEXT */
Line 2250... Line 2257...
2250
typedef
2257
typedef
2251
struct SVGA3dCmdBindGBContext {
2258
struct SVGA3dCmdBindGBContext {
2252
   uint32 cid;
2259
   uint32 cid;
2253
   SVGAMobId mobid;
2260
   SVGAMobId mobid;
2254
   uint32 validContents;
2261
   uint32 validContents;
-
 
2262
} __packed
2255
} SVGA3dCmdBindGBContext;   /* SVGA_3D_CMD_BIND_GB_CONTEXT */
2263
SVGA3dCmdBindGBContext;   /* SVGA_3D_CMD_BIND_GB_CONTEXT */
Line 2256... Line 2264...
2256
 
2264
 
2257
/*
2265
/*
2258
 * Readback a guest-backed context.
2266
 * Readback a guest-backed context.
2259
 * (Request that the device flush the contents back into guest memory.)
2267
 * (Request that the device flush the contents back into guest memory.)
Line 2260... Line 2268...
2260
 */
2268
 */
2261
 
2269
 
2262
typedef
2270
typedef
-
 
2271
struct SVGA3dCmdReadbackGBContext {
2263
struct SVGA3dCmdReadbackGBContext {
2272
   uint32 cid;
Line 2264... Line 2273...
2264
   uint32 cid;
2273
} __packed
2265
} SVGA3dCmdReadbackGBContext;   /* SVGA_3D_CMD_READBACK_GB_CONTEXT */
2274
SVGA3dCmdReadbackGBContext;   /* SVGA_3D_CMD_READBACK_GB_CONTEXT */
2266
 
2275
 
2267
/*
2276
/*
2268
 * Invalidate a guest-backed context.
2277
 * Invalidate a guest-backed context.
2269
 */
2278
 */
-
 
2279
typedef
2270
typedef
2280
struct SVGA3dCmdInvalidateGBContext {
Line 2271... Line 2281...
2271
struct SVGA3dCmdInvalidateGBContext {
2281
   uint32 cid;
2272
   uint32 cid;
2282
} __packed
2273
} SVGA3dCmdInvalidateGBContext;   /* SVGA_3D_CMD_INVALIDATE_GB_CONTEXT */
2283
SVGA3dCmdInvalidateGBContext;   /* SVGA_3D_CMD_INVALIDATE_GB_CONTEXT */
Line 2274... Line 2284...
2274
 
2284
 
2275
/*
2285
/*
2276
 * Define a guest-backed shader.
2286
 * Define a guest-backed shader.
2277
 */
2287
 */
2278
 
2288
 
-
 
2289
typedef
2279
typedef
2290
struct SVGA3dCmdDefineGBShader {
Line 2280... Line 2291...
2280
struct SVGA3dCmdDefineGBShader {
2291
   uint32 shid;
2281
   uint32 shid;
2292
   SVGA3dShaderType type;
2282
   SVGA3dShaderType type;
2293
   uint32 sizeInBytes;
Line 2283... Line 2294...
2283
   uint32 sizeInBytes;
2294
} __packed
2284
} SVGA3dCmdDefineGBShader;   /* SVGA_3D_CMD_DEFINE_GB_SHADER */
2295
SVGA3dCmdDefineGBShader;   /* SVGA_3D_CMD_DEFINE_GB_SHADER */
2285
 
2296
 
2286
/*
2297
/*
-
 
2298
 * Bind a guest-backed shader.
2287
 * Bind a guest-backed shader.
2299
 */
Line 2288... Line 2300...
2288
 */
2300
 
2289
 
2301
typedef struct SVGA3dCmdBindGBShader {
2290
typedef struct SVGA3dCmdBindGBShader {
2302
   uint32 shid;
Line 2291... Line 2303...
2291
   uint32 shid;
2303
   SVGAMobId mobid;
2292
   SVGAMobId mobid;
2304
   uint32 offsetInBytes;
-
 
2305
} __packed
2293
   uint32 offsetInBytes;
2306
SVGA3dCmdBindGBShader;   /* SVGA_3D_CMD_BIND_GB_SHADER */
Line 2294... Line 2307...
2294
} SVGA3dCmdBindGBShader;   /* SVGA_3D_CMD_BIND_GB_SHADER */
2307
 
2295
 
2308
/*
2296
/*
2309
 * Destroy a guest-backed shader.
2297
 * Destroy a guest-backed shader.
2310
 */
Line 2312... Line 2325...
2312
    * Followed by a variable number of shader constants.
2325
    * Followed by a variable number of shader constants.
2313
    *
2326
    *
2314
    * Note that FLOAT and INT constants are 4-dwords in length, while
2327
    * Note that FLOAT and INT constants are 4-dwords in length, while
2315
    * BOOL constants are 1-dword in length.
2328
    * BOOL constants are 1-dword in length.
2316
    */
2329
    */
-
 
2330
} __packed
2317
} SVGA3dCmdSetGBShaderConstInline;
2331
SVGA3dCmdSetGBShaderConstInline;
2318
/* SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE */
2332
/* SVGA_3D_CMD_SET_GB_SHADERCONSTS_INLINE */
Line 2319... Line 2333...
2319
 
2333
 
2320
typedef
2334
typedef
2321
struct {
2335
struct {
2322
   uint32               cid;
2336
   uint32               cid;
-
 
2337
   SVGA3dQueryType      type;
2323
   SVGA3dQueryType      type;
2338
} __packed
Line 2324... Line 2339...
2324
} SVGA3dCmdBeginGBQuery;           /* SVGA_3D_CMD_BEGIN_GB_QUERY */
2339
SVGA3dCmdBeginGBQuery;           /* SVGA_3D_CMD_BEGIN_GB_QUERY */
2325
 
2340
 
2326
typedef
2341
typedef
2327
struct {
2342
struct {
2328
   uint32               cid;
2343
   uint32               cid;
2329
   SVGA3dQueryType      type;
2344
   SVGA3dQueryType      type;
-
 
2345
   SVGAMobId mobid;
2330
   SVGAMobId mobid;
2346
   uint32 offset;
Line 2331... Line 2347...
2331
   uint32 offset;
2347
} __packed
2332
} SVGA3dCmdEndGBQuery;                  /* SVGA_3D_CMD_END_GB_QUERY */
2348
SVGA3dCmdEndGBQuery;                  /* SVGA_3D_CMD_END_GB_QUERY */
2333
 
2349
 
Line 2344... Line 2360...
2344
struct {
2360
struct {
2345
   uint32               cid;
2361
   uint32               cid;
2346
   SVGA3dQueryType      type;
2362
   SVGA3dQueryType      type;
2347
   SVGAMobId mobid;
2363
   SVGAMobId mobid;
2348
   uint32 offset;
2364
   uint32 offset;
-
 
2365
} __packed
2349
} SVGA3dCmdWaitForGBQuery;          /* SVGA_3D_CMD_WAIT_FOR_GB_QUERY */
2366
SVGA3dCmdWaitForGBQuery;          /* SVGA_3D_CMD_WAIT_FOR_GB_QUERY */
Line 2350... Line 2367...
2350
 
2367
 
2351
typedef
2368
typedef
2352
struct {
2369
struct {
2353
   SVGAMobId mobid;
2370
   SVGAMobId mobid;
2354
   uint32 fbOffset;
2371
   uint32 fbOffset;
2355
   uint32 initalized;
2372
   uint32 initalized;
2356
}
2373
} __packed
Line 2357... Line 2374...
2357
SVGA3dCmdEnableGart;              /* SVGA_3D_CMD_ENABLE_GART */
2374
SVGA3dCmdEnableGart;              /* SVGA_3D_CMD_ENABLE_GART */
2358
 
2375
 
2359
typedef
2376
typedef
2360
struct {
2377
struct {
2361
   SVGAMobId mobid;
2378
   SVGAMobId mobid;
2362
   uint32 gartOffset;
2379
   uint32 gartOffset;
Line 2363... Line 2380...
2363
}
2380
} __packed
2364
SVGA3dCmdMapMobIntoGart;          /* SVGA_3D_CMD_MAP_MOB_INTO_GART */
2381
SVGA3dCmdMapMobIntoGart;          /* SVGA_3D_CMD_MAP_MOB_INTO_GART */
2365
 
2382
 
2366
 
2383
 
2367
typedef
2384
typedef
2368
struct {
2385
struct {
Line 2369... Line 2386...
2369
   uint32 gartOffset;
2386
   uint32 gartOffset;
2370
   uint32 numPages;
2387
   uint32 numPages;
Line 2383... Line 2400...
2383
   uint32 width;
2400
   uint32 width;
2384
   uint32 height;
2401
   uint32 height;
2385
   int32 xRoot;
2402
   int32 xRoot;
2386
   int32 yRoot;
2403
   int32 yRoot;
2387
   uint32 flags;
2404
   uint32 flags;
2388
}
2405
} __packed
2389
SVGA3dCmdDefineGBScreenTarget;    /* SVGA_3D_CMD_DEFINE_GB_SCREENTARGET */
2406
SVGA3dCmdDefineGBScreenTarget;    /* SVGA_3D_CMD_DEFINE_GB_SCREENTARGET */
Line 2390... Line 2407...
2390
 
2407
 
2391
typedef
2408
typedef
2392
struct {
2409
struct {
2393
   uint32 stid;
2410
   uint32 stid;
2394
}
2411
} __packed
Line 2395... Line 2412...
2395
SVGA3dCmdDestroyGBScreenTarget;  /* SVGA_3D_CMD_DESTROY_GB_SCREENTARGET */
2412
SVGA3dCmdDestroyGBScreenTarget;  /* SVGA_3D_CMD_DESTROY_GB_SCREENTARGET */
2396
 
2413
 
2397
typedef
2414
typedef
2398
struct {
2415
struct {
2399
   uint32 stid;
2416
   uint32 stid;
2400
   SVGA3dSurfaceImageId image;
2417
   SVGA3dSurfaceImageId image;
Line 2401... Line 2418...
2401
}
2418
} __packed
2402
SVGA3dCmdBindGBScreenTarget;  /* SVGA_3D_CMD_BIND_GB_SCREENTARGET */
2419
SVGA3dCmdBindGBScreenTarget;  /* SVGA_3D_CMD_BIND_GB_SCREENTARGET */
2403
 
2420
 
2404
typedef
2421
typedef
2405
struct {
2422
struct {
2406
   uint32 stid;
2423
   uint32 stid;
Line 2407... Line 2424...
2407
   SVGA3dBox box;
2424
   SVGA3dBox box;
2408
}
2425
} __packed
2409
SVGA3dCmdUpdateGBScreenTarget;  /* SVGA_3D_CMD_UPDATE_GB_SCREENTARGET */
2426
SVGA3dCmdUpdateGBScreenTarget;  /* SVGA_3D_CMD_UPDATE_GB_SCREENTARGET */
Line 2581... Line 2598...
2581
   uint32 u;
2598
   uint32 u;
2582
   int32  i;
2599
   int32  i;
2583
   float  f;
2600
   float  f;
2584
} SVGA3dDevCapResult;
2601
} SVGA3dDevCapResult;
Line -... Line 2602...
-
 
2602
 
-
 
2603
typedef enum {
-
 
2604
   SVGA3DCAPS_RECORD_UNKNOWN        = 0,
-
 
2605
   SVGA3DCAPS_RECORD_DEVCAPS_MIN    = 0x100,
-
 
2606
   SVGA3DCAPS_RECORD_DEVCAPS        = 0x100,
-
 
2607
   SVGA3DCAPS_RECORD_DEVCAPS_MAX    = 0x1ff,
-
 
2608
} SVGA3dCapsRecordType;
-
 
2609
 
-
 
2610
typedef
-
 
2611
struct SVGA3dCapsRecordHeader {
-
 
2612
   uint32 length;
-
 
2613
   SVGA3dCapsRecordType type;
-
 
2614
}
-
 
2615
SVGA3dCapsRecordHeader;
-
 
2616
 
-
 
2617
typedef
-
 
2618
struct SVGA3dCapsRecord {
-
 
2619
   SVGA3dCapsRecordHeader header;
-
 
2620
   uint32 data[1];
-
 
2621
}
-
 
2622
SVGA3dCapsRecord;
-
 
2623
 
-
 
2624
 
-
 
2625
typedef uint32 SVGA3dCapPair[2];
2585
 
2626