1*61046927SAndroid Build Coastguard WorkerRunning traces on a local machine 2*61046927SAndroid Build Coastguard Worker================================= 3*61046927SAndroid Build Coastguard Worker 4*61046927SAndroid Build Coastguard WorkerPrerequisites 5*61046927SAndroid Build Coastguard Worker------------- 6*61046927SAndroid Build Coastguard Worker- Install `Apitrace <https://apitrace.github.io/>`__ 7*61046927SAndroid Build Coastguard Worker- Install `Renderdoc <https://renderdoc.org/>`__ (only needed for some traces) 8*61046927SAndroid Build Coastguard Worker- Download and compile `Piglit <https://gitlab.freedesktop.org/mesa/piglit>`__ and install his `dependencies <https://gitlab.freedesktop.org/mesa/piglit#2-setup>`__ 9*61046927SAndroid Build Coastguard Worker- Download traces you want to replay from `traces-db <https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db/>`__ 10*61046927SAndroid Build Coastguard Worker 11*61046927SAndroid Build Coastguard WorkerRunning single trace 12*61046927SAndroid Build Coastguard Worker-------------------- 13*61046927SAndroid Build Coastguard WorkerA simple run to see the output of the trace can be done with 14*61046927SAndroid Build Coastguard Worker 15*61046927SAndroid Build Coastguard Worker.. code-block:: sh 16*61046927SAndroid Build Coastguard Worker 17*61046927SAndroid Build Coastguard Worker apitrace replay -w name_of_trace.trace 18*61046927SAndroid Build Coastguard Worker 19*61046927SAndroid Build Coastguard WorkerFor more information, look into the `Apitrace documentation <https://github.com/apitrace/apitrace/blob/master/docs/USAGE.markdown>`__. 20*61046927SAndroid Build Coastguard Worker 21*61046927SAndroid Build Coastguard WorkerFor comparing checksums use: 22*61046927SAndroid Build Coastguard Worker 23*61046927SAndroid Build Coastguard Worker.. code-block:: sh 24*61046927SAndroid Build Coastguard Worker 25*61046927SAndroid Build Coastguard Worker cd piglit/replayer 26*61046927SAndroid Build Coastguard Worker export PIGLIT_SOURCE_DIR="../" 27*61046927SAndroid Build Coastguard Worker ./replayer.py compare trace -d test path/name_of_trace.trace 0 # replace with expected checksum 28*61046927SAndroid Build Coastguard Worker 29*61046927SAndroid Build Coastguard Worker 30*61046927SAndroid Build Coastguard WorkerSimulating CI trace job 31*61046927SAndroid Build Coastguard Worker----------------------- 32*61046927SAndroid Build Coastguard Worker 33*61046927SAndroid Build Coastguard WorkerSometimes it's useful to be able to test traces on your local machine instead of the Mesa CI runner. To simulate the CI environment as closely as possible. 34*61046927SAndroid Build Coastguard Worker 35*61046927SAndroid Build Coastguard WorkerDownload the YAML file from your driver's ``ci/`` directory and then change the path in the YAML file from local proxy or MinIO to the local directory (URL-like format ``file://``) 36*61046927SAndroid Build Coastguard Worker 37*61046927SAndroid Build Coastguard Worker.. code-block:: sh 38*61046927SAndroid Build Coastguard Worker 39*61046927SAndroid Build Coastguard Worker # The PIGLIT_REPLAY_DEVICE_NAME has to match name in the YAML file. 40*61046927SAndroid Build Coastguard Worker export PIGLIT_REPLAY_DEVICE_NAME='your_device_name' 41*61046927SAndroid Build Coastguard Worker export PIGLIT_REPLAY_DESCRIPTION_FILE='path_to_mesa_traces_file.yml' 42*61046927SAndroid Build Coastguard Worker ./piglit run -l verbose --timeout 300 -j10 replay ~/results/ 43*61046927SAndroid Build Coastguard Worker 44*61046927SAndroid Build Coastguard Worker 45*61046927SAndroid Build Coastguard WorkerNote: For replaying traces, you may need to allow higher GL and GLSL versions. You can achieve that by setting ``MESA_GLSL_VERSION_OVERRIDE`` and ``MESA_GL_VERSION_OVERRIDE``. 46