blob: 0d5ac1e5a1580fb173722e7a0114811ba12d4277 [file] [log] [blame] [view]
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -06001The XGL Sample Intel driver supports Linux.
2
3System Requirements
4===================
5
Mike Stroyana768fc12014-10-30 15:59:54 -06006Ubuntu 14.04 LTS, (Ubuntu 14.10 needed for DRI 3 demos)
7
8sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev
9sudo apt-get build-dep mesa
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060010
11
12BUILD
13=====
14
Mike Stroyana768fc12014-10-30 15:59:54 -060015The sample driver uses cmake and should work with the usual cmake options and utilities.
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060016The standard build process builds the icd, the icd loader and all the tests.
17
18Example debug build:
19cd xgl # cd to the root of the xgl git repository
Mike Stroyana768fc12014-10-30 15:59:54 -060020export 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 Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060022cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug
23cd dbuild
24make
25
26To run XGL programs you must tell the icd loader where to find the libraries. Set the
27environment variable LIBXGL_DRIVERS_PATH to the driver path. For example:
Mike Stroyana768fc12014-10-30 15:59:54 -060028export LIBXGL_DRIVERS_PATH=$PWD/icd/intel
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060029
30TEST
31====
32
Mike Stroyana768fc12014-10-30 15:59:54 -060033The test executibles can be found in the dbuild/tests directory. The tests use the Google
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060034gtest infrastructure. Tests avilable so far:
35- xglinfo: Report GPU properties
36- xglbase: Test basic entry points
Mike Stroyana768fc12014-10-30 15:59:54 -060037- xgl_blit_tests: Test XGL Blits (copy, clear, and resolve)
Courtney Goeltzenleuchterb5fdda22014-09-01 18:05:45 -060038- 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
40the current directory at the end of the test.
Mike Stroyana768fc12014-10-30 15:59:54 -060041
42DEMOS
43=====
44
45The demos executibles can be found in the dbuild/demos directory. The demos use DRI 3
46to render directly onto window surfaces.
47- tri: a textured triangle
48- cube: a textured spinning cube
49
50RENDER NODES
51============
52
53The render tests depend on access to DRM render nodes.
54To make that available, a couple of config files need to be created to set a module option
55and make accessible device files.
56The system will need to be rebooted with these files in place to complete initialization.
57These commands will create the config files.
58
59sudo tee /etc/modprobe.d/drm.conf << EOF
60# Enable render nodes
61options drm rnodes=1
62EOF
63
64sudo tee /etc/udev/rules.d/drm.rules << EOF
65# Add permissions to render nodes
66SUBSYSTEM=="drm", ACTION=="add", DEVPATH=="/devices/*/renderD*", MODE="020666"
67EOF
68