docs: add INTEL_SHADER_ASM_READ_PATH description
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Mon, 28 Sep 2020 16:29:42 +0000 (19:29 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 29 Sep 2020 09:57:41 +0000 (09:57 +0000)
It was implemented in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/955

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6895>

docs/envvars.rst

index c0f568a..fa414bd 100644 (file)
@@ -331,6 +331,20 @@ i945/i965 driver environment variables (non-Gallium)
 ``INTEL_PRECISE_TRIG``
    if set to 1, true or yes, then the driver prefers accuracy over
    performance in trig functions.
+``INTEL_SHADER_ASM_READ_PATH``
+   if set, determines the directory to be used for overriding shader
+   assembly. The binaries with custom assembly should be placed in
+   this folder and have a name formatted as ``sha1_of_assembly.bin``.
+   The sha1 of a shader assembly is printed when assembly is dumped via
+   corresponding ``INTEL_DEBUG`` flag (e.g. ``vs`` for vertex shader).
+   A binary could be generated from a dumped assembly by ``i965_asm``.
+   For ``INTEL_SHADER_ASM_READ_PATH`` to work it is necessary to enable
+   dumping of corresponding shader stages via ``INTEL_DEBUG``.
+   It is advised to use ``nocompact`` flag of ``INTEL_DEBUG`` when
+   dumping and overriding shader assemblies.
+   The success of assembly override would be signified by "Successfully
+   overrode shader with sha1 <sha1>" in stderr replacing the original
+   assembly.
 
 Radeon driver environment variables (radeon, r200, and r300g)
 -------------------------------------------------------------