Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

318 lines
9.3 KiB

  1. /* Requests */
  2. /*
  3. ** glXVendorPrivate request.
  4. ** Used for glXVendorPrivate and glXVendorPrivateWithReply requests.
  5. ** GLX vendor private request. Commands that go over as vendor private GLX
  6. ** protocol requests use this structure. The glxCode will be one of the
  7. ** X_GLvop opcodes.
  8. */
  9. typedef struct GLXVendorPrivate {
  10. CARD8 reqType;
  11. CARD8 glxCode;
  12. CARD16 length B16;
  13. CARD32 vendorCode B32; /* vendor-specific opcode */
  14. GLXContextTag contextTag B32;
  15. /*
  16. ** More data may follow; this is just the header.
  17. */
  18. } xGLXVendorPrivateReq;
  19. #define sz_xGLXVendorPrivateReq 12
  20. /*
  21. ** glXSwapIntervalSGI (VendorPrivate) request.
  22. */
  23. typedef struct GLXSwapIntervalSGI {
  24. CARD8 reqType;
  25. CARD8 glxCode;
  26. CARD16 length B16;
  27. CARD32 vendorCode B32; /* vendor-specific opcode */
  28. GLXContextTag contextTag B32;
  29. CARD32 interval B32;
  30. } xGLXSwapIntervalSGIReq;
  31. #define sz_xGLXSwapIntervalSGIReq 16
  32. /*
  33. ** glXMakeCurrentRead request
  34. */
  35. typedef struct GLXMakeCurrentRead {
  36. CARD8 reqType;
  37. CARD8 glxCode;
  38. CARD16 length B16;
  39. CARD32 vendorCode B32; /* vendor-specific opcode */
  40. GLXContextTag oldContextTag B32;
  41. GLXDrawable drawable B32;
  42. GLXDrawable readdrawable B32;
  43. GLXContextID context B32;
  44. } xGLXMakeCurrentReadReq;
  45. #define sz_xGLXMakeCurrentReadReq 20
  46. /************************************************************************/
  47. /* Replies */
  48. typedef struct {
  49. BYTE type; /* X_Reply */
  50. CARD8 unused; /* not used */
  51. CARD16 sequenceNumber B16;
  52. CARD32 length B32;
  53. CARD32 pad1 B32;
  54. CARD32 pad2 B32;
  55. CARD32 width B32;
  56. CARD32 height B32;
  57. CARD32 pad5 B32;
  58. CARD32 pad6 B32;
  59. } xGLXGetSeparableFilterEXTReply;
  60. #define sz_xGLXGetSeparableFilterEXT 32
  61. typedef struct {
  62. BYTE type; /* X_Reply */
  63. CARD8 unused; /* not used */
  64. CARD16 sequenceNumber B16;
  65. CARD32 length B32;
  66. CARD32 pad1 B32;
  67. CARD32 pad2 B32;
  68. CARD32 width B32;
  69. CARD32 height B32;
  70. CARD32 pad5 B32;
  71. CARD32 pad6 B32;
  72. } xGLXGetConvolutionFilterEXTReply;
  73. #define sz_xGLXGetConvolutionFilterEXTReply 32
  74. typedef struct {
  75. BYTE type; /* X_Reply */
  76. CARD8 unused; /* not used */
  77. CARD16 sequenceNumber B16;
  78. CARD32 length B32;
  79. CARD32 pad1 B32;
  80. CARD32 pad2 B32;
  81. CARD32 width B32;
  82. CARD32 pad4 B32;
  83. CARD32 pad5 B32;
  84. CARD32 pad6 B32;
  85. } xGLXGetHistogramEXTReply;
  86. #define sz_xGLXGetHistogramEXTReply 32
  87. typedef struct {
  88. BYTE type; /* X_Reply */
  89. CARD8 unused; /* not used */
  90. CARD16 sequenceNumber B16;
  91. CARD32 length B32;
  92. CARD32 pad1 B32;
  93. CARD32 pad2 B32;
  94. CARD32 pad3 B32;
  95. CARD32 pad4 B32;
  96. CARD32 pad5 B32;
  97. CARD32 pad6 B32;
  98. } xGLXGetMinmaxEXTReply;
  99. #define sz_xGLXGetMinmaxEXTReply 32
  100. /*
  101. ** This reply structure is used for all Vendor Private replies. Vendor
  102. ** Private replies can ship up to 24 bytes within the header or can
  103. ** be variable sized, in which case, the reply length field indicates
  104. ** the number of words of data which follow the header.
  105. */
  106. typedef struct {
  107. BYTE type; /* X_Reply */
  108. CARD8 unused; /* not used */
  109. CARD16 sequenceNumber B16;
  110. CARD32 length B32;
  111. CARD32 retval B32;
  112. CARD32 size B32;
  113. CARD32 pad3 B32;
  114. CARD32 pad4 B32;
  115. CARD32 pad5 B32;
  116. CARD32 pad6 B32;
  117. } xGLXVendorPrivReply;
  118. #define sz_xGLXVendorPrivReply 32
  119. typedef struct {
  120. BYTE type; /* X_Reply */
  121. CARD8 unused; /* not used */
  122. CARD16 sequenceNumber B16;
  123. CARD32 length B32;
  124. GLXContextTag contextTag B32;
  125. CARD32 writeVid B32;
  126. CARD32 writeType B32;
  127. CARD32 readVid B32;
  128. CARD32 readType B32;
  129. CARD32 pad6 B32;
  130. } xGLXMakeCurrentReadReply;
  131. #define sz_xGLXMakeCurrentReadReply 32
  132. /************************************************************************/
  133. /*
  134. ** Data that is specific to a glTexSubImage3D and 4D calls. The
  135. ** data is sent in the following order:
  136. ** Render or RenderLarge header
  137. ** Pixel header
  138. ** TexSubImage header
  139. ** When a glTexSubImage3D call is made, the woffset and size4d fields
  140. ** are unexamined by the server and are considered to be padding.
  141. */
  142. #define __GLX_TEXSUBIMAGE_3D4D_HDR \
  143. CARD32 target B32; \
  144. CARD32 level B32; \
  145. CARD32 xoffset B32; \
  146. CARD32 yoffset B32; \
  147. CARD32 zoffset B32; \
  148. CARD32 woffset B32; \
  149. CARD32 width B32; \
  150. CARD32 height B32; \
  151. CARD32 depth B32; \
  152. CARD32 size4d B32; \
  153. CARD32 format B32; \
  154. CARD32 type B32; \
  155. CARD32 nullImage \
  156. #define __GLX_TEXSUBIMAGE_3D4D_HDR_SIZE 52
  157. #define __GLX_TEXSUBIMAGE_3D4D_CMD_HDR_SIZE \
  158. (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D4D_HDR_SIZE + \
  159. __GLX_TEXSUBIMAGE_3D4D_HDR_SIZE)
  160. #define __GLX_TEXSUBIMAGE_3D4D_CMD_DISPATCH_HDR_SIZE \
  161. (__GLX_PIXEL_3D4D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D4D_HDR_SIZE)
  162. typedef struct {
  163. __GLX_RENDER_HDR;
  164. __GLX_PIXEL_3D4D_HDR;
  165. __GLX_TEXSUBIMAGE_3D4D_HDR;
  166. } __GLXtexSubImage3D4DHeader;
  167. typedef struct {
  168. __GLX_RENDER_LARGE_HDR;
  169. __GLX_PIXEL_3D4D_HDR;
  170. __GLX_TEXSUBIMAGE_3D4D_HDR;
  171. } __GLXtexSubImage3D4DLargeHeader;
  172. typedef struct {
  173. __GLX_PIXEL_3D4D_HDR;
  174. __GLX_TEXSUBIMAGE_3D4D_HDR;
  175. } __GLXdispatchTexSubImage3D4DHeader;
  176. /*
  177. ** Data that is specific to a glConvolutionFilter1DEXT or glConvolutionFilter2DEXT
  178. ** call. The data is sent in the following order:
  179. ** Render or RenderLarge header
  180. ** Pixel header
  181. ** TexImage header
  182. ** When a glConvolutionFilter1D call the height field is unexamined by the server.
  183. */
  184. #define __GLX_CONV_FILT_HDR \
  185. CARD32 target B32; \
  186. CARD32 internalformat B32; \
  187. CARD32 width B32; \
  188. CARD32 height B32; \
  189. CARD32 format B32; \
  190. CARD32 type B32
  191. #define __GLX_CONV_FILT_HDR_SIZE 24
  192. #define __GLX_CONV_FILT_CMD_HDR_SIZE \
  193. (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE)
  194. #define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \
  195. (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE)
  196. typedef struct {
  197. __GLX_RENDER_HDR;
  198. __GLX_PIXEL_HDR;
  199. __GLX_CONV_FILT_HDR;
  200. } __GLXConvolutionFilterHeader;
  201. typedef struct {
  202. __GLX_RENDER_LARGE_HDR;
  203. __GLX_PIXEL_HDR;
  204. __GLX_CONV_FILT_HDR;
  205. } __GLXConvolutionFilterLargeHeader;
  206. typedef struct {
  207. __GLX_PIXEL_HDR;
  208. __GLX_CONV_FILT_HDR;
  209. } __GLXdispatchConvolutionFilterHeader;
  210. /*****************************************************************************/
  211. /* Opcodes for GLX commands */
  212. #define X_GLXVendorPrivate 16
  213. #define X_GLXVendorPrivateWithReply 17
  214. #define X_GLXQueryServerString 19
  215. #define X_GLXClientInfo 20
  216. /* Opcodes for single commands (part of GLX command space) */
  217. #define X_GLrop_BlendColorEXT 4096
  218. #define X_GLrop_BlendEquationEXT 4097
  219. #define X_GLrop_PolygonOffsetEXT 4098
  220. #define X_GLrop_TexSubImage1DEXT 4099
  221. #define X_GLrop_TexSubImage2DEXT 4100
  222. #define X_GLrop_SampleMaskSGIS 2048
  223. #define X_GLrop_SamplePatternSGIS 2049
  224. #define X_GLrop_TagSampleBufferSGIX 2050
  225. #define X_GLrop_ConvolutionFilter1DEXT 4101
  226. #define X_GLrop_ConvolutionFilter2DEXT 4102
  227. #define X_GLrop_ConvolutionParameterfEXT 4103
  228. #define X_GLrop_ConvolutionParameterfvEXT 4104
  229. #define X_GLrop_ConvolutionParameteriEXT 4105
  230. #define X_GLrop_ConvolutionParameterivEXT 4106
  231. #define X_GLrop_CopyConvolutionFilter1DEXT 4107
  232. #define X_GLrop_CopyConvolutionFilter2DEXT 4108
  233. #define X_GLrop_SeparableFilter2DEXT 4109
  234. #define X_GLrop_HistogramEXT 4110
  235. #define X_GLrop_MinmaxEXT 4111
  236. #define X_GLrop_ResetHistogramEXT 4112
  237. #define X_GLrop_ResetMinmaxEXT 4113
  238. #define X_GLrop_TexImage3DEXT 4114
  239. #define X_GLrop_TexSubImage3DEXT 4115
  240. #define X_GLrop_DetailTexFuncSGIS 2051
  241. #define X_GLrop_SharpenTexFuncSGIS 2052
  242. #define X_GLrop_BindTextureEXT 4117
  243. #define X_GLrop_PrioritizeTexturesEXT 4118
  244. #define X_GLrop_ColorTableSGI 2053
  245. #define X_GLrop_ColorTableParameterfvSGI 2054
  246. #define X_GLrop_ColorTableParameterivSGI 2055
  247. #define X_GLrop_CopyColorTableSGI 2056
  248. #define X_GLrop_TexColorTableParameterfvSGI 2057
  249. #define X_GLrop_TexColorTableParameterivSGI 2058
  250. /* Opcodes for vendor private commands */
  251. #define X_GLvop_GetConvolutionFilterEXT 1
  252. #define X_GLvop_GetConvolutionParameterfvEXT 2
  253. #define X_GLvop_GetConvolutionParameterivEXT 3
  254. #define X_GLvop_GetSeparableFilterEXT 4
  255. #define X_GLvop_GetHistogramEXT 5
  256. #define X_GLvop_GetHistogramParameterfvEXT 6
  257. #define X_GLvop_GetHistogramParameterivEXT 7
  258. #define X_GLvop_GetMinmaxEXT 8
  259. #define X_GLvop_GetMinmaxParameterfvEXT 9
  260. #define X_GLvop_GetMinmaxParameterivEXT 10
  261. #define X_GLvop_GetDetailTexFuncSGIS 4096
  262. #define X_GLvop_GetSharpenTexFuncSGIS 4097
  263. #define X_GLvop_AreTexturesResidentEXT 11
  264. #define X_GLvop_DeleteTexturesEXT 12
  265. #define X_GLvop_GenTexturesEXT 13
  266. #define X_GLvop_IsTextureEXT 14
  267. #define X_GLvop_GetColorTableSGI 4098
  268. #define X_GLvop_GetColorTableParameterfvSGI 4099
  269. #define X_GLvop_GetColorTableParameterivSGI 4100
  270. #define X_GLvop_GetTexColorTableParameterfvSGI 4101
  271. #define X_GLvop_GetTexColorTableParameterivSGI 4102
  272. /* Opcodes for GLX vendor private commands */
  273. #define X_GLXvop_SwapIntervalSGI 65536
  274. #define X_GLXvop_MakeCurrentReadSGI 65537
  275. #define X_GLXvop_CreateGLXVideoSourceSGIX 65538
  276. #define X_GLXvop_DestroyGLXVideoSourceSGIX 65539