1*4882a593SmuzhiyunASM sources for auto generated shaders 2*4882a593Smuzhiyun====================================== 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunThe i915/gt/hsw_clear_kernel.c and i915/gt/ivb_clear_kernel.c files contain 5*4882a593Smuzhiyunpre-compiled batch chunks that will clear any residual render cache during 6*4882a593Smuzhiyuncontext switch. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunThey are generated from their respective platform ASM files present on 9*4882a593Smuzhiyuni915/gt/shaders/clear_kernel directory. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunThe generated .c files should never be modified directly. Instead, any modification 12*4882a593Smuzhiyunneeds to be done on the on their respective ASM files and build instructions below 13*4882a593Smuzhiyunneedes to be followed. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunBuilding 16*4882a593Smuzhiyun======== 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunEnvironment 19*4882a593Smuzhiyun----------- 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunIGT GPU tool scripts and the Mesa's i965 instruction assembler tool are used 22*4882a593Smuzhiyunon building. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunPlease make sure your Mesa tool is compiled with "-Dtools=intel" and 25*4882a593Smuzhiyun"-Ddri-drivers=i965", and run this script from IGT source root directory" 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunThe instructions bellow assume: 28*4882a593Smuzhiyun * IGT gpu tools source code is located on your home directory (~) as ~/igt 29*4882a593Smuzhiyun * Mesa source code is located on your home directory (~) as ~/mesa 30*4882a593Smuzhiyun and built under the ~/mesa/build directory 31*4882a593Smuzhiyun * Linux kernel source code is under your home directory (~) as ~/linux 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunInstructions 34*4882a593Smuzhiyun------------ 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/ivb.asm \ 37*4882a593Smuzhiyun ~/igt/lib/i915/shaders/clear_kernel/ivb.asm 38*4882a593Smuzhiyun~ $ cd ~/igt 39*4882a593Smuzhiyunigt $ ./scripts/generate_clear_kernel.sh -g ivb \ 40*4882a593Smuzhiyun -m ~/mesa/build/src/intel/tools/i965_asm 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun~ $ cp ~/linux/drivers/gpu/drm/i915/gt/shaders/clear_kernel/hsw.asm \ 43*4882a593Smuzhiyun ~/igt/lib/i915/shaders/clear_kernel/hsw.asm 44*4882a593Smuzhiyun~ $ cd ~/igt 45*4882a593Smuzhiyunigt $ ./scripts/generate_clear_kernel.sh -g hsw \ 46*4882a593Smuzhiyun -m ~/mesa/build/src/intel/tools/i965_asm