Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenGL 2.1 on old hardware through mesa? [question answered]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Lebkoungcity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2008
Posts: 125
Location: Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Mon Jan 30, 2012 5:35 pm    Post subject: OpenGL 2.1 on old hardware through mesa? [question answered] Reply with quote

Hi there,

my question might be a bit academic but I'd like to know if it would be possible to use the mesa software rasterizer to bring an old card from OpenGL 1.3 to OpenGL 2.1.

I ask this because I'd like to use my ThinkPad R40 for a game named performous which makes use of OpenGL 2.1. But the Radeon Mobility M7 LW [Radeon Mobility 7500] in the R40 can only do OpenGL 1.3.

This question came to my mind when I read the output of glxinfo when using the mesa software rasterizer:
Code:
[...]
 OpenGL vendor string: Mesa Project
 OpenGL renderer string: Software Rasterizer
 OpenGL version string: 2.1 Mesa 7.11.2
 OpenGL shading language version string: 1.20
[...]


Performous did start with mesa software rasterizer but it was unplayable without direct rendering (rendering was way too slow) - but it doesn't start with direct rendering enabled because then there's only OpenGL 1.3 (I'm not on the R40 at the moment but it says something like it doesn't start without OpenGL 2.1).

So, might it somehow be possible to substitute the missing parts of OpenGL 2.1 through software?

Greetings,
Andy
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)


Last edited by Lebkoungcity on Mon Feb 06, 2012 8:14 am; edited 1 time in total
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 383

PostPosted: Mon Jan 30, 2012 6:05 pm    Post subject: Reply with quote

No, I don't think that's possible.

Even if you were able to hardware-accelerate some OpenGL operations, the ones that aren't accelerated would reduce performance to unacceptable levels.
Back to top
View user's profile Send private message
yoshi314
l33t
l33t


Joined: 30 Dec 2004
Posts: 848
Location: PL

PostPosted: Tue Jan 31, 2012 9:31 am    Post subject: Re: OpenGL 2.1 on old hardware through mesa? Reply with quote

Lebkoungcity wrote:
So, might it somehow be possible to substitute the missing parts of OpenGL 2.1 through software?

Greetings,
Andy
that is exactly what mesa does - it falls back to software at features hardware doesn't support; although do not expect it to be fast.

you might try building mesa with llvm useflag and using the LLVM pipe driver as software fallback - that could be a bit faster.
_________________
~amd64
shrink your /usr/portage with squashfs+aufs
Back to top
View user's profile Send private message
Lebkoungcity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2008
Posts: 125
Location: Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Tue Jan 31, 2012 11:20 pm    Post subject: Reply with quote

[quote]yoshi314,

mesa is build with the llvm useflag... I'm not sure about what you mean with
Quote:
using the LLVM pipe driver as software fallback
...

Do you mean my R40 is kind of OpenGL2.1-ready (with the help of mesa)? So, why do I get The error, that OpenGL 2.1 is needed but not available?

Greetings,
Andy
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Wed Feb 01, 2012 12:28 am    Post subject: Reply with quote

The llvmpipe driver should give you OpenGL 2.1. It will be slow though.
To use it, you need to build mesa with USE="gallium llvm" and set the software renderer to gallium using eselect mesa.
Back to top
View user's profile Send private message
Lebkoungcity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2008
Posts: 125
Location: Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Thu Feb 02, 2012 10:14 am    Post subject: Reply with quote

Thanks for your answers!

I don't expect it to be fast - just running :wink:

But now I'm a bit confused... therefore some data:

Code:
~ $ performous
Performous 0.6.1+
  Internationalization:   Enabled
  MIDI I/O:               Disabled
  Webcam support:         Disabled

audio/error: Audio device 'dev="USBMIC" mics="blue,red"': Not found or already in use.
audio/error: Audio device 'dev="Microphone" mics="*"': Not found or already in use.
FATAL ERROR: OpenGL 2.1 is required but not available


Code:
# eselect mesa list
i915 (Intel 915, 945)
i965 (Intel 965, G/Q3x, G/Q4x)
r300 (Radeon R300-R500)
  [1]   classic
  [2]   gallium *
r600 (Radeon R600-R700, Evergreen, Northern Islands)
  [1]   classic
  [2]   gallium *
sw (Software renderer)
  [1]   classic
  [2]   gallium *


Code:
# emerge -pv mesa

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/mesa-7.11.2  USE="classic egl gallium llvm nptl shared-glapi -bindist -debug -gbm -gles -motif -openvg -osmesa -pax_kernel -pic (-selinux) -shared-dricore" VIDEO_CARDS="radeon -intel -mach64 -mga -nouveau -r128 -savage -sis -tdfx -via -vmware" 0 kB


Code:
# emerge --info
Portage 2.1.10.44 (default/linux/x86/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.1.10-gentoo-r1 i686)
=================================================================
System uname: Linux-3.1.10-gentoo-r1-i686-Intel-R-_Pentium-R-_M_processor_1400MHz-with-gentoo-2.0.3
Timestamp of tree: Thu, 02 Feb 2012 08:30:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 3.1.6 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo lokal
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -pipe -O2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb binfilter branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam fbcondecor firefox flac fortran gdbm gdu gif gpm gstreamer gtk iconv ipv6 irda java jpeg kde kipi laptop lcms ldap libnotify mad mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 readline sdl semantic-desktop session spell ssl startup-notification svg sysfs tcpd thinkpad tiff truetype udev unicode usb vorbis wifi x264 x86 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2664
Location: Slovenia

PostPosted: Thu Feb 02, 2012 10:35 am    Post subject: Reply with quote

You need to use the software renderer (llvmpipe), not a hardware renderer. Don't bother though, because despite it's llvm goodness, llvmpipe is slooooooooooooow. It needs a powerful processor, like the Core i3/5/7 series, to be even tiny bit usable. llvmpipe is there for development, not for actual use.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Thu Feb 02, 2012 11:59 am    Post subject: Reply with quote

In order to always force software rendering, build mesa with USE="-radeon". If only for a particular application, launch it with LIBGL_ALWAYS_SOFTWARE=1
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Thu Feb 02, 2012 1:09 pm    Post subject: Reply with quote

OP doesn't want always software rendering. The OP's asking for using hardware rendering, but emulating his card's missing GL 2.1 features through software. (so the software should augment the hardware)
Which should be possible, in theory, but mesa doesn't do it. Sorry, OP :(
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 383

PostPosted: Thu Feb 02, 2012 1:16 pm    Post subject: Reply with quote

Aquous wrote:
OP doesn't want always software rendering. The OP's asking for using hardware rendering, but emulating his card's missing GL 2.1 features through software. (so the software should augment the hardware)
Which should be possible, in theory, but mesa doesn't do it. Sorry, OP :(


It's almost like I answered this in the first response. :\
Back to top
View user's profile Send private message
Lebkoungcity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2008
Posts: 125
Location: Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Mon Feb 06, 2012 8:13 am    Post subject: Reply with quote

Thanks everybody for taking your time and answering my question! :)

Andy
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum