18c2ecf20Sopenharmony_ciASM sources for auto generated shaders
28c2ecf20Sopenharmony_ci======================================
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciThe i915/gt/hsw_clear_kernel.c and i915/gt/ivb_clear_kernel.c files contain
58c2ecf20Sopenharmony_cipre-compiled batch chunks that will clear any residual render cache during
68c2ecf20Sopenharmony_cicontext switch.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciThey are generated from their respective platform ASM files present on
98c2ecf20Sopenharmony_cii915/gt/shaders/clear_kernel directory.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciThe generated .c files should never be modified directly. Instead, any modification
128c2ecf20Sopenharmony_cineeds to be done on the on their respective ASM files and build instructions below
138c2ecf20Sopenharmony_cineedes to be followed.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciBuilding
168c2ecf20Sopenharmony_ci========
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciEnvironment
198c2ecf20Sopenharmony_ci-----------
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciIGT GPU tool scripts and the Mesa's i965 instruction assembler tool are used
228c2ecf20Sopenharmony_cion building.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciPlease make sure your Mesa tool is compiled with "-Dtools=intel" and
258c2ecf20Sopenharmony_ci"-Ddri-drivers=i965", and run this script from IGT source root directory"
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciThe instructions bellow assume:
288c2ecf20Sopenharmony_ci    *  IGT gpu tools source code is located on your home directory (~) as ~/igt
298c2ecf20Sopenharmony_ci    *  Mesa source code is located on your home directory (~) as ~/mesa
308c2ecf20Sopenharmony_ci       and built under the ~/mesa/build directory
318c2ecf20Sopenharmony_ci    *  Linux kernel source code is under your home directory (~) as ~/linux
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciInstructions
348c2ecf20Sopenharmony_ci------------
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm \
378c2ecf20Sopenharmony_ci       ~/igt/lib/i915/shaders/clear_kernel/ivb.asm
388c2ecf20Sopenharmony_ci~ $ cd ~/igt
398c2ecf20Sopenharmony_ciigt $ ./scripts/generate_clear_kernel.sh -g ivb \
408c2ecf20Sopenharmony_ci      -m ~/mesa/build/src/intel/tools/i965_asm
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm \
438c2ecf20Sopenharmony_ci    ~/igt/lib/i915/shaders/clear_kernel/hsw.asm
448c2ecf20Sopenharmony_ci~ $ cd ~/igt
458c2ecf20Sopenharmony_ciigt $ ./scripts/generate_clear_kernel.sh -g hsw \
468c2ecf20Sopenharmony_ci      -m ~/mesa/build/src/intel/tools/i965_asm