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.

424 lines
17 KiB

  1. /**
  2. *** Copyright (C) 1996-97 Intel Corporation. All rights reserved.
  3. ***
  4. *** The information and source code contained herein is the exclusive
  5. *** property of Intel Corporation and may not be disclosed, examined
  6. *** or reproduced in whole or in part without explicit written authorization
  7. *** from the company.
  8. **/
  9. //++
  10. //
  11. // Module Name:
  12. //
  13. // glpapi.s
  14. //
  15. // Abstract:
  16. //
  17. // OpenGL API function entries for IA64
  18. //
  19. // Author:
  20. //
  21. //
  22. // Environment:
  23. //
  24. // User mode only.
  25. //
  26. // Revision History:
  27. //
  28. //
  29. //--
  30. #include "ksia64.h"
  31. #include "dispindx.h"
  32. .global dwTlsOffset
  33. // Macro for creating aligned public OpenGL API function
  34. // Do an indirect jump through the OpenGL function dispatch table.
  35. // This macro must leave the TEB in v0.
  36. #define MAKEOPENGLAPI(Func) \
  37. LEAF_ENTRY( Func ); \
  38. add t3 = @gprel(dwTlsOffset), gp; \
  39. ;; \
  40. ld4 t2 = [t3]; \
  41. mov v0 = teb; \
  42. ;; \
  43. add t0 = t2, v0; \
  44. ;; \
  45. ld8 t6 = [t0]; \
  46. ;; \
  47. add t1 = INDEX_##Func*SizeofPointer, t6; \
  48. ;; \
  49. ld8 t4 = [t1]; \
  50. ;; \
  51. ld8 t5 = [t4], 8; \
  52. ;; \
  53. ld8 gp = [t4]; \
  54. mov b6 = t5; \
  55. br##.##sptk b6; \
  56. LEAF_EXIT( Func)
  57. // Macro for creating aligned public OpenGL API function
  58. // Do an indirect jump through the OpenGL function dispatch table in the TEB.
  59. #define FASTOPENGLAPI(Func) \
  60. LEAF_ENTRY( Func ); \
  61. add t0 = TeglDispatchTable+(FASTINDEX_##Func*SizeofPointer), teb; \
  62. ;; \
  63. ld8 t1 = [t0]; \
  64. ;; \
  65. ld8 t2 = [t1], 8; \
  66. ;; \
  67. ld8 gp = [t1]; \
  68. mov b6 = t2; \
  69. br##.##sptk b6; \
  70. LEAF_EXIT( Func)
  71. FASTOPENGLAPI( glCallList )
  72. FASTOPENGLAPI( glCallLists )
  73. FASTOPENGLAPI( glBegin )
  74. FASTOPENGLAPI( glColor3b )
  75. FASTOPENGLAPI( glColor3bv )
  76. FASTOPENGLAPI( glColor3d )
  77. FASTOPENGLAPI( glColor3dv )
  78. FASTOPENGLAPI( glColor3f )
  79. FASTOPENGLAPI( glColor3fv )
  80. FASTOPENGLAPI( glColor3i )
  81. FASTOPENGLAPI( glColor3iv )
  82. FASTOPENGLAPI( glColor3s )
  83. FASTOPENGLAPI( glColor3sv )
  84. FASTOPENGLAPI( glColor3ub )
  85. FASTOPENGLAPI( glColor3ubv )
  86. FASTOPENGLAPI( glColor3ui )
  87. FASTOPENGLAPI( glColor3uiv )
  88. FASTOPENGLAPI( glColor3us )
  89. FASTOPENGLAPI( glColor3usv )
  90. FASTOPENGLAPI( glColor4b )
  91. FASTOPENGLAPI( glColor4bv )
  92. FASTOPENGLAPI( glColor4d )
  93. FASTOPENGLAPI( glColor4dv )
  94. FASTOPENGLAPI( glColor4f )
  95. FASTOPENGLAPI( glColor4fv )
  96. FASTOPENGLAPI( glColor4i )
  97. FASTOPENGLAPI( glColor4iv )
  98. FASTOPENGLAPI( glColor4s )
  99. FASTOPENGLAPI( glColor4sv )
  100. FASTOPENGLAPI( glColor4ub )
  101. FASTOPENGLAPI( glColor4ubv )
  102. FASTOPENGLAPI( glColor4ui )
  103. FASTOPENGLAPI( glColor4uiv )
  104. FASTOPENGLAPI( glColor4us )
  105. FASTOPENGLAPI( glColor4usv )
  106. FASTOPENGLAPI( glEdgeFlag )
  107. FASTOPENGLAPI( glEdgeFlagv )
  108. FASTOPENGLAPI( glEnd )
  109. FASTOPENGLAPI( glIndexd )
  110. FASTOPENGLAPI( glIndexdv )
  111. FASTOPENGLAPI( glIndexf )
  112. FASTOPENGLAPI( glIndexfv )
  113. FASTOPENGLAPI( glIndexi )
  114. FASTOPENGLAPI( glIndexiv )
  115. FASTOPENGLAPI( glIndexs )
  116. FASTOPENGLAPI( glIndexsv )
  117. FASTOPENGLAPI( glNormal3b )
  118. FASTOPENGLAPI( glNormal3bv )
  119. FASTOPENGLAPI( glNormal3d )
  120. FASTOPENGLAPI( glNormal3dv )
  121. FASTOPENGLAPI( glNormal3f )
  122. FASTOPENGLAPI( glNormal3fv )
  123. FASTOPENGLAPI( glNormal3i )
  124. FASTOPENGLAPI( glNormal3iv )
  125. FASTOPENGLAPI( glNormal3s )
  126. FASTOPENGLAPI( glNormal3sv )
  127. FASTOPENGLAPI( glTexCoord1d )
  128. FASTOPENGLAPI( glTexCoord1dv )
  129. FASTOPENGLAPI( glTexCoord1f )
  130. FASTOPENGLAPI( glTexCoord1fv )
  131. FASTOPENGLAPI( glTexCoord1i )
  132. FASTOPENGLAPI( glTexCoord1iv )
  133. FASTOPENGLAPI( glTexCoord1s )
  134. FASTOPENGLAPI( glTexCoord1sv )
  135. FASTOPENGLAPI( glTexCoord2d )
  136. FASTOPENGLAPI( glTexCoord2dv )
  137. FASTOPENGLAPI( glTexCoord2f )
  138. FASTOPENGLAPI( glTexCoord2fv )
  139. FASTOPENGLAPI( glTexCoord2i )
  140. FASTOPENGLAPI( glTexCoord2iv )
  141. FASTOPENGLAPI( glTexCoord2s )
  142. FASTOPENGLAPI( glTexCoord2sv )
  143. FASTOPENGLAPI( glTexCoord3d )
  144. FASTOPENGLAPI( glTexCoord3dv )
  145. FASTOPENGLAPI( glTexCoord3f )
  146. FASTOPENGLAPI( glTexCoord3fv )
  147. FASTOPENGLAPI( glTexCoord3i )
  148. FASTOPENGLAPI( glTexCoord3iv )
  149. FASTOPENGLAPI( glTexCoord3s )
  150. FASTOPENGLAPI( glTexCoord3sv )
  151. FASTOPENGLAPI( glTexCoord4d )
  152. FASTOPENGLAPI( glTexCoord4dv )
  153. FASTOPENGLAPI( glTexCoord4f )
  154. FASTOPENGLAPI( glTexCoord4fv )
  155. FASTOPENGLAPI( glTexCoord4i )
  156. FASTOPENGLAPI( glTexCoord4iv )
  157. FASTOPENGLAPI( glTexCoord4s )
  158. FASTOPENGLAPI( glTexCoord4sv )
  159. FASTOPENGLAPI( glVertex2d )
  160. FASTOPENGLAPI( glVertex2dv )
  161. FASTOPENGLAPI( glVertex2f )
  162. FASTOPENGLAPI( glVertex2fv )
  163. FASTOPENGLAPI( glVertex2i )
  164. FASTOPENGLAPI( glVertex2iv )
  165. FASTOPENGLAPI( glVertex2s )
  166. FASTOPENGLAPI( glVertex2sv )
  167. FASTOPENGLAPI( glVertex3d )
  168. FASTOPENGLAPI( glVertex3dv )
  169. FASTOPENGLAPI( glVertex3f )
  170. FASTOPENGLAPI( glVertex3fv )
  171. FASTOPENGLAPI( glVertex3i )
  172. FASTOPENGLAPI( glVertex3iv )
  173. FASTOPENGLAPI( glVertex3s )
  174. FASTOPENGLAPI( glVertex3sv )
  175. FASTOPENGLAPI( glVertex4d )
  176. FASTOPENGLAPI( glVertex4dv )
  177. FASTOPENGLAPI( glVertex4f )
  178. FASTOPENGLAPI( glVertex4fv )
  179. FASTOPENGLAPI( glVertex4i )
  180. FASTOPENGLAPI( glVertex4iv )
  181. FASTOPENGLAPI( glVertex4s )
  182. FASTOPENGLAPI( glVertex4sv )
  183. FASTOPENGLAPI( glMaterialf )
  184. FASTOPENGLAPI( glMaterialfv )
  185. FASTOPENGLAPI( glMateriali )
  186. FASTOPENGLAPI( glMaterialiv )
  187. FASTOPENGLAPI( glDisable )
  188. FASTOPENGLAPI( glEnable )
  189. FASTOPENGLAPI( glPopAttrib )
  190. FASTOPENGLAPI( glPushAttrib )
  191. FASTOPENGLAPI( glEvalCoord1d )
  192. FASTOPENGLAPI( glEvalCoord1dv )
  193. FASTOPENGLAPI( glEvalCoord1f )
  194. FASTOPENGLAPI( glEvalCoord1fv )
  195. FASTOPENGLAPI( glEvalCoord2d )
  196. FASTOPENGLAPI( glEvalCoord2dv )
  197. FASTOPENGLAPI( glEvalCoord2f )
  198. FASTOPENGLAPI( glEvalCoord2fv )
  199. FASTOPENGLAPI( glEvalPoint1 )
  200. FASTOPENGLAPI( glEvalPoint2 )
  201. FASTOPENGLAPI( glLoadIdentity )
  202. FASTOPENGLAPI( glLoadMatrixf )
  203. FASTOPENGLAPI( glLoadMatrixd )
  204. FASTOPENGLAPI( glMatrixMode )
  205. FASTOPENGLAPI( glMultMatrixf )
  206. FASTOPENGLAPI( glMultMatrixd )
  207. FASTOPENGLAPI( glPopMatrix )
  208. FASTOPENGLAPI( glPushMatrix )
  209. FASTOPENGLAPI( glRotated )
  210. FASTOPENGLAPI( glRotatef )
  211. FASTOPENGLAPI( glScaled )
  212. FASTOPENGLAPI( glScalef )
  213. FASTOPENGLAPI( glTranslated )
  214. FASTOPENGLAPI( glTranslatef )
  215. FASTOPENGLAPI( glArrayElement )
  216. FASTOPENGLAPI( glBindTexture )
  217. FASTOPENGLAPI( glColorPointer )
  218. FASTOPENGLAPI( glDisableClientState )
  219. FASTOPENGLAPI( glDrawArrays )
  220. FASTOPENGLAPI( glDrawElements )
  221. FASTOPENGLAPI( glEdgeFlagPointer )
  222. FASTOPENGLAPI( glEnableClientState )
  223. FASTOPENGLAPI( glIndexPointer )
  224. FASTOPENGLAPI( glIndexub )
  225. FASTOPENGLAPI( glIndexubv )
  226. FASTOPENGLAPI( glInterleavedArrays )
  227. FASTOPENGLAPI( glNormalPointer )
  228. FASTOPENGLAPI( glPolygonOffset )
  229. FASTOPENGLAPI( glTexCoordPointer )
  230. FASTOPENGLAPI( glVertexPointer )
  231. FASTOPENGLAPI( glGetPointerv )
  232. FASTOPENGLAPI( glPopClientAttrib )
  233. FASTOPENGLAPI( glPushClientAttrib )
  234. FASTOPENGLAPI( glDrawRangeElementsWIN )
  235. FASTOPENGLAPI( glColorTableEXT )
  236. FASTOPENGLAPI( glColorSubTableEXT )
  237. MAKEOPENGLAPI( glClear )
  238. MAKEOPENGLAPI( glClearAccum )
  239. MAKEOPENGLAPI( glClearIndex )
  240. MAKEOPENGLAPI( glClearColor )
  241. MAKEOPENGLAPI( glClearStencil )
  242. MAKEOPENGLAPI( glClearDepth )
  243. MAKEOPENGLAPI( glBitmap )
  244. MAKEOPENGLAPI( glTexImage1D )
  245. MAKEOPENGLAPI( glTexImage2D )
  246. MAKEOPENGLAPI( glCopyPixels )
  247. MAKEOPENGLAPI( glReadPixels )
  248. MAKEOPENGLAPI( glDrawPixels )
  249. MAKEOPENGLAPI( glRectd )
  250. MAKEOPENGLAPI( glRectdv )
  251. MAKEOPENGLAPI( glRectf )
  252. MAKEOPENGLAPI( glRectfv )
  253. MAKEOPENGLAPI( glRecti )
  254. MAKEOPENGLAPI( glRectiv )
  255. MAKEOPENGLAPI( glRects )
  256. MAKEOPENGLAPI( glRectsv )
  257. MAKEOPENGLAPI( glNewList )
  258. MAKEOPENGLAPI( glEndList )
  259. MAKEOPENGLAPI( glDeleteLists )
  260. MAKEOPENGLAPI( glGenLists )
  261. MAKEOPENGLAPI( glListBase )
  262. MAKEOPENGLAPI( glRasterPos2d )
  263. MAKEOPENGLAPI( glRasterPos2dv )
  264. MAKEOPENGLAPI( glRasterPos2f )
  265. MAKEOPENGLAPI( glRasterPos2fv )
  266. MAKEOPENGLAPI( glRasterPos2i )
  267. MAKEOPENGLAPI( glRasterPos2iv )
  268. MAKEOPENGLAPI( glRasterPos2s )
  269. MAKEOPENGLAPI( glRasterPos2sv )
  270. MAKEOPENGLAPI( glRasterPos3d )
  271. MAKEOPENGLAPI( glRasterPos3dv )
  272. MAKEOPENGLAPI( glRasterPos3f )
  273. MAKEOPENGLAPI( glRasterPos3fv )
  274. MAKEOPENGLAPI( glRasterPos3i )
  275. MAKEOPENGLAPI( glRasterPos3iv )
  276. MAKEOPENGLAPI( glRasterPos3s )
  277. MAKEOPENGLAPI( glRasterPos3sv )
  278. MAKEOPENGLAPI( glRasterPos4d )
  279. MAKEOPENGLAPI( glRasterPos4dv )
  280. MAKEOPENGLAPI( glRasterPos4f )
  281. MAKEOPENGLAPI( glRasterPos4fv )
  282. MAKEOPENGLAPI( glRasterPos4i )
  283. MAKEOPENGLAPI( glRasterPos4iv )
  284. MAKEOPENGLAPI( glRasterPos4s )
  285. MAKEOPENGLAPI( glRasterPos4sv )
  286. MAKEOPENGLAPI( glClipPlane )
  287. MAKEOPENGLAPI( glColorMaterial )
  288. MAKEOPENGLAPI( glCullFace )
  289. MAKEOPENGLAPI( glFogf )
  290. MAKEOPENGLAPI( glFogfv )
  291. MAKEOPENGLAPI( glFogi )
  292. MAKEOPENGLAPI( glFogiv )
  293. MAKEOPENGLAPI( glFrontFace )
  294. MAKEOPENGLAPI( glHint )
  295. MAKEOPENGLAPI( glLightf )
  296. MAKEOPENGLAPI( glLightfv )
  297. MAKEOPENGLAPI( glLighti )
  298. MAKEOPENGLAPI( glLightiv )
  299. MAKEOPENGLAPI( glLightModelf )
  300. MAKEOPENGLAPI( glLightModelfv )
  301. MAKEOPENGLAPI( glLightModeli )
  302. MAKEOPENGLAPI( glLightModeliv )
  303. MAKEOPENGLAPI( glLineStipple )
  304. MAKEOPENGLAPI( glLineWidth )
  305. MAKEOPENGLAPI( glPointSize )
  306. MAKEOPENGLAPI( glPolygonMode )
  307. MAKEOPENGLAPI( glPolygonStipple )
  308. MAKEOPENGLAPI( glScissor )
  309. MAKEOPENGLAPI( glFinish )
  310. MAKEOPENGLAPI( glShadeModel )
  311. MAKEOPENGLAPI( glTexParameterf )
  312. MAKEOPENGLAPI( glTexParameterfv )
  313. MAKEOPENGLAPI( glTexParameteri )
  314. MAKEOPENGLAPI( glTexParameteriv )
  315. MAKEOPENGLAPI( glTexEnvf )
  316. MAKEOPENGLAPI( glTexEnvfv )
  317. MAKEOPENGLAPI( glTexEnvi )
  318. MAKEOPENGLAPI( glTexEnviv )
  319. MAKEOPENGLAPI( glTexGend )
  320. MAKEOPENGLAPI( glTexGendv )
  321. MAKEOPENGLAPI( glTexGenf )
  322. MAKEOPENGLAPI( glTexGenfv )
  323. MAKEOPENGLAPI( glTexGeni )
  324. MAKEOPENGLAPI( glTexGeniv )
  325. MAKEOPENGLAPI( glFeedbackBuffer )
  326. MAKEOPENGLAPI( glSelectBuffer )
  327. MAKEOPENGLAPI( glRenderMode )
  328. MAKEOPENGLAPI( glInitNames )
  329. MAKEOPENGLAPI( glLoadName )
  330. MAKEOPENGLAPI( glPassThrough )
  331. MAKEOPENGLAPI( glPopName )
  332. MAKEOPENGLAPI( glPushName )
  333. MAKEOPENGLAPI( glDrawBuffer )
  334. MAKEOPENGLAPI( glStencilMask )
  335. MAKEOPENGLAPI( glColorMask )
  336. MAKEOPENGLAPI( glDepthMask )
  337. MAKEOPENGLAPI( glIndexMask )
  338. MAKEOPENGLAPI( glAccum )
  339. MAKEOPENGLAPI( glFlush )
  340. MAKEOPENGLAPI( glMap1d )
  341. MAKEOPENGLAPI( glMap1f )
  342. MAKEOPENGLAPI( glMap2d )
  343. MAKEOPENGLAPI( glMap2f )
  344. MAKEOPENGLAPI( glMapGrid1d )
  345. MAKEOPENGLAPI( glMapGrid1f )
  346. MAKEOPENGLAPI( glMapGrid2d )
  347. MAKEOPENGLAPI( glMapGrid2f )
  348. MAKEOPENGLAPI( glEvalMesh1 )
  349. MAKEOPENGLAPI( glEvalMesh2 )
  350. MAKEOPENGLAPI( glAlphaFunc )
  351. MAKEOPENGLAPI( glBlendFunc )
  352. MAKEOPENGLAPI( glLogicOp )
  353. MAKEOPENGLAPI( glStencilFunc )
  354. MAKEOPENGLAPI( glStencilOp )
  355. MAKEOPENGLAPI( glDepthFunc )
  356. MAKEOPENGLAPI( glPixelZoom )
  357. MAKEOPENGLAPI( glPixelTransferf )
  358. MAKEOPENGLAPI( glPixelTransferi )
  359. MAKEOPENGLAPI( glPixelStoref )
  360. MAKEOPENGLAPI( glPixelStorei )
  361. MAKEOPENGLAPI( glPixelMapfv )
  362. MAKEOPENGLAPI( glPixelMapuiv )
  363. MAKEOPENGLAPI( glPixelMapusv )
  364. MAKEOPENGLAPI( glReadBuffer )
  365. MAKEOPENGLAPI( glGetBooleanv )
  366. MAKEOPENGLAPI( glGetClipPlane )
  367. MAKEOPENGLAPI( glGetDoublev )
  368. MAKEOPENGLAPI( glGetError )
  369. MAKEOPENGLAPI( glGetFloatv )
  370. MAKEOPENGLAPI( glGetIntegerv )
  371. MAKEOPENGLAPI( glGetLightfv )
  372. MAKEOPENGLAPI( glGetLightiv )
  373. MAKEOPENGLAPI( glGetMapdv )
  374. MAKEOPENGLAPI( glGetMapfv )
  375. MAKEOPENGLAPI( glGetMapiv )
  376. MAKEOPENGLAPI( glGetMaterialfv )
  377. MAKEOPENGLAPI( glGetMaterialiv )
  378. MAKEOPENGLAPI( glGetPixelMapfv )
  379. MAKEOPENGLAPI( glGetPixelMapuiv )
  380. MAKEOPENGLAPI( glGetPixelMapusv )
  381. MAKEOPENGLAPI( glGetPolygonStipple )
  382. MAKEOPENGLAPI( glGetString )
  383. MAKEOPENGLAPI( glGetTexEnvfv )
  384. MAKEOPENGLAPI( glGetTexEnviv )
  385. MAKEOPENGLAPI( glGetTexGendv )
  386. MAKEOPENGLAPI( glGetTexGenfv )
  387. MAKEOPENGLAPI( glGetTexGeniv )
  388. MAKEOPENGLAPI( glGetTexImage )
  389. MAKEOPENGLAPI( glGetTexParameterfv )
  390. MAKEOPENGLAPI( glGetTexParameteriv )
  391. MAKEOPENGLAPI( glGetTexLevelParameterfv )
  392. MAKEOPENGLAPI( glGetTexLevelParameteriv )
  393. MAKEOPENGLAPI( glIsEnabled )
  394. MAKEOPENGLAPI( glIsList )
  395. MAKEOPENGLAPI( glDepthRange )
  396. MAKEOPENGLAPI( glFrustum )
  397. MAKEOPENGLAPI( glOrtho )
  398. MAKEOPENGLAPI( glViewport )
  399. MAKEOPENGLAPI( glAreTexturesResident )
  400. MAKEOPENGLAPI( glCopyTexImage1D )
  401. MAKEOPENGLAPI( glCopyTexImage2D )
  402. MAKEOPENGLAPI( glCopyTexSubImage1D )
  403. MAKEOPENGLAPI( glCopyTexSubImage2D )
  404. MAKEOPENGLAPI( glDeleteTextures )
  405. MAKEOPENGLAPI( glGenTextures )
  406. MAKEOPENGLAPI( glIsTexture )
  407. MAKEOPENGLAPI( glPrioritizeTextures )
  408. MAKEOPENGLAPI( glTexSubImage1D )
  409. MAKEOPENGLAPI( glTexSubImage2D )
  410. MAKEOPENGLAPI( glGetColorTableEXT )
  411. MAKEOPENGLAPI( glGetColorTableParameterivEXT )
  412. MAKEOPENGLAPI( glGetColorTableParameterfvEXT )