Open/Close FullScreen die. unichrome and savage implemented, code is ifdef'd out
authorJon Smirl <jonsmirl@gmail.com>
Thu, 3 Jun 2004 02:34:31 +0000 (02:34 +0000)
committerJon Smirl <jonsmirl@gmail.com>
Thu, 3 Jun 2004 02:34:31 +0000 (02:34 +0000)
18 files changed:
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/fb/fb_dri.c
src/mesa/drivers/dri/ffb/ffb_xmesa.c
src/mesa/drivers/dri/gamma/gamma_xmesa.c
src/mesa/drivers/dri/i810/i810screen.c
src/mesa/drivers/dri/i830/i830_screen.c
src/mesa/drivers/dri/mach64/mach64_screen.c
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/r128/r128_screen.c
src/mesa/drivers/dri/r200/r200_screen.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/savage/savage_xmesa.c
src/mesa/drivers/dri/savage/savagecontext.h
src/mesa/drivers/dri/sis/sis_context.h
src/mesa/drivers/dri/sis/sis_screen.c
src/mesa/drivers/dri/tdfx/tdfx_screen.c
src/mesa/drivers/dri/unichrome/via_screen.c
src/mesa/drivers/dri/x11/x11_dri.c

index cd338efd791efc6dda2835f82a098a71b2b63a8a..5ecc39a69b0b82a861d2b3e7501fd475f31506f5 100644 (file)
@@ -168,36 +168,6 @@ struct __DriverAPIRec {
      */
     GLboolean (*UnbindContext)(__DRIcontextPrivate *driContextPriv);
   
-    /**
-     * Full screen mode opening callback.
-     * 
-     * \deprecated
-     * Full screen functionality is no longer used by DRI.  Drivers should
-     * simply install a function returning \c GL_TRUE for backwards
-     * compatability.
-     *
-     * \todo
-     * Nothing calls this function anymore.  Since this data structure is only
-     * accessed with in the driver (i.e., libGL never sees it), we need to
-     * remove the other cases that set this field and remove the field.
-     */
-    GLboolean (*OpenFullScreen)(__DRIcontextPrivate *driContextPriv);
-
-    /**
-     * Full screen mode closing callback.
-     *
-     * \deprecated
-     * Full screen functionality is no longer used by DRI.  Drivers should
-     * simply install a function returning \c GL_TRUE for backwards
-     * compatability.
-     *
-     * \todo
-     * Nothing calls this function anymore.  Since this data structure is only
-     * accessed with in the driver (i.e., libGL never sees it), we need to
-     * remove the other cases that set this field and remove the field.
-     */
-    GLboolean (*CloseFullScreen)(__DRIcontextPrivate *driContextPriv);
-
     /**
      * Retrieves statistics about buffer swap operations.  Required if
      * GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported.
index 5b3fbd33d4d8f3669193d7e559c255740102932b..3a388cebc1b212b03f3d6eafda192425705406a1 100644 (file)
@@ -557,12 +557,6 @@ fbUnbindContext( __DRIcontextPrivate *driContextPriv )
    return GL_TRUE;
 }
 
-static GLboolean
-fbOpenCloseFullScreen( __DRIcontextPrivate *driContextPriv )
-{
-   return GL_TRUE;
-}
-
 static struct __DriverAPIRec fbAPI = {
    fbInitDriver,
    fbDestroyScreen,
@@ -572,12 +566,16 @@ static struct __DriverAPIRec fbAPI = {
    fbDestroyBuffer,
    fbSwapBuffers,
    fbMakeCurrent,
-   fbUnbindContext,
-   fbOpenCloseFullScreen,
-   fbOpenCloseFullScreen
+   fbUnbindContext
 };
 
 
+void
+__driRegisterExtensions( void )
+{
+}
+
+
 /*
  * This is the bootstrap function for the driver.
  * The __driCreateScreen name is the symbol that libGL.so fetches.
index 0fa8675e023c750751094455ecf68afe4a24ece4..43c1f3466106d0d158fa21ca40980251c824e373 100644 (file)
@@ -541,18 +541,6 @@ ffbUnbindContext(__DRIcontextPrivate *driContextPriv)
        return GL_TRUE;
 }
 
-static GLboolean
-ffbOpenFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
-static GLboolean
-ffbCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
 void ffbXMesaUpdateState(ffbContextPtr fmesa)
 {
        __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
@@ -581,9 +569,7 @@ static struct __DriverAPIRec ffbAPI = {
    ffbDestroyBuffer,
    ffbSwapBuffers,
    ffbMakeCurrent,
-   ffbUnbindContext,
-   ffbOpenFullScreen,
-   ffbCloseFullScreen
+   ffbUnbindContext
 };
 
 
index dfe8d41cc415b6349aa5c8c66a48e37abfec0e85..30c2ba023afeb0ea26aed1f90c17c7d732f33cbd 100644 (file)
@@ -243,19 +243,6 @@ gammaUnbindContext( __DRIcontextPrivate *driContextPriv )
    return GL_TRUE;
 }
 
-static GLboolean
-gammaOpenFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
-static GLboolean
-gammaCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
-
 static struct __DriverAPIRec gammaAPI = {
    gammaInitDriver,
    gammaDestroyScreen,
@@ -265,9 +252,7 @@ static struct __DriverAPIRec gammaAPI = {
    gammaDestroyBuffer,
    gammaSwapBuffers,
    gammaMakeCurrent,
-   gammaUnbindContext,
-   gammaOpenFullScreen,
-   gammaCloseFullScreen
+   gammaUnbindContext
 };
 
 
index 8f78a686153fded316101aa412fcd61f5d221c09..39acf630e2bce7f885fc79a796ec0a937a84d847 100644 (file)
@@ -360,12 +360,6 @@ i810DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
 }
 
 
-static GLboolean
-i810OpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
 static const struct __DriverAPIRec i810API = {
    .InitDriver      = i810InitDriver,
    .DestroyScreen   = i810DestroyScreen,
@@ -376,8 +370,6 @@ static const struct __DriverAPIRec i810API = {
    .SwapBuffers     = i810SwapBuffers,
    .MakeCurrent     = i810MakeCurrent,
    .UnbindContext   = i810UnbindContext,
-   .OpenFullScreen  = i810OpenCloseFullScreen,
-   .CloseFullScreen = i810OpenCloseFullScreen,
    .GetSwapInfo     = NULL,
    .GetMSC          = NULL,
    .WaitForMSC      = NULL,
index 9d580c78ad15aaa4e98910f56f8fa8c0683bbaf1..da4c94d1c32546341471d3334a92c0909699a6af 100644 (file)
@@ -350,8 +350,6 @@ static const struct __DriverAPIRec i830API = {
    .SwapBuffers     = i830SwapBuffers,
    .MakeCurrent     = i830MakeCurrent,
    .UnbindContext   = i830UnbindContext,
-   .OpenFullScreen  = NULL,
-   .CloseFullScreen = NULL,
    .GetSwapInfo     = NULL,
    .GetMSC          = NULL,
    .WaitForMSC      = NULL,
index b11a1623dad90faba29d01a848fddc557c256bbf..b8115de81142452a5ef323c2b225795bc0a9ee28 100644 (file)
@@ -26,7 +26,7 @@
  * Authors:
  *     Gareth Hughes <gareth@valinux.com>
  *     Leif Delgass <ldelgass@retinalburn.net>
- *     José Fonseca <j_r_fonseca@yahoo.co.uk>
+ *     JosFonseca <j_r_fonseca@yahoo.co.uk>
  */
 
 #include "mach64_context.h"
@@ -359,23 +359,6 @@ mach64DestroyScreen( __DRIscreenPrivate *driScreen )
    driScreen->private = NULL;
 }
 
-/* Initialize the fullscreen mode.
- */
-static GLboolean
-mach64OpenFullScreen( __DRIcontextPrivate *driContextPriv )
-{
-   return GL_TRUE;
-}
-
-/* Shut down the fullscreen mode.
- */
-static GLboolean
-mach64CloseFullScreen( __DRIcontextPrivate *driContextPriv )
-{
-   return GL_TRUE;
-}
-
-
 /* Create and initialize the Mesa and driver specific pixmap buffer
  * data.
  */
@@ -443,6 +426,32 @@ mach64InitDriver( __DRIscreenPrivate *driScreen )
    return GL_TRUE;
 }
 
+#ifndef _SOLO
+/* This function is called by libGL.so as soon as libGL.so is loaded.
+ * This is where we register new extension functions with the dispatcher.
+ */
+void __driRegisterExtensions( void )
+{
+#if 0
+   /* KW: This is handled differently in the other drivers, not sure
+    * what to do here.
+    */
+   PFNGLXENABLEEXTENSIONPROC glx_enable_extension;
+
+   if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
+      glx_enable_extension = (PFNGLXENABLEEXTENSIONPROC)
+         glXGetProcAddress( (const GLubyte *) "__glXEnableExtension" );
+
+      if ( glx_enable_extension != NULL ) {
+        glx_enable_extension( "GLX_SGI_swap_control", GL_FALSE );
+        glx_enable_extension( "GLX_SGI_video_sync", GL_FALSE );
+        glx_enable_extension( "GLX_MESA_swap_control", GL_FALSE );
+      }
+   }
+#endif
+}
+#endif
+
 static struct __DriverAPIRec mach64API = {
    .InitDriver      = mach64InitDriver,
    .DestroyScreen   = mach64DestroyScreen,
@@ -453,8 +462,6 @@ static struct __DriverAPIRec mach64API = {
    .SwapBuffers     = mach64SwapBuffers,
    .MakeCurrent     = mach64MakeCurrent,
    .UnbindContext   = mach64UnbindContext,
-   .OpenFullScreen  = mach64OpenFullScreen,
-   .CloseFullScreen = mach64CloseFullScreen,
    .GetSwapInfo     = NULL,
    .GetMSC          = driGetMSC32,
    .WaitForMSC      = driWaitForMSC32,
index 358c599ebacc9c3897a98b60a52db4756163ed38..e0f3a024fcfa51fb8ba26fe57df16e843f5d31d6 100644 (file)
@@ -814,13 +814,6 @@ mgaUnbindContext(__DRIcontextPrivate *driContextPriv)
    return GL_TRUE;
 }
 
-static GLboolean
-mgaOpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
-
 /* This looks buggy to me - the 'b' variable isn't used anywhere...
  * Hmm - It seems that the drawable is already hooked in to
  * driDrawablePriv.
@@ -906,8 +899,6 @@ static const struct __DriverAPIRec mgaAPI = {
    .SwapBuffers     = mgaSwapBuffers,
    .MakeCurrent     = mgaMakeCurrent,
    .UnbindContext   = mgaUnbindContext,
-   .OpenFullScreen  = mgaOpenCloseFullScreen,
-   .CloseFullScreen = mgaOpenCloseFullScreen,
    .GetSwapInfo     = getSwapInfo,
    .GetMSC          = driGetMSC32,
    .WaitForMSC      = driWaitForMSC32,
index 48a17ab172bea5e28296c9ff886f8c3e7de99831..26185fa06260b648bddf0e5edb8ee40da4f5930f 100644 (file)
@@ -254,15 +254,6 @@ r128DestroyScreen( __DRIscreenPrivate *sPriv )
 }
 
 
-/* Initialize the fullscreen mode.
- */
-static GLboolean
-r128OpenCloseFullScreen( __DRIcontextPrivate *driContextPriv )
-{
-   return GL_TRUE;
-}
-
-
 /* Create and initialize the Mesa and driver specific pixmap buffer
  * data.
  */
@@ -335,6 +326,36 @@ r128InitDriver( __DRIscreenPrivate *sPriv )
    return GL_TRUE;
 }
 
+#ifndef _SOLO
+/**
+ * This function is called by libGL.so as soon as libGL.so is loaded.
+ * This is where we register new extension functions with the dispatcher.
+ *
+ * \todo This interface has been deprecated, so we should probably remove
+ *       this function before the next XFree86 release.
+ */
+void __driRegisterExtensions( void )
+{
+#if 0
+   /* KW: This is done slightly differently to the other drivers and
+      dri_interface.h doesn't seem to cope. 
+   */
+   PFNGLXENABLEEXTENSIONPROC
+   glx_enable_extension;
+
+   if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
+      glx_enable_extension = (PFNGLXENABLEEXTENSIONPROC)
+         glXGetProcAddress( (const GLubyte *) "__glXEnableExtension" );
+
+      if ( glx_enable_extension != NULL ) {
+        glx_enable_extension( "GLX_SGI_swap_control", GL_FALSE );
+        glx_enable_extension( "GLX_SGI_video_sync", GL_FALSE );
+        glx_enable_extension( "GLX_MESA_swap_control", GL_FALSE );
+      }
+   }
+#endif
+}
+#endif
 
 static struct __DriverAPIRec r128API = {
    .InitDriver      = r128InitDriver,
@@ -346,8 +367,6 @@ static struct __DriverAPIRec r128API = {
    .SwapBuffers     = r128SwapBuffers,
    .MakeCurrent     = r128MakeCurrent,
    .UnbindContext   = r128UnbindContext,
-   .OpenFullScreen  = r128OpenCloseFullScreen,
-   .CloseFullScreen = r128OpenCloseFullScreen,
    .GetSwapInfo     = NULL,
    .GetMSC          = driGetMSC32,
    .WaitForMSC      = driWaitForMSC32,
index 868f623ee8640f3833a77cea33a9a7db8b1c7ce8..8f473e0184ac26e723efe5313be5c4cd5b6d40d8 100644 (file)
@@ -610,8 +610,6 @@ static const struct __DriverAPIRec r200API = {
    .SwapBuffers     = r200SwapBuffers,
    .MakeCurrent     = r200MakeCurrent,
    .UnbindContext   = r200UnbindContext,
-   .OpenFullScreen  = NULL,
-   .CloseFullScreen = NULL,
    .GetSwapInfo     = getSwapInfo,
    .GetMSC          = driGetMSC32,
    .WaitForMSC      = driWaitForMSC32,
index 25d5be5790b5dac1a96849e20134738c216b37d2..6043eab334a47d712a6f9c3d8398decaee7e16c5 100644 (file)
@@ -526,9 +526,6 @@ radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
    _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate));
 }
 
-
-
-
 static struct __DriverAPIRec radeonAPI = {
    .InitDriver      = radeonInitDriver,
    .DestroyScreen   = radeonDestroyScreen,
@@ -539,8 +536,6 @@ static struct __DriverAPIRec radeonAPI = {
    .SwapBuffers     = radeonSwapBuffers,
    .MakeCurrent     = radeonMakeCurrent,
    .UnbindContext   = radeonUnbindContext,
-   .OpenFullScreen  = NULL,
-   .CloseFullScreen = NULL,
    .GetSwapInfo     = getSwapInfo,
    .GetMSC          = driGetMSC32,
    .WaitForMSC      = driWaitForMSC32,
@@ -549,7 +544,6 @@ static struct __DriverAPIRec radeonAPI = {
 };
 
 
-
 /*
  * This is the bootstrap function for the driver.
  * The __driCreateScreen name is the symbol that libGL.so fetches.
index fad490a958ba467362dc1625f0d32beefa8573c7..c6163ff5984fb2963a49a7bf269f6def071851ad 100644 (file)
@@ -640,6 +640,7 @@ savageUnbindContext(__DRIcontextPrivate *driContextPriv)
    return GL_TRUE;
 }
 
+#if 0
 static GLboolean
 savageOpenFullScreen(__DRIcontextPrivate *driContextPriv)
 {
@@ -673,7 +674,7 @@ savageCloseFullScreen(__DRIcontextPrivate *driContextPriv)
    }
     return GL_TRUE;
 }
-
+#endif
 
 static GLboolean
 savageMakeCurrent(__DRIcontextPrivate *driContextPriv,
@@ -807,9 +808,7 @@ static const struct __DriverAPIRec savageAPI = {
    savageDestroyBuffer,
    savageSwapBuffers,
    savageMakeCurrent,
-   savageUnbindContext,
-   savageOpenFullScreen,
-   savageCloseFullScreen
+   savageUnbindContext
 };
 
 
index 34056604c3b204edc899643cb17f415963fac5c3..a50d6b0518d41bbdbaefa590ca8fb98f7bf0665c 100644 (file)
@@ -214,7 +214,7 @@ struct savage_context_t {
     /*  use this bit to support single/double buffer */
     GLuint IsDouble;
     /*  use this to indicate Fullscreen mode */   
-    GLuint IsFullScreen;
+    GLuint IsFullScreen; /* FIXME - open/close fullscreen is gone, is this needed? */
     GLuint backup_frontOffset;
     GLuint backup_backOffset;
     GLuint backup_frontBitmapDesc;
index 19e7afee7fce2fd480d25c083348ceeff1aae138..cc35c028727046b7e1827302c8f89ec1ee55cf72 100644 (file)
@@ -315,7 +315,6 @@ struct sis_context
   GLint GlobalFlag;
 
   /* Stereo */
-  GLboolean isFullScreen;
   GLboolean useStereo;
   GLboolean stereoEnabled;
   int stereo_drawIndex;
index 7b1e24e5a8524082ecbc40334f79ed25b392166c..df4cc7b2324c5f13aa2da4d0c0795b113d70dfb2 100644 (file)
@@ -251,14 +251,6 @@ sisInitDriver( __DRIscreenPrivate *sPriv )
    return GL_TRUE;
 }
 
-/* Fullscreen mode change stub
- */
-static GLboolean
-sisOpenCloseFullScreen( __DRIcontextPrivate *driContextPriv )
-{
-   return GL_TRUE;
-}
-
 static struct __DriverAPIRec sisAPI = {
    .InitDriver      = sisInitDriver,
    .DestroyScreen   = sisDestroyScreen,
@@ -269,8 +261,6 @@ static struct __DriverAPIRec sisAPI = {
    .SwapBuffers     = sisSwapBuffers,
    .MakeCurrent     = sisMakeCurrent,
    .UnbindContext   = sisUnbindContext,
-   .OpenFullScreen  = sisOpenCloseFullScreen,
-   .CloseFullScreen = sisOpenCloseFullScreen,
    .GetSwapInfo     = NULL,
    .GetMSC          = NULL,
    .WaitForMSC      = NULL,
index 370f3283c8a2e08a4a06afb3896d75d649e12a35..d4d5515b24d1cd53cacf7da6db16a01fc2fafca0 100644 (file)
@@ -262,13 +262,6 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
 }
 
 
-static GLboolean
-tdfxOpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
-
 static const struct __DriverAPIRec tdfxAPI = {
    .InitDriver      = tdfxInitDriver,
    .DestroyScreen   = tdfxDestroyScreen,
@@ -279,8 +272,6 @@ static const struct __DriverAPIRec tdfxAPI = {
    .SwapBuffers     = tdfxSwapBuffers,
    .MakeCurrent     = tdfxMakeCurrent,
    .UnbindContext   = tdfxUnbindContext,
-   .OpenFullScreen  = tdfxOpenCloseFullScreen,
-   .CloseFullScreen = tdfxOpenCloseFullScreen,
    .GetSwapInfo     = NULL,
    .GetMSC          = NULL,
    .WaitForMSC      = NULL,
index dd65b30f896b1b994f7108328e25cba0fa7966f6..bbe570f222eb1461b45b17fe3221b8beea62d542 100644 (file)
@@ -265,21 +265,6 @@ XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv)
     vmesa->Setup[VIA_DESTREG_DI0] = vmesa->driScreen->front_offset;
     return GL_TRUE;
 }
-
-#else
-
-static GLboolean
-viaOpenFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
-static GLboolean
-viaCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
 #endif
 
 
@@ -292,9 +277,7 @@ static struct __DriverAPIRec viaAPI = {
     viaDestroyBuffer,
     viaSwapBuffers,
     viaMakeCurrent,
-    viaUnbindContext,
-    viaOpenFullScreen,
-    viaCloseFullScreen
+    viaUnbindContext
 };
 
 
index cc307b0cc4bfd86e1a4d49cc747481c4c66cf370..9d92ce8dab9eb1329bca561b5074507977de586b 100644 (file)
@@ -430,12 +430,6 @@ x11UnbindContext(__DRIcontextPrivate *driContextPriv)
    return GL_TRUE;
 }
 
-static GLboolean
-x11OpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-   return GL_TRUE;
-}
-
 static struct __DriverAPIRec x11API = {
    x11InitDriver,
    x11DestroyScreen,
@@ -445,11 +439,14 @@ static struct __DriverAPIRec x11API = {
    x11DestroyBuffer,
    x11SwapBuffers,
    x11MakeCurrent,
-   x11UnbindContext,
-   x11OpenCloseFullScreen,
-   x11OpenCloseFullScreen
+   x11UnbindContext
 };
 
+void
+__driRegisterExtensions(void)
+{
+}
+
 /*
  * This is the bootstrap function for the driver.
  * The __driCreateScreen name is the symbol that libGL.so fetches.