Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-27 Thread Alan Coopersmith

On 09/27/11 10:14 AM, Keith Packard wrote:

On Tue, 27 Sep 2011 08:39:33 -0700, Alan 
Coopersmith  wrote:

On 09/27/11 06:50 AM, zhigang gong wrote:

   [Over 225 commits]
   47 files changed, 10484 insertions(+), 14 deletions(-)


That's a huge amount of change without any Reviewed-by: tags, which
makes it seem very premature for requesting a Pull, especially as it's
the first time xorg-devel has really ever heard of this project.


I'd like opinions on what kind of process we should follow for projects
like this. It's something like a Linux "staging" driver at this point,
clearly not ready for use in production systems, but something that
might become useful if more people worked on it.



For starters, we should probably take this discussion to xorg-devel (cc'ed)
instead of the xorg list the request was originally incorrectly sent to.

--
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-27 Thread Alan Coopersmith

[Fixed cc to xorg-devel instead of xorg, since xorg is for discussing usage,
 xorg-devel where we discuss changes to the code - the same goes for the IRC
 channels btw.]

Well, you request reviews by mailing xorg-devel and asking for them, not
skipping straight to "This is ready to merge to master, pull it in."

Just a quick glance through git log -p output on a local pull of that branch
shows it's not ready for merging - there's tons of highlighted whitespace
errors and some obvious style inconsistencies with the existing code base,
as well as with itself.  (Some files switch back and forth between different
amounts of space per indent level between different functions or even in the
same function.)

It would also be nice if it built, but my attempt to do so fails with:
 "glamor_ddx.c", line 34: cannot find include file: 
which suggests more work is needed on the configure.ac checks.

-alan-

On 09/27/11 09:19 AM, zhigang gong wrote:

Alan,

Thanks for your comments.Yes, I agree with you that glamor need more reviews
before it can be merged in. Because of some historic reason, glamor hasn't
been developed in a open way. I want to change it from now on. Actually
I discussed with Keith and Eric last week, and as some how glamor is
a standalone module and will not affect too many other parts, Keith suggested
me to submit this pull request soon, and ask comments from community.


On Tue, Sep 27, 2011 at 11:39 PM, Alan Coopersmith
  wrote:

On 09/27/11 06:50 AM, zhigang gong wrote:


  [Over 225 commits]
  47 files changed, 10484 insertions(+), 14 deletions(-)


That's a huge amount of change without any Reviewed-by: tags, which
makes it seem very premature for requesting a Pull, especially as it's
the first time xorg-devel has really ever heard of this project.

--
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System





--
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-27 Thread zhigang gong
On Wed, Sep 28, 2011 at 1:41 AM, Alon Levy  wrote:
> On Tue, Sep 27, 2011 at 09:50:06PM +0800, zhigang gong wrote:
>> Hi Keith,
>>
>> Here is the pull request to merge glamor. Basically, it has three parts.
>> The first part is the 2D rendering acceleration implementation in
>> glamor directory. It supports both OpenGL/GLESv2. The second part is
>> in hw/kdrive/xephyr. This part integrate glamor into Xephyr. And by
>> specify a "-glamor" when invoke the Xephyr then you can use glamor
>> to accelerate the rendering operations. The third part is in
>> hw/xfree86/glamor. This part implements a standalone ddx driver based
>> on glamor, egl and kms. With this glamor driver, you can start up
>> a Xserver over Mesa/EGL directly, without any native window system.
>>
>
> I am not very familiar with either cairo/pixman, just know that it is
> used in spice, and it has a GL backend. There is also clutter, and some
> other open source 2D GL rendering libraries (qt canvas is also interesting,
> although I guess it's C++). How is glamor related to them? (I guess some
> of them don't support EGL, but looking at those who do - clutter certainly,
> runs on my n900, and qt as well I think).

Well, I'm also not very familar with all of the 2D libraries you listed above.
I just try my best to explain the diffence and relationship here. I know
there are many real experts in this mail list. If I'm wrong, please correct
me.

pixman is a pure software 2D rendering library. The rendering target must
be a frame buffer located at normal memory buffer.

Cairo is a 2D graphics library with support for multiple output devices. Cairo
may utilize pixman to do the rendering if possible, for example when you
are using the image surface. When you are using other devices, such as
a xlib, then Cairo will utlize xlib's API to implement its rendering functions.

Glamor is not a general 2D rendering library. It is designed for the X11
 only. So it will not provide any APIs for other usage, it just be used
by Xserver's driver. And if you are using a xserver glamor driver, then
the calling to xlib/xcb library at client side will be routed to glamor
eventually. And one thing is possible that we may utilize cairo's EGL/GL
backend directly in glamor's implementation.

Actually, the glamor's purpose is to build a fully accelerated hardware
independent 2D driver for xserver, although we still have a lot of things to
do to improve its performance.

>
> Alon
>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-28 Thread Søren Sandmann
zhigang gong  writes:

>> I am not very familiar with either cairo/pixman, just know that it is
>> used in spice, and it has a GL backend. There is also clutter, and some
>> other open source 2D GL rendering libraries (qt canvas is also interesting,
>> although I guess it's C++). How is glamor related to them? (I guess some
>> of them don't support EGL, but looking at those who do - clutter certainly,
>> runs on my n900, and qt as well I think).
>
> Well, I'm also not very familar with all of the 2D libraries you listed above.
> I just try my best to explain the diffence and relationship here. I know
> there are many real experts in this mail list. If I'm wrong, please correct
> me.
>
> pixman is a pure software 2D rendering library. The rendering target must
> be a frame buffer located at normal memory buffer.

It would make a lot of sense to add hardware acceleration to pixman,
since that way both X, cairo, and spice could benefit from it. It could
be done either through GL or by directly talking to the hardware.


Soren
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-28 Thread Michel Dänzer
On Die, 2011-09-27 at 21:50 +0800, zhigang gong wrote: 
> 
> 3. Only support Intel platform currently.
> As glamor depends on KMS + MESA/EGL + GBM, currently only
> intel gfx device get supported.

A Gallium based EGL driver (e.g. r3/600g, nouveau or llvmpipe) can
support all of the above, any particular reason why it wouldn't work
with that?


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-28 Thread Alon Levy
On Wed, Sep 28, 2011 at 11:51:16AM +0800, zhigang gong wrote:
> On Wed, Sep 28, 2011 at 1:41 AM, Alon Levy  wrote:
> > On Tue, Sep 27, 2011 at 09:50:06PM +0800, zhigang gong wrote:
> >> Hi Keith,
> >>
> >> Here is the pull request to merge glamor. Basically, it has three parts.
> >> The first part is the 2D rendering acceleration implementation in
> >> glamor directory. It supports both OpenGL/GLESv2. The second part is
> >> in hw/kdrive/xephyr. This part integrate glamor into Xephyr. And by
> >> specify a "-glamor" when invoke the Xephyr then you can use glamor
> >> to accelerate the rendering operations. The third part is in
> >> hw/xfree86/glamor. This part implements a standalone ddx driver based
> >> on glamor, egl and kms. With this glamor driver, you can start up
> >> a Xserver over Mesa/EGL directly, without any native window system.
> >>
> >
> > I am not very familiar with either cairo/pixman, just know that it is
> > used in spice, and it has a GL backend. There is also clutter, and some
> > other open source 2D GL rendering libraries (qt canvas is also interesting,
> > although I guess it's C++). How is glamor related to them? (I guess some
> > of them don't support EGL, but looking at those who do - clutter certainly,
> > runs on my n900, and qt as well I think).
> 
> Well, I'm also not very familar with all of the 2D libraries you listed above.
> I just try my best to explain the diffence and relationship here. I know
> there are many real experts in this mail list. If I'm wrong, please correct
> me.
> 
> pixman is a pure software 2D rendering library. The rendering target must
> be a frame buffer located at normal memory buffer.
> 
> Cairo is a 2D graphics library with support for multiple output devices. Cairo
> may utilize pixman to do the rendering if possible, for example when you
> are using the image surface. When you are using other devices, such as
> a xlib, then Cairo will utlize xlib's API to implement its rendering 
> functions.
> 
> Glamor is not a general 2D rendering library. It is designed for the X11
>  only. So it will not provide any APIs for other usage, it just be used
> by Xserver's driver. And if you are using a xserver glamor driver, then
> the calling to xlib/xcb library at client side will be routed to glamor
> eventually. And one thing is possible that we may utilize cairo's EGL/GL
> backend directly in glamor's implementation.
> 
> Actually, the glamor's purpose is to build a fully accelerated hardware
> independent 2D driver for xserver, although we still have a lot of things to
> do to improve its performance.
> 

Thanks for explaining,

Alon

> >
> > Alon
> >
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-28 Thread zhigang gong
2011/9/28 Michel Dänzer :
> On Die, 2011-09-27 at 21:50 +0800, zhigang gong wrote:
>>
>> 3. Only support Intel platform currently.
>> As glamor depends on KMS + MESA/EGL + GBM, currently only
>> intel gfx device get supported.
>
> A Gallium based EGL driver (e.g. r3/600g, nouveau or llvmpipe) can
> support all of the above, any particular reason why it wouldn't work
> with that?

You are talking about gallium driver, right? As I met some problem with
intel's gallium driver, it just simply failed at egl initialization stage. And
I was told that don't use gallium driver at that time. So you can see at
my first email, I said please disable gallium when building mesa. That's
my working environment.

If those drivers satisfy all of the required features then theoretically glamor
can work with them. But I never try it. If possible, you can have a try and
see what will happen.

>
>
> --
> Earthling Michel Dänzer           |                   http://www.amd.com
> Libre software enthusiast         |          Debian, X and DRI developer
>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-28 Thread Corbin Simpson
2011/9/28 zhigang gong :
> 2011/9/28 Michel Dänzer :
>> On Die, 2011-09-27 at 21:50 +0800, zhigang gong wrote:
>>>
>>> 3. Only support Intel platform currently.
>>> As glamor depends on KMS + MESA/EGL + GBM, currently only
>>> intel gfx device get supported.
>>
>> A Gallium based EGL driver (e.g. r3/600g, nouveau or llvmpipe) can
>> support all of the above, any particular reason why it wouldn't work
>> with that?
>
> You are talking about gallium driver, right? As I met some problem with
> intel's gallium driver, it just simply failed at egl initialization stage. And
> I was told that don't use gallium driver at that time. So you can see at
> my first email, I said please disable gallium when building mesa. That's
> my working environment.
>
> If those drivers satisfy all of the required features then theoretically 
> glamor
> can work with them. But I never try it. If possible, you can have a try and
> see what will happen.

Unless I missed something, Intel doesn't endorse the Gallium drivers
for their hardware (i915g, i965g) yet. However, for the AMD and
nouveau teams, those drivers (r300g, r600g, nvfx, nv50) are the way
forward, so I'd hope that they work.

-- 
When the facts change, I change my mind. What do you do, sir? ~ Keynes

Corbin Simpson

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [Pull Request] Glamor: A 2D rendering acceleration implementation based on OpenGL

2011-09-29 Thread Kristian Høgsberg
2011/9/28 zhigang gong :
> 2011/9/28 Michel Dänzer :
>> On Die, 2011-09-27 at 21:50 +0800, zhigang gong wrote:
>>>
>>> 3. Only support Intel platform currently.
>>> As glamor depends on KMS + MESA/EGL + GBM, currently only
>>> intel gfx device get supported.
>>
>> A Gallium based EGL driver (e.g. r3/600g, nouveau or llvmpipe) can
>> support all of the above, any particular reason why it wouldn't work
>> with that?
>
> You are talking about gallium driver, right? As I met some problem with
> intel's gallium driver, it just simply failed at egl initialization stage. And
> I was told that don't use gallium driver at that time. So you can see at
> my first email, I said please disable gallium when building mesa. That's
> my working environment.

Yes, the intel gallium drivers aren't well supported, but the other
gallium drivers support gbm and EGL/GLES2 just fine.  We use that
combination for Wayland.  If you're just using gbm, kms and EGL/GLES2,
it doesn't really matter whether your driver uses gallium or not, it's
really just an implementation detail.  Similar to how it doesn't
matter to X clients whether the X server uses the EXA, UXA or XAA
acceleration architecture.

Kristian
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel