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