Getting rid of x11 && sdl?

Hello,

System : freebsd 10.2. 64-bit.

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

I thought about mesa and egl. What your experience with those?

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

Thanks
–?
Jog

At the end of the day, you’re going to need some sort of backend to handle
how things are rendered. Checkout this post about different
X11/alternative implementations
http://unix.stackexchange.com/questions/9608/lightweight-x11-alternative-available
.On Thu, Sep 24, 2015 at 8:59 AM, deco33000 Jog wrote:

Hello,

System : freebsd 10.2. 64-bit.

I have a very specific need (I cannot develop too much) and I need to
remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland.
But I am worried that lot of graphics rely on it (obviously).

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes,
are there graphic brand you advise?
Will I be able to do light 3d rendering?

I thought about mesa and egl. What your experience with those?

I know it may sound silly to get rid of x11 but I would be hearing from
experts (you).

Thanks

Jog


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

precisely Barry, i read that SDL has framebuffer support. Could it be of use here?

–?
Jog

24.09.2015, 15:37, “Alex Barry” <alex.barry at gmail.com>:> At the end of the day, you’re going to need some sort of backend to handle how things are rendered.? Checkout this post about different X11/alternative implementations.

On Thu, Sep 24, 2015 at 8:59 AM, deco33000 Jog <@deco33000_Jog> wrote:

Hello,

System : freebsd 10.2. 64-bit.

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

I thought about mesa and egl. What your experience with those?

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

Thanks

Jog


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

,


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I am sorry Alex, I called you Barry.

Very sorry (shame on me)

–?
Jog

24.09.2015, 15:51, “deco33000 Jog” <@deco33000_Jog>:> precisely Barry, i read that SDL has framebuffer support. Could it be of use here?


Jog

I assume you’re looking to possibly replace x11 and go directly to the
video card or the kernel’s device drivers?

How deep down the software stack are you looking to venture for your
goals? We have SDL, then it sits on top of whatever, and that whatever may
well have libraries and APIs to go through before it hits the actual
hardware, and at some point in that stack you’ll cross into kernel space.On Thu, Sep 24, 2015 at 10:52 AM, deco33000 Jog wrote:

I am sorry Alex, I called you Barry.

Very sorry (shame on me)


Jog

24.09.2015, 15:51, “deco33000 Jog” :

precisely Barry, i read that SDL has framebuffer support. Could it be of
use here?


Jog


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Raymond, exact.*
I massively customized a freebsd system (which is used everyday by
professionals) and am flying in the freebsd kernel (except the graphic
part which is new to me).
*
I am ready to do anything to fulfill the goal, no matter the amount of
work (the limit is obviously to not force makers to make specific drivers
for my system).
*
You have a plan? :slight_smile:
*
–*
Jog
*
*
*
24.09.2015, 19:57, “Raymond Jennings” :

I assume you’re looking to possibly replace x11 and go directly to the
video card or the kernel’s device drivers?
*
How deep down the software stack are you looking to venture for your
goals?* We have SDL, then it sits on top of whatever, and that whatever
may well have libraries and APIs to go through before it hits the actual
hardware, and at some point in that stack you’ll cross into kernel
space.
On Thu, Sep 24, 2015 at 10:52 AM, deco33000 Jog <@deco33000_Jog> wrote:

I am sorry Alex, I called you Barry.

Very sorry (shame on me)
--*
Jog

24.09.2015, 15:51, "deco33000 Jog" <@deco33000_Jog>:
> precisely Barry, i read that SDL has framebuffer support. Could it
be of use here?
>
> --
> Jog
>
_______________________________________________
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

,


SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

System : freebsd 10.2. 64-bit.

Disclaimer: I know pretty much nothing about non-Linux systems, but I
hope you will find this information useful.

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

What are your actual requirements? And in which way isn?t Wayland
adapted for them?

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

SDL?1.2 did have fbdev support, but this driver is bad and doesn?t
support anything you?d expect from a modern display API: you will
always get tearing, you can?t control the framerate, you can?t use 3D
nor 2D acceleration? Really, don?t bother.

DRM is the way to go, I did start a SDL?2.0 DRM backend long ago but I
never went anywhere with it, this would be what you want.

As for the GPU, on Linux anything supported by Mesa is good to go, I
personally use an Intel one.

I thought about mesa and egl. What your experience with those?

If you want to use OpenGL or OpenGL?ES on anything but X11, the API
used to get the context is EGL, this is what Weston uses for its DRM
compositor for example, and what Wayland clients use to display
anything 3D.

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

I don?t think it is any silly. :slight_smile:

But I don?t see the point in reinventing Wayland either, you should
look into it, even though I?m quite sure no compositor runs out of the
box on FreeBSD.On Thu, Sep 24, 2015 at 02:59:32PM +0200, deco33000 Jog wrote:

Thanks
–?
Jog


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Emmanuel Gil Peyrot
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20150925/09672239/attachment.pgp

Thanks Emmanuel,

Yes I would like to optimize the speed and security of x11. i’ve already written the code to manage events and clicks, but I was worried about rendering and eventually 3d acceleration (which matters a lot).

The goal is to specialize for a given hardware (always the same) and minimize electric consumption and possible delays (hard real time is a coming requirement for that system, which, fortunately, is already tackled in this custom system).

Wayland, is the direction but way too broad and uses xml, which is too slow to parse (even with a very good parser. I just have enough time for array enumeration on the same cache line).

So I evolve on a -very- specific -and specialized- need.

I had a look at drm and egl. They seem to do what I need.

In the end, I will have to fiddle with EGL + DRM + MESA, right?

–?
Jog

25.09.2015, 00:22, “Emmanuel Gil Peyrot” :> On Thu, Sep 24, 2015 at 02:59:32PM +0200, deco33000 Jog wrote:

?Hello,

?System : freebsd 10.2. 64-bit.

Disclaimer: I know pretty much nothing about non-Linux systems, but I
hope you will find this information useful.

?I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

?My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

What are your actual requirements? And in which way isn?t Wayland
adapted for them?

?Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
?Will I be able to do light 3d rendering?

SDL?1.2 did have fbdev support, but this driver is bad and doesn?t
support anything you?d expect from a modern display API: you will
always get tearing, you can?t control the framerate, you can?t use 3D
nor 2D acceleration? Really, don?t bother.

DRM is the way to go, I did start a SDL?2.0 DRM backend long ago but I
never went anywhere with it, this would be what you want.

As for the GPU, on Linux anything supported by Mesa is good to go, I
personally use an Intel one.

?I thought about mesa and egl. What your experience with those?

If you want to use OpenGL or OpenGL?ES on anything but X11, the API
used to get the context is EGL, this is what Weston uses for its DRM
compositor for example, and what Wayland clients use to display
anything 3D.

?I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

I don?t think it is any silly. :slight_smile:

But I don?t see the point in reinventing Wayland either, you should
look into it, even though I?m quite sure no compositor runs out of the
box on FreeBSD.

?Thanks
?–
?Jog
?_______________________________________________
?SDL mailing list
?SDL at lists.libsdl.org
?http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Emmanuel Gil Peyrot
,


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

If 3D accel is a requirement, X11’s performance overhead is negligible.

The only choice left is X11 vs Wayland. I’d choose X11, on maturity
grounds. You will not be able to do anything to the security angle outside
of what the configuration and feature set selection allow anyway.

Also, forget about hard real-time in 3d accel.

Sorry I didn’t make my point on 3d accel very clear.
3d accel is needed but for soft real time or normal apps, hard real time will be headless and coming next for some security application.

So you don’t think drm + egl + mesa is a good fit Alexander?

–?
Jog

25.09.2015, 21:48, “Alexander Sabourenkov” :> If 3D accel is a requirement, X11’s performance overhead is negligible.

The only choice left is X11 vs Wayland. I’d choose X11, on maturity grounds. You will not be able to do anything to the security angle outside of what the configuration and feature set selection allow?? anyway.

,


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Well, there’s either drm+egl_as_implemented_in_mesa or some_vendor_blob,
generally.

So it’s not like you have much choice here. If it’s acceptably supported
under mesa, I’d go with it, otherwise it’s no choice at all.

What’s left is window managent and input handling. You didn’t quite mention
what your platform or requirements are, so I can’t really say much apart
from reiterating that ‘optimizing’ x11 will most likely be a waste of time
apart from cutting out unused stuff, be it via build or config.

I also don’t understand your comment on Wayland being limited by XML
parsing. It’s protocol specification is in XML, yes, but so is X11’s, the
data on the wire is binary of course.