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>
This commit is contained in:
@@ -131,16 +131,15 @@ Stand-alone GLSL Compiler
|
|||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
The stand-alone GLSL compiler program can be used to compile GLSL
|
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:
|
This tool is useful for:
|
||||||
|
|
||||||
- Inspecting GPU code to gain insight into compilation
|
- Inspecting GLSL frontend behavior to gain insight into compilation
|
||||||
- Generating initial GPU code for subsequent hand-tuning
|
|
||||||
- Debugging the GLSL compiler itself
|
- Debugging the GLSL compiler itself
|
||||||
|
|
||||||
After building Mesa, the compiler can be found at
|
After building Mesa with the ``-Dtools=glsl`` meson option, the compiler will be
|
||||||
src/compiler/glsl/glsl_compiler
|
installed as the binary ``glsl_compiler``.
|
||||||
|
|
||||||
Here's an example of using the compiler to compile a vertex shader and
|
Here's an example of using the compiler to compile a vertex shader and
|
||||||
emit :ext:`GL_ARB_vertex_program`-style instructions:
|
emit :ext:`GL_ARB_vertex_program`-style instructions:
|
||||||
@@ -151,10 +150,10 @@ emit :ext:`GL_ARB_vertex_program`-style instructions:
|
|||||||
|
|
||||||
Options include
|
Options include
|
||||||
|
|
||||||
- **--dump-ast** - dump GPU code
|
- **--dump-ast** - dump source syntax tree
|
||||||
- **--dump-hir** - dump high-level IR code
|
- **--dump-hir** - dump high-level IR code
|
||||||
- **--dump-lir** - dump low-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
|
- **--link** - link shaders
|
||||||
- **--just-log** - display only shader / linker info if exist, without
|
- **--just-log** - display only shader / linker info if exist, without
|
||||||
any header or separator
|
any header or separator
|
||||||
|
Reference in New Issue
Block a user