mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 20:24:30 +08:00
ee80237218
The classic OSMesa renders directly into user memory using src/mesa/swrast, while gallium OSMesa renders using softpipe or llvmpipe and copies out at glFlush() time. This would make gallium look like a worse choice for OSMesa, except that swrast is: 1) Painfully slow to render compared to llvmpipe 2) Incorrect at derivatives 3) Limited to GL 2.1 instead of GL 4.6 In my survey of OSMesa users, debian was the remaining holdout with classic OSMesa in use on hurd and some rare non-LLVM-supported architectures (sh4, alpha, etc.). As of today, they've switched to softpipe-based gallium OSMesa for them. To prevent people from running the wrong OSMesa (to the extent that running OSMesa can ever be the right thing), delete the classic version. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Closes: #320 Closes: #877 Closes: #2297 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
44 lines
1.3 KiB
ReStructuredText
44 lines
1.3 KiB
ReStructuredText
Off-screen Rendering
|
|
====================
|
|
|
|
Mesa's off-screen interface is used for rendering into user-allocated
|
|
memory without any sort of window system or operating system
|
|
dependencies. That is, the GL_FRONT colorbuffer is actually a buffer in
|
|
main memory, rather than a window on your display.
|
|
|
|
The OSMesa API provides three basic functions for making off-screen
|
|
renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
|
|
OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for more
|
|
information about the API functions.
|
|
|
|
The OSMesa interface may be used with the gallium software renderers:
|
|
|
|
#. llvmpipe - this is the high-performance Gallium LLVM driver
|
|
#. softpipe - this it the reference Gallium software driver
|
|
|
|
There are several examples of OSMesa in the mesa/demos repository.
|
|
|
|
Building OSMesa
|
|
---------------
|
|
|
|
Configure and build Mesa with something like:
|
|
|
|
::
|
|
|
|
meson builddir -Dosmesa=true -Dgallium-drivers=swrast -Ddri-drivers=[] -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install
|
|
ninja -C builddir install
|
|
|
|
Make sure you have LLVM installed first if you want to use the llvmpipe
|
|
driver.
|
|
|
|
When the build is complete you should find:
|
|
|
|
::
|
|
|
|
$PWD/builddir/install/lib/libOSMesa.so
|
|
|
|
Set your LD_LIBRARY_PATH to point to $PWD/builddir/install to use the
|
|
libraries
|
|
|
|
When you link your application, link with -lOSMesa
|