blob: 0536ef956a8c35759e1c35c076b3faf3179be58c [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
9sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev
10sudo apt-get build-dep mesa
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060011
JensOwen95c62272014-11-01 13:05:43 -060012##Build
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060013
Mike Stroyana768fc12014-10-30 15:59:54 -060014The sample driver uses cmake and should work with the usual cmake options and utilities.
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060015The standard build process builds the icd, the icd loader and all the tests.
16
17Example debug build:
18cd xgl # cd to the root of the xgl git repository
Mike Stroyana768fc12014-10-30 15:59:54 -060019export 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 Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060021cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug
22cd dbuild
23make
24
25To run XGL programs you must tell the icd loader where to find the libraries. Set the
26environment variable LIBXGL_DRIVERS_PATH to the driver path. For example:
Mike Stroyana768fc12014-10-30 15:59:54 -060027export LIBXGL_DRIVERS_PATH=$PWD/icd/intel
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060028
JensOwen95c62272014-11-01 13:05:43 -060029##Test
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060030
Mike Stroyana768fc12014-10-30 15:59:54 -060031The test executibles can be found in the dbuild/tests directory. The tests use the Google
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060032gtest infrastructure. Tests avilable so far:
33- xglinfo: Report GPU properties
34- xglbase: Test basic entry points
Mike Stroyana768fc12014-10-30 15:59:54 -060035- xgl_blit_tests: Test XGL Blits (copy, clear, and resolve)
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060036- 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
38the current directory at the end of the test.
Mike Stroyana768fc12014-10-30 15:59:54 -060039
JensOwen95c62272014-11-01 13:05:43 -060040#Demos
Mike Stroyana768fc12014-10-30 15:59:54 -060041
JensOwen95c62272014-11-01 13:05:43 -060042The demos executables can be found in the dbuild/demos directory. The demos use DRI 3
Mike Stroyana768fc12014-10-30 15:59:54 -060043to render directly onto window surfaces.
44- tri: a textured triangle
45- cube: a textured spinning cube
46
JensOwen95c62272014-11-01 13:05:43 -060047#Render Nodes
Mike Stroyana768fc12014-10-30 15:59:54 -060048
49The render tests depend on access to DRM render nodes.
50To make that available, a couple of config files need to be created to set a module option
51and make accessible device files.
52The system will need to be rebooted with these files in place to complete initialization.
53These commands will create the config files.
54
55sudo tee /etc/modprobe.d/drm.conf << EOF
JensOwen95c62272014-11-01 13:05:43 -060056'# Enable render nodes
Mike Stroyana768fc12014-10-30 15:59:54 -060057options drm rnodes=1
58EOF
59
60sudo tee /etc/udev/rules.d/drm.rules << EOF
JensOwen95c62272014-11-01 13:05:43 -060061'# Add permissions to render nodes
Mike Stroyana768fc12014-10-30 15:59:54 -060062SUBSYSTEM=="drm", ACTION=="add", DEVPATH=="/devices/*/renderD*", MODE="020666"
63EOF
64