Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 42

Thread: Mir Display Server Support Lands In SDL2

  1. #11
    Join Date
    Jan 2011
    Posts
    1,287

    Default

    Quote 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

  2. #12
    Join Date
    Jan 2013
    Posts
    1,116

    Default

    Quote 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.

  3. #13
    Join Date
    Dec 2009
    Posts
    321

    Default

    Wayland support in SDL2 is important for Sailfish.

  4. #14
    Join Date
    Apr 2010
    Posts
    708

    Default

    Quote 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?

  5. #15
    Join Date
    Dec 2010
    Posts
    1,111

    Default

    Quote 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

  6. #16
    Join Date
    Aug 2012
    Posts
    379

    Default

    Quote 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.

  7. #17
    Join Date
    Oct 2013
    Posts
    232

    Default

    Quote 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?!

  8. #18
    Join Date
    Jan 2011
    Posts
    1,287

    Default

    Quote 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.

  9. #19
    Join Date
    Aug 2012
    Posts
    379

    Default

    Quote 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?

  10. #20
    Join Date
    Sep 2012
    Posts
    265

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •