162306a36Sopenharmony_ciASM sources for auto generated shaders
262306a36Sopenharmony_ci======================================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciThe i915/gt/hsw_clear_kernel.c and i915/gt/ivb_clear_kernel.c files contain
562306a36Sopenharmony_cipre-compiled batch chunks that will clear any residual render cache during
662306a36Sopenharmony_cicontext switch.
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciThey are generated from their respective platform ASM files present on
962306a36Sopenharmony_cii915/gt/shaders/clear_kernel directory.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciThe generated .c files should never be modified directly. Instead, any modification
1262306a36Sopenharmony_cineeds to be done on the on their respective ASM files and build instructions below
1362306a36Sopenharmony_cineedes to be followed.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciBuilding
1662306a36Sopenharmony_ci========
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciEnvironment
1962306a36Sopenharmony_ci-----------
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciIGT GPU tool scripts and the Mesa's i965 instruction assembler tool are used
2262306a36Sopenharmony_cion building.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciPlease make sure your Mesa tool is compiled with "-Dtools=intel" and
2562306a36Sopenharmony_ci"-Ddri-drivers=i965", and run this script from IGT source root directory"
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ciThe instructions bellow assume:
2862306a36Sopenharmony_ci    *  IGT gpu tools source code is located on your home directory (~) as ~/igt
2962306a36Sopenharmony_ci    *  Mesa source code is located on your home directory (~) as ~/mesa
3062306a36Sopenharmony_ci       and built under the ~/mesa/build directory
3162306a36Sopenharmony_ci    *  Linux kernel source code is under your home directory (~) as ~/linux
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ciInstructions
3462306a36Sopenharmony_ci------------
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm \
3762306a36Sopenharmony_ci       ~/igt/lib/i915/shaders/clear_kernel/ivb.asm
3862306a36Sopenharmony_ci~ $ cd ~/igt
3962306a36Sopenharmony_ciigt $ ./scripts/generate_clear_kernel.sh -g ivb \
4062306a36Sopenharmony_ci      -m ~/mesa/build/src/intel/tools/i965_asm
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm \
4362306a36Sopenharmony_ci    ~/igt/lib/i915/shaders/clear_kernel/hsw.asm
4462306a36Sopenharmony_ci~ $ cd ~/igt
4562306a36Sopenharmony_ciigt $ ./scripts/generate_clear_kernel.sh -g hsw \
4662306a36Sopenharmony_ci      -m ~/mesa/build/src/intel/tools/i965_asm