summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/shaders/README
blob: e7e96d7073c7ea899bafb7fa6c5c8c7ee249ef50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ASM sources for auto generated shaders
======================================

The i915/gt/hsw_clear_kernel.c and i915/gt/ivb_clear_kernel.c files contain
pre-compiled batch chunks that will clear any residual render cache during
context switch.

They are generated from their respective platform ASM files present on
i915/gt/shaders/clear_kernel directory.

The generated .c files should never be modified directly. Instead, any modification
needs to be done on the on their respective ASM files and build instructions below
needes to be followed.

Building
========

Environment
-----------

IGT GPU tool scripts and the Mesa's i965 instruction assembler tool are used
on building.

Please make sure your Mesa tool is compiled with "-Dtools=intel" and
"-Ddri-drivers=i965", and run this script from IGT source root directory"

The instructions bellow assume:
    *  IGT gpu tools source code is located on your home directory (~) as ~/igt
    *  Mesa source code is located on your home directory (~) as ~/mesa
       and built under the ~/mesa/build directory
    *  Linux kernel source code is under your home directory (~) as ~/linux

Instructions
------------

~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm \
       ~/igt/lib/i915/shaders/clear_kernel/ivb.asm
~ $ cd ~/igt
igt $ ./scripts/generate_clear_kernel.sh -g ivb \
      -m ~/mesa/build/src/intel/tools/i965_asm

~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm \
    ~/igt/lib/i915/shaders/clear_kernel/hsw.asm
~ $ cd ~/igt
igt $ ./scripts/generate_clear_kernel.sh -g hsw \
      -m ~/mesa/build/src/intel/tools/i965_asm