how to switch between hardware rendering and Mesa rendering

View: New views
3 Messages — Rating Filter:   Alert me  

how to switch between hardware rendering and Mesa rendering

by Florent Monnier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

In my Linux system I have installed the proprietary drivers for my video card,
But I would like to test a program with the Mesa rendering.
(Because the driver doesn't seems to support glsl and I would like to test a
program with it)

So I have tryed to do what I have done before with other libs, which is I have
installed Mesa with ./configure --prefix=/tmp/Mesa and then after the install
I do: export LD_LIBRARY_PATH=/tmp/Mesa/lib
Then I run my program in the same session. With other libs this works fine,
but here my program still run with the hardware accelerattion.

So you guess the question, how can I test a program with Mesa without
uninstalling my hardware drivers ?

thanks in advance

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mesa3d-users mailing list
Mesa3d-users@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-users

Re: how to switch between hardware rendering and Mesa rendering

by Chia-I Wu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 27, 2009 at 01:45:56AM +0100, Florent Monnier wrote:

> In my Linux system I have installed the proprietary drivers for my video card,
> But I would like to test a program with the Mesa rendering.
> (Because the driver doesn't seems to support glsl and I would like to test a
> program with it)
> So I have tryed to do what I have done before with other libs, which is I have
> installed Mesa with ./configure --prefix=/tmp/Mesa and then after the install
> I do: export LD_LIBRARY_PATH=/tmp/Mesa/lib
> Then I run my program in the same session. With other libs this works fine,
> but here my program still run with the hardware accelerattion.
> So you guess the question, how can I test a program with Mesa without
> uninstalling my hardware drivers ?
With LD_LIBRARY_PATH set, you can

$ ldd <your-program>

to verify the libraries from mesa are used.  If it already is, and you
are under X, you can run

$ glxinfo

to see if it is doing direct rendering, and which renderer is used.

If glxinfo reports direct rendering, you can make sure the software DRI
driver is used by setting LIBGL_ALWAYS_SOFTWARE=1.

Another way is to use a Xlib-based GLX emulation.  You can configure
mesa with

$ ./configure --with-driver=xlib

to have a libGL.so that does not talk GLX.

--
Regards,
olv

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mesa3d-users mailing list
Mesa3d-users@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-users

Re: how to switch between hardware rendering and Mesa rendering

by Ethan Grammatikidis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 27 Oct 2009 11:33:21 +0800
Chia-I Wu <olvaffe@...> wrote:

> On Tue, Oct 27, 2009 at 01:45:56AM +0100, Florent Monnier wrote:
> > In my Linux system I have installed the proprietary drivers for my video card,
> > But I would like to test a program with the Mesa rendering.
> > (Because the driver doesn't seems to support glsl and I would like to test a
> > program with it)
> > So I have tryed to do what I have done before with other libs, which is I have
> > installed Mesa with ./configure --prefix=/tmp/Mesa and then after the install
> > I do: export LD_LIBRARY_PATH=/tmp/Mesa/lib
> > Then I run my program in the same session. With other libs this works fine,
> > but here my program still run with the hardware accelerattion.
> > So you guess the question, how can I test a program with Mesa without
> > uninstalling my hardware drivers ?
> With LD_LIBRARY_PATH set, you can
>
> $ ldd <your-program>
>
> to verify the libraries from mesa are used.  If it already is, and you
> are under X, you can run
>
> $ glxinfo
>
> to see if it is doing direct rendering, and which renderer is used.
>
> If glxinfo reports direct rendering, you can make sure the software DRI
> driver is used by setting LIBGL_ALWAYS_SOFTWARE=1.
>
> Another way is to use a Xlib-based GLX emulation.  You can configure
> mesa with
>
> $ ./configure --with-driver=xlib
>
> to have a libGL.so that does not talk GLX.

When I wanted to test software rendering I didn't know of the
LIBGL_ALWAYS_SOFTWARE varibale.  I configured Mesa like that, but
rather than mess with my system Mesa I configured it to install under
/opt like so:

$ ./configure --prefix=/opt/mesa-standalone --with-driver=xlib

Then when I want to test if something works with Mesa I use a Bourne
shell feature to set $LD_LIBRARY_PATH just for the one program:

$ LD_LIBRARY_PATH=/opt/mesa-standalone/lib program args


--
Ethan Grammatikidis

Those who are slower at parsing information must
necessarily be faster at problem-solving.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mesa3d-users mailing list
Mesa3d-users@...
https://lists.sourceforge.net/lists/listinfo/mesa3d-users