| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 1 | The XGL Sample Intel driver supports Linux. |
| 2 | |
| 3 | System Requirements |
| 4 | =================== |
| 5 | |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 6 | Ubuntu 14.04 LTS, (Ubuntu 14.10 needed for DRI 3 demos) |
| 7 | |
| 8 | sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev |
| 9 | sudo apt-get build-dep mesa |
| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 10 | |
| 11 | |
| 12 | BUILD |
| 13 | ===== |
| 14 | |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 15 | The sample driver uses cmake and should work with the usual cmake options and utilities. |
| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 16 | The standard build process builds the icd, the icd loader and all the tests. |
| 17 | |
| 18 | Example debug build: |
| 19 | cd xgl # cd to the root of the xgl git repository |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 20 | export KHRONOS_ACCOUNT_NAME= <subversion login name for svn checkout of BIL> |
| 21 | ./update_external_sources.sh # fetches and builds glslang, llvm, LunarGLASS, and BIL |
| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 22 | cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug |
| 23 | cd dbuild |
| 24 | make |
| 25 | |
| 26 | To run XGL programs you must tell the icd loader where to find the libraries. Set the |
| 27 | environment variable LIBXGL_DRIVERS_PATH to the driver path. For example: |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 28 | export LIBXGL_DRIVERS_PATH=$PWD/icd/intel |
| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 29 | |
| 30 | TEST |
| 31 | ==== |
| 32 | |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 33 | The test executibles can be found in the dbuild/tests directory. The tests use the Google |
| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 34 | gtest infrastructure. Tests avilable so far: |
| 35 | - xglinfo: Report GPU properties |
| 36 | - xglbase: Test basic entry points |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 37 | - xgl_blit_tests: Test XGL Blits (copy, clear, and resolve) |
| Courtney Goeltzenleuchter | b5fdda2 | 2014-09-01 18:05:45 -0600 | [diff] [blame] | 38 | - xgl_image_tests: Test XGL image related calls needed by render_test |
| 39 | - xgl_render_tests: Render a single triangle with XGL. Triangle will be in a .ppm in |
| 40 | the current directory at the end of the test. |
| Mike Stroyan | a768fc1 | 2014-10-30 15:59:54 -0600 | [diff] [blame] | 41 | |
| 42 | DEMOS |
| 43 | ===== |
| 44 | |
| 45 | The demos executibles can be found in the dbuild/demos directory. The demos use DRI 3 |
| 46 | to render directly onto window surfaces. |
| 47 | - tri: a textured triangle |
| 48 | - cube: a textured spinning cube |
| 49 | |
| 50 | RENDER NODES |
| 51 | ============ |
| 52 | |
| 53 | The render tests depend on access to DRM render nodes. |
| 54 | To make that available, a couple of config files need to be created to set a module option |
| 55 | and make accessible device files. |
| 56 | The system will need to be rebooted with these files in place to complete initialization. |
| 57 | These commands will create the config files. |
| 58 | |
| 59 | sudo tee /etc/modprobe.d/drm.conf << EOF |
| 60 | # Enable render nodes |
| 61 | options drm rnodes=1 |
| 62 | EOF |
| 63 | |
| 64 | sudo tee /etc/udev/rules.d/drm.rules << EOF |
| 65 | # Add permissions to render nodes |
| 66 | SUBSYSTEM=="drm", ACTION=="add", DEVPATH=="/devices/*/renderD*", MODE="020666" |
| 67 | EOF |
| 68 | |