blob: 19b11c7732f1ab439f8f4dab6958c2bbc1f704c1 [file] [log] [blame] [view]
JensOwen95c62272014-11-01 13:05:43 -06001# Build Instructions
2This project supports Linux today.
3Support for Windows will start in Q1'15.
4Support for Android is TBD.
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -06005
JensOwen95c62272014-11-01 13:05:43 -06006##System Requirements
Mike Stroyana768fc12014-10-30 15:59:54 -06007Ubuntu 14.04 LTS, (Ubuntu 14.10 needed for DRI 3 demos)
8
JensOwenef271142014-11-01 13:11:50 -06009```
Norbert Nopper86647a92015-01-22 20:47:49 +010010sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev libmagickwand-dev qt5-default
Mike Stroyana768fc12014-10-30 15:59:54 -060011sudo apt-get build-dep mesa
JensOwenef271142014-11-01 13:11:50 -060012```
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060013
JensOwen95c62272014-11-01 13:05:43 -060014##Build
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060015
Mike Stroyana768fc12014-10-30 15:59:54 -060016The sample driver uses cmake and should work with the usual cmake options and utilities.
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060017The standard build process builds the icd, the icd loader and all the tests.
18
19Example debug build:
JensOwenef271142014-11-01 13:11:50 -060020```
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060021cd xgl # cd to the root of the xgl git repository
Mike Stroyana768fc12014-10-30 15:59:54 -060022export KHRONOS_ACCOUNT_NAME= <subversion login name for svn checkout of BIL>
23./update_external_sources.sh # fetches and builds glslang, llvm, LunarGLASS, and BIL
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060024cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug
25cd dbuild
26make
JensOwenef271142014-11-01 13:11:50 -060027```
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060028
29To run XGL programs you must tell the icd loader where to find the libraries. Set the
30environment variable LIBXGL_DRIVERS_PATH to the driver path. For example:
JensOwenef271142014-11-01 13:11:50 -060031```
Mike Stroyana768fc12014-10-30 15:59:54 -060032export LIBXGL_DRIVERS_PATH=$PWD/icd/intel
JensOwenef271142014-11-01 13:11:50 -060033```
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060034
JensOwen95c62272014-11-01 13:05:43 -060035##Test
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060036
Mike Stroyana768fc12014-10-30 15:59:54 -060037The test executibles can be found in the dbuild/tests directory. The tests use the Google
Norbert Nopper9652dfd2015-01-22 20:52:34 +010038gtest infrastructure. Tests available so far:
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060039- xglinfo: Report GPU properties
40- xglbase: Test basic entry points
Mike Stroyana768fc12014-10-30 15:59:54 -060041- xgl_blit_tests: Test XGL Blits (copy, clear, and resolve)
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060042- xgl_image_tests: Test XGL image related calls needed by render_test
43- xgl_render_tests: Render a single triangle with XGL. Triangle will be in a .ppm in
44the current directory at the end of the test.
Mike Stroyana768fc12014-10-30 15:59:54 -060045
JensOwen84de2502014-11-01 13:19:54 -060046##Demos
Mike Stroyana768fc12014-10-30 15:59:54 -060047
JensOwen95c62272014-11-01 13:05:43 -060048The demos executables can be found in the dbuild/demos directory. The demos use DRI 3
Mike Stroyana768fc12014-10-30 15:59:54 -060049to render directly onto window surfaces.
50- tri: a textured triangle
51- cube: a textured spinning cube
52
JensOwen84de2502014-11-01 13:19:54 -060053##Render Nodes
Mike Stroyana768fc12014-10-30 15:59:54 -060054
55The render tests depend on access to DRM render nodes.
56To make that available, a couple of config files need to be created to set a module option
57and make accessible device files.
58The system will need to be rebooted with these files in place to complete initialization.
59These commands will create the config files.
60
JensOwenef271142014-11-01 13:11:50 -060061```
Mike Stroyana768fc12014-10-30 15:59:54 -060062sudo tee /etc/modprobe.d/drm.conf << EOF
JensOwenef271142014-11-01 13:11:50 -060063# Enable render nodes
Mike Stroyana768fc12014-10-30 15:59:54 -060064options drm rnodes=1
65EOF
Courtney Goeltzenleuchtera1099442015-01-07 17:46:53 -070066# this will add the rnodes=1 option into the boot environment
67sudo update-initramfs -k all -u
JensOwen3ceb4752014-11-01 13:18:21 -060068```
69```
Mike Stroyana768fc12014-10-30 15:59:54 -060070sudo tee /etc/udev/rules.d/drm.rules << EOF
JensOwenef271142014-11-01 13:11:50 -060071# Add permissions to render nodes
Mike Stroyana768fc12014-10-30 15:59:54 -060072SUBSYSTEM=="drm", ACTION=="add", DEVPATH=="/devices/*/renderD*", MODE="020666"
73EOF
JensOwenef271142014-11-01 13:11:50 -060074```
Norbert Nopper62b69ab2015-01-22 21:06:03 +010075