diff options
author | Emma Anholt <emma@anholt.net> | 2023-04-03 10:16:10 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-04-04 20:00:17 +0000 |
commit | 3ede37f8a65be46ac1919878529f5a87d083323f (patch) | |
tree | 00c1189bdbe72873e246937f9688eaecb8f3b413 /docs | |
parent | c346413d9c3a9b9ee9da8d1d336a12a5bd529582 (diff) | |
download | mesa-3ede37f8a65be46ac1919878529f5a87d083323f.tar.gz mesa-3ede37f8a65be46ac1919878529f5a87d083323f.tar.bz2 mesa-3ede37f8a65be46ac1919878529f5a87d083323f.zip |
docs: Claim less functionality for glsl_compiler.
It doesn't generate GPU code, just GLSL IR code. Also, clarify where to
find the built tool, and what the options do.
Closes: #8674
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22271>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/shading.rst | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/docs/shading.rst b/docs/shading.rst index c7db4113e5b..bc3616819fc 100644 --- a/docs/shading.rst +++ b/docs/shading.rst @@ -131,16 +131,15 @@ Stand-alone GLSL Compiler ------------------------- The stand-alone GLSL compiler program can be used to compile GLSL -shaders into low-level GPU code. +shaders into GLSL IR code. This tool is useful for: -- Inspecting GPU code to gain insight into compilation -- Generating initial GPU code for subsequent hand-tuning +- Inspecting GLSL frontend behavior to gain insight into compilation - Debugging the GLSL compiler itself -After building Mesa, the compiler can be found at -src/compiler/glsl/glsl_compiler +After building Mesa with the ``-Dtools=glsl`` meson option, the compiler will be +installed as the binary ``glsl_compiler``. Here's an example of using the compiler to compile a vertex shader and emit :ext:`GL_ARB_vertex_program`-style instructions: @@ -151,10 +150,10 @@ emit :ext:`GL_ARB_vertex_program`-style instructions: Options include -- **--dump-ast** - dump GPU code +- **--dump-ast** - dump source syntax tree - **--dump-hir** - dump high-level IR code - **--dump-lir** - dump low-level IR code -- **--dump-builder** - dump GLSL IR code +- **--dump-builder** - dump C++ ir_builder code to generate the shader's GLSL IR - **--link** - link shaders - **--just-log** - display only shader / linker info if exist, without any header or separator |