Skip to content

intel/compiler: add ability to override shader's assembly

Danylo Piliaiev requested to merge feature/shader-asm-override into master

When dumping shader's assembly with INTEL_DEBUG=vs,tcs,... sha1 of the resulting assembly is also printed, having environment variable INTEL_SHADER_ASM_READ_PATH present driver will try to load a "%sha1%.bin" file from the path and substitute current assembly with the one from the file.

The file with the assembly could be generated e.g. with:

./i965_asm --gen=kbl --type=bin test.txt -o 8a6b2ec7dbcf81f962a190408cb47931d20cc148.bin

The main current limitation is that one should be careful with jip offsets when changing the assembly especially with the instruction compaction (better use 'nocompact' debug option).

Merge request reports

Loading