Announcement

Collapse
No announcement yet.

Mir Display Server Support Lands In SDL2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by Awesomeness View Post
    Mir support is mostly copy and paste from the Wayland port.
    If that's true, it's even better, as code duplication could be reduced.
    This is good news, this means Linux as a gaming platform will not suffer because of the whole Mir situation

    Comment


    • #12
      Originally posted by MartinN View Post
      Minus the licensing tidbit or giving credit where it's due, of course....
      Irrelevant for this topic at all. Neither the license changes nor will their be a lack of credit when code is copied/reused internally in SDL2. Trolling attempt failed.

      IMHO, it is nice to see that, more platforms supported by SDL is a very good thing.

      Comment


      • #13
        Wayland support in SDL2 is important for Sailfish.

        Comment


        • #14
          Originally posted by Awesomeness View Post
          Mir support is mostly copy and paste from the Wayland port.
          Both of them are pretty much just a thin wrapper around the OpenGL layer, aren't they? So most of the code will be GL API calls, with just a little bit tying it to Mir or Wayland?

          Comment


          • #15
            Originally posted by mrugiero View Post
            If that's true, it's even better, as code duplication could be reduced.
            This is good news, this means Linux as a gaming platform will not suffer because of the whole Mir situation
            The fact right now is that code is duplicated.
            Just compare https://hg.libsdl.org/SDL/file/52f86...L_waylanddyn.c against https://hg.libsdl.org/SDL/file/52f86...r/SDL_mirdyn.c
            Occasionally here is a line of code missing, there was a line of code added and in the end the Mir back-end has 20 lines of code less in this file than the Wayland back-end but the rest is pretty much a search "WAYLAND" and replace with "MIR". Even the comments are the same:

            Code:
            #if DEBUG_DYNAMIC_WAYLAND
                if (fn != NULL)
                    SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn);
                else
                    SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname);
            #endif
            
                if (fn == NULL)
                    *pHasModule = 0;  /* kill this module. */
            
                return fn;
            }
            
            #endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
            
            /* Define all the function pointers and wrappers... */
            #define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0;
            #define SDL_WAYLAND_SYM(rc,fn,params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL;
            #define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL;
            #include "SDL_waylandsym.h"
            #undef SDL_WAYLAND_MODULE
            #undef SDL_WAYLAND_SYM
            #undef SDL_WAYLAND_INTERFACE
            Code:
            #if DEBUG_DYNAMIC_MIR
                if (fn != NULL)
                    SDL_Log("MIR: Found '%s' in %s (%p)\n", fnname, mirlibs[i].libname, fn);
                else
                    SDL_Log("MIR: Symbol '%s' NOT FOUND!\n", fnname);
            #endif
            
                if (fn == NULL)
                    *pHasModule = 0;  /* kill this module. */
            
                return fn;
            }
            
            #endif /* SDL_VIDEO_DRIVER_MIR_DYNAMIC */
            
            /* Define all the function pointers and wrappers... */
            #define SDL_MIR_MODULE(modname) int SDL_MIR_HAVE_##modname = 0;
            #define SDL_MIR_SYM(rc,fn,params) SDL_DYNMIRFN_##fn MIR_##fn = NULL;
            #include "SDL_mirsym.h"
            #undef SDL_MIR_MODULE
            #undef SDL_MIR_SYM
            Even the file names just had a search&replace done: https://hg.libsdl.org/SDL/file/52f86.../video/wayland https://hg.libsdl.org/SDL/file/52f86.../src/video/mir

            Comment


            • #16
              Originally posted by Awesomeness View Post
              The fact right now is that code is duplicated.
              Just compare https://hg.libsdl.org/SDL/file/52f86...L_waylanddyn.c against https://hg.libsdl.org/SDL/file/52f86...r/SDL_mirdyn.c
              Occasionally here is a line of code missing, there was a line of code added and in the end the Mir back-end has 20 lines of code less in this file than the Wayland back-end but the rest is pretty much a search "WAYLAND" and replace with "MIR". Even the comments are the same:

              Code:
              #if DEBUG_DYNAMIC_WAYLAND
                  if (fn != NULL)
                      SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn);
                  else
                      SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname);
              #endif
              
                  if (fn == NULL)
                      *pHasModule = 0;  /* kill this module. */
              
                  return fn;
              }
              
              #endif /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
              
              /* Define all the function pointers and wrappers... */
              #define SDL_WAYLAND_MODULE(modname) int SDL_WAYLAND_HAVE_##modname = 0;
              #define SDL_WAYLAND_SYM(rc,fn,params) SDL_DYNWAYLANDFN_##fn WAYLAND_##fn = NULL;
              #define SDL_WAYLAND_INTERFACE(iface) const struct wl_interface *WAYLAND_##iface = NULL;
              #include "SDL_waylandsym.h"
              #undef SDL_WAYLAND_MODULE
              #undef SDL_WAYLAND_SYM
              #undef SDL_WAYLAND_INTERFACE
              Code:
              #if DEBUG_DYNAMIC_MIR
                  if (fn != NULL)
                      SDL_Log("MIR: Found '%s' in %s (%p)\n", fnname, mirlibs[i].libname, fn);
                  else
                      SDL_Log("MIR: Symbol '%s' NOT FOUND!\n", fnname);
              #endif
              
                  if (fn == NULL)
                      *pHasModule = 0;  /* kill this module. */
              
                  return fn;
              }
              
              #endif /* SDL_VIDEO_DRIVER_MIR_DYNAMIC */
              
              /* Define all the function pointers and wrappers... */
              #define SDL_MIR_MODULE(modname) int SDL_MIR_HAVE_##modname = 0;
              #define SDL_MIR_SYM(rc,fn,params) SDL_DYNMIRFN_##fn MIR_##fn = NULL;
              #include "SDL_mirsym.h"
              #undef SDL_MIR_MODULE
              #undef SDL_MIR_SYM
              Even the file names just had a search&replace done: https://hg.libsdl.org/SDL/file/52f86.../video/wayland https://hg.libsdl.org/SDL/file/52f86.../src/video/mir
              Which just goes to show how much unecessary FUD-slinging was involved in Mir/Wayland fiasco. Coding for both is pretty much the same with minor differences and all that matters is having your toolkit like SDL to support it which wouldn't take much additional effort.

              Comment


              • #17
                Originally posted by mmstick View Post
                Which just goes to show how much unecessary FUD-slinging was involved in Mir/Wayland fiasco. Coding for both is pretty much the same with minor differences and all that matters is having your toolkit like SDL to support it which wouldn't take much additional effort.
                So it basically comes down to mir being a thin wrapper around wayland and having the CLA license?!

                Comment


                • #18
                  Originally posted by shmerl View Post
                  Wayland support in SDL2 is important for Sailfish.
                  Wayland support in SDL2 is there since some time ago already. But in this thread we are currently discussing Mir, so I don't see the relevance of your comment.
                  Also, Wayland support is important for way more things than just Sailfish, most big desktops are planning to go Wayland.

                  Comment


                  • #19
                    Originally posted by BSDude View Post
                    So it basically comes down to mir being a thin wrapper around wayland and having the CLA license?!
                    I'm puzzled, how do you come to such a conclusion?

                    Comment


                    • #20
                      Originally posted by mmstick View Post
                      I'm puzzled, how do you come to such a conclusion?
                      He's just trolling. Hoping to start a flamewar.

                      Everybody know Wayland is a protocol and Mir a display server.

                      Comment

                      Working...
                      X