Guest User

Untitled

a guest
Feb 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 8.69 KB | None | 0 0
  1. diff -r -u SDL-1.2.14/configure SDL-1.2.14.id/configure
  2. diff -r -u SDL-1.2.14/configure.in SDL-1.2.14.id/configure.in
  3. --- SDL-1.2.14/configure.in 2006-05-16 22:16:07.000000000 -0500
  4. +++ SDL-1.2.14.id/configure.in  2006-08-07 14:21:39.000000000 -0500
  5. @@ -32,7 +32,7 @@
  6.  AC_SUBST(SDL_VERSION)
  7.  # libtool versioning
  8.  LT_INIT([win32-dll])
  9.  
  10. -LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
  11. +LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.id
  12.  LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
  13.  LT_REVISION=$SDL_INTERFACE_AGE
  14.  LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
  15. diff -r -u SDL-1.2.14/include/SDL_config.h SDL-1.2.14.id/include/SDL_config.h
  16. diff -r -u SDL-1.2.14/include/SDL_video.h SDL-1.2.14.id/include/SDL_video.h
  17. --- SDL-1.2.14/include/SDL_video.h  2006-05-01 03:02:59.000000000 -0500
  18. +++ SDL-1.2.14.id/include/SDL_video.h   2006-08-07 14:21:39.000000000 -0500
  19. @@ -817,6 +817,11 @@
  20.  extern DECLSPEC void SDLCALL SDL_GL_Lock(void);
  21.  extern DECLSPEC void SDLCALL SDL_GL_Unlock(void);
  22.  
  23. +                    
  24. +extern DECLSPEC void SDLCALL SDL_GL_DisableContext(void);  /* DAJ ENABLE_INTEL_SMP */
  25. +extern DECLSPEC void SDLCALL SDL_GL_EnableContext_Thread(void);    /* DAJ ENABLE_INTEL_SMP */
  26. +
  27. +
  28.  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  29.  /* These functions allow interaction with the window manager, if any.        */
  30.  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  31. @@ -879,7 +884,7 @@
  32.  /* Not in public API at the moment - do not use! */
  33.  extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect,
  34.                                      SDL_Surface *dst, SDL_Rect *dstrect);
  35. -                    
  36. +
  37.  /* Ends C function definitions when using C++ */
  38.  #ifdef __cplusplus
  39.  }
  40. diff -r -u SDL-1.2.14/src/SDL.c SDL-1.2.14.id/src/SDL.c
  41. --- SDL-1.2.14/src/SDL.c    2006-05-01 03:02:49.000000000 -0500
  42. +++ SDL-1.2.14.id/src/SDL.c 2006-08-07 14:21:39.000000000 -0500
  43. @@ -246,6 +246,7 @@
  44.  
  45.  }
  46.  
  47. +
  48.  /* Return the library version number */
  49.  const SDL_version * SDL_Linked_Version(void)
  50.  {
  51. diff -r -u SDL-1.2.14/src/video/SDL_sysvideo.h SDL-1.2.14.id/src/video/SDL_sysvideo.h
  52. --- SDL-1.2.14/src/video/SDL_sysvideo.h 2006-05-01 03:02:48.000000000 -0500
  53. +++ SDL-1.2.14.id/src/video/SDL_sysvideo.h  2006-08-07 14:21:39.000000000 -0500
  54. @@ -179,6 +179,12 @@
  55.     /* Make the context associated with this driver current */
  56.     int (*GL_MakeCurrent)(_THIS);
  57.  
  58. +   /* Make the context current to the calling thread */
  59. +   int (*GL_MakeCurrent_Thread)(_THIS);
  60. +
  61. +   /* Swap the current context. */
  62. +   int (*GL_DisableContext)(_THIS);
  63. +
  64.     /* Swap the current buffers in double buffer mode. */
  65.     void (*GL_SwapBuffers)(_THIS);
  66.  
  67. diff -r -u SDL-1.2.14/src/video/SDL_video.c SDL-1.2.14.id/src/video/SDL_video.c
  68. --- SDL-1.2.14/src/video/SDL_video.c    2006-05-01 03:02:48.000000000 -0500
  69. +++ SDL-1.2.14.id/src/video/SDL_video.c 2006-08-07 14:56:36.000000000 -0500
  70. @@ -1668,6 +1668,22 @@
  71.  #endif
  72.  }
  73.  
  74. +void SDL_GL_DisableContext()   /*DAJ ENABLE_INTEL_SMP*/
  75. +{
  76. +   SDL_VideoDevice *this = current_video;
  77. +  
  78. +   this->GL_DisableContext( this );
  79. +}
  80. +
  81. +void SDL_GL_EnableContext_Thread() {
  82. +   SDL_VideoDevice *this = current_video;
  83. +#ifdef MACOSX
  84. +   this->GL_MakeCurrent( this );
  85. +#else
  86. +   this->GL_MakeCurrent_Thread( this );
  87. +#endif
  88. +}
  89. +
  90.  /*
  91.   * Sets/Gets the title and icon text of the display window, if any.
  92.   */
  93. diff -r -u SDL-1.2.14/src/video/maccommon/SDL_macgl.c SDL-1.2.14.id/src/video/maccommon/SDL_macgl.c
  94. --- SDL-1.2.14/src/video/maccommon/SDL_macgl.c  2006-05-11 22:02:31.000000000 -0500
  95. +++ SDL-1.2.14.id/src/video/maccommon/SDL_macgl.c   2006-08-07 14:21:39.000000000 -0500
  96. @@ -101,6 +101,7 @@
  97.     }
  98.  
  99.     attributes[i++] = AGL_ALL_RENDERERS;
  100. +   attributes[i++] = AGL_MP_SAFE; /*DAJ ENABLE_INTEL_SMP*/
  101.     attributes[i]   = AGL_NONE;
  102.  
  103.     format = aglChoosePixelFormat(NULL, 0, attributes);
  104. @@ -114,6 +115,7 @@
  105.         SDL_SetError("Couldn't create OpenGL context");
  106.         return(-1);
  107.     }
  108. +  
  109.     aglDestroyPixelFormat(format);
  110.  
  111.      #if  TARGET_API_MAC_CARBON
  112. diff -r -u SDL-1.2.14/src/video/quartz/SDL_QuartzGL.m SDL-1.2.14.id/src/video/quartz/SDL_QuartzGL.m
  113. --- SDL-1.2.14/src/video/quartz/SDL_QuartzGL.m  2006-05-01 03:02:46.000000000 -0500
  114. +++ SDL-1.2.14.id/src/video/quartz/SDL_QuartzGL.m   2006-08-07 14:21:39.000000000 -0500
  115. @@ -118,6 +118,7 @@
  116.  
  117.      attr[i++] = NSOpenGLPFAScreenMask;
  118.      attr[i++] = CGDisplayIDToOpenGLDisplayMask (display_id);
  119. +    attr[i++] = NSOpenGLPFAMPSafe;     /*DAJ ENABLE_INTEL_SMP*/
  120.      attr[i] = 0;
  121.  
  122.      fmt = [ [ NSOpenGLPixelFormat alloc ] initWithAttributes:attr ];
  123. @@ -168,8 +169,8 @@
  124.          CGLContextObj ctx = [ gl_context cglContext ];
  125.          CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
  126.          CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
  127. -    }
  128. -
  129. +   }
  130. +  
  131.      /* End Wisdom from Apple Engineer section. --ryan. */
  132.  
  133.      return 1;
  134. @@ -276,6 +277,11 @@
  135.      return 0;
  136.  }
  137.  
  138. +int    QZ_GL_DisableContext   (_THIS) {    /*DAJ ENABLE_INTEL_SMP*/
  139. +   [ NULL makeCurrentContext ];
  140. +    return 0;
  141. +}
  142. +
  143.  void   QZ_GL_SwapBuffers    (_THIS) {
  144.      [ gl_context flushBuffer ];
  145.  }
  146. diff -r -u SDL-1.2.14/src/video/quartz/SDL_QuartzVideo.h SDL-1.2.14.id/src/video/quartz/SDL_QuartzVideo.h
  147. --- SDL-1.2.14/src/video/quartz/SDL_QuartzVideo.h   2006-05-01 03:02:46.000000000 -0500
  148. +++ SDL-1.2.14.id/src/video/quartz/SDL_QuartzVideo.h    2006-08-07 14:21:39.000000000 -0500
  149. @@ -187,6 +187,7 @@
  150.  void*  QZ_GL_GetProcAddress (_THIS, const char *proc);
  151.  int    QZ_GL_GetAttribute   (_THIS, SDL_GLattr attrib, int* value);
  152.  int    QZ_GL_MakeCurrent    (_THIS);
  153. +int    QZ_GL_DisableContext (_THIS);   /*DAJ ENABLE_INTEL_SMP*/
  154.  void   QZ_GL_SwapBuffers    (_THIS);
  155.  int    QZ_GL_LoadLibrary    (_THIS, const char *location);
  156.  
  157. diff -r -u SDL-1.2.14/src/video/quartz/SDL_QuartzVideo.m SDL-1.2.14.id/src/video/quartz/SDL_QuartzVideo.m
  158. --- SDL-1.2.14/src/video/quartz/SDL_QuartzVideo.m   2006-05-01 06:06:53.000000000 -0500
  159. +++ SDL-1.2.14.id/src/video/quartz/SDL_QuartzVideo.m    2006-08-07 14:21:39.000000000 -0500
  160. @@ -151,6 +151,7 @@
  161.      device->GL_GetProcAddress = QZ_GL_GetProcAddress;
  162.      device->GL_GetAttribute   = QZ_GL_GetAttribute;
  163.      device->GL_MakeCurrent    = QZ_GL_MakeCurrent;
  164. +   device->GL_DisableContext = QZ_GL_DisableContext;
  165.      device->GL_SwapBuffers    = QZ_GL_SwapBuffers;
  166.      device->GL_LoadLibrary    = QZ_GL_LoadLibrary;
  167.  
  168. diff -r -u SDL-1.2.14/src/video/x11/SDL_x11gl.c SDL-1.2.14.id/src/video/x11/SDL_x11gl.c
  169. --- SDL-1.2.14/src/video/x11/SDL_x11gl.c    2006-05-16 22:16:07.000000000 -0500
  170. +++ SDL-1.2.14.id/src/video/x11/SDL_x11gl.c 2006-08-07 14:21:39.000000000 -0500
  171. @@ -333,6 +333,33 @@
  172.     return(retval);
  173.  }
  174.  
  175. +/* id: Make the current context active to the calling thread. */
  176. +int X11_GL_MakeCurrent_Thread(_THIS)
  177. +{
  178. +   int retval;
  179. +  
  180. +   retval = 0;
  181. +   if ( ! this->gl_data->glXMakeCurrent(GFX_Display,
  182. +                                        SDL_Window, glx_context) ) {
  183. +       SDL_SetError("Unable to make GL context current");
  184. +       retval = -1;
  185. +   }
  186. +   return retval;
  187. +}
  188. +
  189. +/* Disable the context */
  190. +int X11_GL_DisableContext(_THIS)
  191. +{
  192. +   int retval;
  193. +
  194. +   retval = 0;
  195. +   if ( !this->gl_data->glXMakeCurrent( GFX_Display, None, NULL ) ) {
  196. +       SDL_SetError( "Unable to disable GL context" );
  197. +       retval = -1;
  198. +   }
  199. +   return(retval);
  200. +}
  201. +
  202.  /* Get attribute data from glX. */
  203.  int X11_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value)
  204.  {
  205. diff -r -u SDL-1.2.14/src/video/x11/SDL_x11gl_c.h SDL-1.2.14.id/src/video/x11/SDL_x11gl_c.h
  206. --- SDL-1.2.14/src/video/x11/SDL_x11gl_c.h  2006-05-01 03:02:48.000000000 -0500
  207. +++ SDL-1.2.14.id/src/video/x11/SDL_x11gl_c.h   2006-08-07 14:21:39.000000000 -0500
  208. @@ -90,6 +90,8 @@
  209.  extern void X11_GL_Shutdown(_THIS);
  210.  #if SDL_VIDEO_OPENGL_GLX
  211.  extern int X11_GL_MakeCurrent(_THIS);
  212. +extern int X11_GL_MakeCurrent_Thread(_THIS);
  213. +extern int X11_GL_DisableContext(_THIS);
  214.  extern int X11_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value);
  215.  extern void X11_GL_SwapBuffers(_THIS);
  216.  extern int X11_GL_LoadLibrary(_THIS, const char* path);
  217. diff -r -u SDL-1.2.14/src/video/x11/SDL_x11video.c SDL-1.2.14.id/src/video/x11/SDL_x11video.c
  218. --- SDL-1.2.14/src/video/x11/SDL_x11video.c 2006-05-08 01:43:14.000000000 -0500
  219. +++ SDL-1.2.14.id/src/video/x11/SDL_x11video.c  2006-08-07 14:21:39.000000000 -0500
  220. @@ -150,6 +150,8 @@
  221.         device->GL_GetProcAddress = X11_GL_GetProcAddress;
  222.         device->GL_GetAttribute = X11_GL_GetAttribute;
  223.         device->GL_MakeCurrent = X11_GL_MakeCurrent;
  224. +       device->GL_DisableContext = X11_GL_DisableContext;
  225. +       device->GL_MakeCurrent_Thread = X11_GL_MakeCurrent_Thread;
  226.         device->GL_SwapBuffers = X11_GL_SwapBuffers;
  227.  #endif
  228.         device->SetCaption = X11_SetCaption;
  229. diff -r -u SDL-1.2.14/test/configure SDL-1.2.14.id/test/configure
Add Comment
Please, Sign In to add comment