<commit_before>primus
======

Primus is a shared library that provides OpenGL and GLX APIs and
implements low-overhead
local-only client-side OpenGL offloading via GLX forking, similar to
VirtualGL.  It intercepts GLX calls and redirects GL rendering to a
secondary X display, presumably driven by a faster GPU. On swapping
buffers, rendered contents are read back using a PBO and copied onto
the drawable it was supposed to be rendered on in the first place.

Both original and shadow GL contexts can use direct rendering.

A simple shell script, `primusrun`, is provided to help with testing.

At the moment primus does not advertise any GLX extensions to the client.

Building for multilib (32-bit + 64-bit) systems
-----------------------------------------------

    LIBDIR=lib make && CXX=g++\ -m32 LIBDIR=lib32 make

Adjust `LIBDIR` variables above as appropriate for your distribution
(reflecting how `/usr/lib*` are named):

* Arch needs `lib` and `lib32` as above
* Gentoo needs `lib64` and `lib32`
* RPM-based may need `lib64` and `lib`

On benchmarking
---------------

Please note that VirtualGL does not really display all frames it
gets from the offload slave.  By default, primus does render all frames
it gets from the secondary server, except when the display thread
locks up for longer than 20 milliseconds.

For an interesting comparison, play around with `ipers` from mesa-demos.<commit_msg>Add Debian doc<commit_after>primus
======

Primus is a shared library that provides OpenGL and GLX APIs and
implements low-overhead
local-only client-side OpenGL offloading via GLX forking, similar to
VirtualGL.  It intercepts GLX calls and redirects GL rendering to a
secondary X display, presumably driven by a faster GPU. On swapping
buffers, rendered contents are read back using a PBO and copied onto
the drawable it was supposed to be rendered on in the first place.

Both original and shadow GL contexts can use direct rendering.

A simple shell script, `primusrun`, is provided to help with testing.

At the moment primus does not advertise any GLX extensions to the client.

Building for multilib (32-bit + 64-bit) systems
-----------------------------------------------

    LIBDIR=lib make && CXX=g++\ -m32 LIBDIR=lib32 make

Adjust `LIBDIR` variables above as appropriate for your distribution
(reflecting how `/usr/lib*` are named):

* Arch needs `lib` and `lib32` as above
* Gentoo needs `lib64` and `lib32`
* RPM-based may need `lib64` and `lib`
* Debian (with multiarch) needs `lib/x86_64-linux-gnu` and `lib/i386-linux-gnu`

On benchmarking
---------------

Please note that VirtualGL does not really display all frames it
gets from the offload slave.  By default, primus does render all frames
it gets from the secondary server, except when the display thread
locks up for longer than 20 milliseconds.

For an interesting comparison, play around with `ipers` from mesa-demos.
{'fraction_non_alphanumeric': 0.0981067125645439, 'fraction_numerical': 0.014802065404475043, 'mean_word_length': 3.5908372827804107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '392795', 'n_tokens_mistral': 822, 'n_tokens_neox': 765, 'n_words': 412}