.\" Initially generated by help2man 1.47.4. .TH GLSLANGVALIDATOR "1" "December 2017" "glslangValidator" .SH NAME glslangValidator \- OpenGL (ES) Shading Language Reference Compiler .SH SYNOPSIS .B glslangValidator [\fI\,OPTION\/\fR]... [\fI\,FILE\/\fR]... .SH DESCRIPTION Glslang is the official reference compiler front end for the OpenGL ES and OpenGL shading languages. It implements a strict interpretation of the specifications for these languages. It is open and free for anyone to use, either from a command line or programmatically. The OpenGL and OpenGL ES working groups are committed to maintaining consistency between the reference compiler and the corresponding shading language specifications. The purpose of the reference compiler is to identify shader portability issues. If glslang accepts a shader without errors, then all OpenGL and OpenGL ES implementations claiming to support the shader's language version should also accept the shader without errors. Likewise, if glslang reports an error when compiling a shader, all OpenGL and OpenGL ES implementations for that language version should report errors, unless the glslang errors are caused by differences in implementation-defined limits or extension support. Glslang can also be used to generate SPIR-V from GLSL. But this feature is experimental and non-optimized. .SH FILE The file extension of \&\fI\,FILE\/\fR results in auto-stage classification: .TP \&.conf to provide a config file that replaces the default configuration (see \fB\-c\fR option below for generating a template) .TP \&.vert for a vertex shader .TP \&.tesc for a tessellation control shader .TP \&.tese for a tessellation evaluation shader .TP \&.geom for a geometry shader .TP \&.frag for a fragment shader .TP \&.comp for a compute shader .SH OPTIONS .TP \fB\-C\fR cascading errors; risk crash from accumulation of error recoveries .TP \fB\-D\fR input is HLSL .HP \fB\-D\fR .TP \fB\-D\fR define a pre\-processor macro .TP \fB\-E\fR print pre\-processed GLSL; cannot be used with \fB\-l\fR; errors will appear on stderr. .TP \fB\-G[ver]\fR create SPIR\-V binary, under OpenGL semantics; turns on \fB\-l\fR; default file name is .spv (\fB\-o\fR overrides this) 'ver', when present, is the version of the input semantics, which will appear in #define GL_SPIRV ver. \fB\-\-client opengl100\fR is the same as \fB\-G100\fR and \fB\-\-target\-env\fR for OpenGL will also imply \fB\-G\fR .TP \fB\-H\fR print human readable form of SPIR\-V; turns on \fB\-V\fR .TP \fB\-I\fR add dir to the include search path; includer's directory is searched first, followed by left\-to\-right order of \fB\-I\fR .TP \fB\-Od\fR disables optimization. May cause illegal SPIR\-V for HLSL. .TP \fB\-Os\fR optimizes SPIR\-V to minimize size. .TP \fB\-S\fR uses specified stage rather than parsing the file extension choices for are vert, tesc, tese, geom, frag, or comp .TP \fB\-U\fR undefine a pre\-processor macro .TP \fB\-V[ver]\fR create SPIR\-V binary, under Vulkan semantics; turns on \fB\-l\fR; default file name is .spv (\fB\-o\fR overrides this) 'ver', when present, is the version of the input semantics, which will appear in #define VULKAN ver. \fB\-\-client vulkan100\fR is the same as \fB\-V100\fR and \fB\-\-target\-env\fR for Vulkan will also imply \fB\-V\fR .TP \fB\-c\fR configuration dump; creates the default configuration file (redirect to a .conf file) .TP \fB\-d\fR default to desktop (#version 110) when there is no shader #version (default is ES version 100) .TP \fB\-e\fR specify as the entry\-point name .TP \fB\-g\fR generate debug information .TP \fB\-h\fR print this usage message .TP \fB\-i\fR intermediate tree (glslang AST) is printed out .TP \fB\-l\fR link all input files together to form a single module .TP \fB\-m\fR memory leak mode .TP \fB\-o\fR save binary to , requires a binary option (e.g., \fB\-V\fR) .TP \fB\-q\fR dump reflection query database .TP \fB\-r\fR synonym for \fB\-\-relaxed\-errors\fR .TP \fB\-s\fR silence syntax and semantic error reporting .TP \fB\-t\fR multi\-threaded mode .TP \fB\-v\fR print version strings .TP \fB\-w\fR synonym for \fB\-\-suppress\-warnings\fR .TP \fB\-x\fR save binary output as text\-based 32\-bit hexadecimal numbers .TP \fB\-\-auto\-map\-bindings\fR automatically bind uniform variables without explicit bindings. .TP \fB\-\-amb\fR synonym for \fB\-\-auto\-map\-bindings\fR .TP \fB\-\-auto\-map\-locations\fR automatically locate input/output lacking 'location' (fragile, not cross stage) .TP \fB\-\-aml\fR synonym for \fB\-\-auto\-map\-locations\fR .TP \fB\-\-client\fR {vulkan|opengl} see \fB\-V\fR and \fB\-G\fR .TP \fB\-\-flatten\-uniform\-arrays\fR flatten uniform texture/sampler arrays to scalars .TP \fB\-\-fua\fR synonym for \fB\-\-flatten\-uniform\-arrays\fR .TP \fB\-\-hlsl\-offsets\fR Allow block offsets to follow HLSL rules. Works independently of source language .TP \fB\-\-hlsl\-iomap\fR Perform IO mapping in HLSL register space .TP \fB\-\-keep\-uncalled\fR don't eliminate uncalled functions .TP \fB\-\-ku\fR synonym for \fB\-\-keep\-uncalled\fR .TP \fB\-\-no\-storage\-format\fR use Unknown image format .TP \fB\-\-nsf\fR synonym for \fB\-\-no\-storage\-format\fR .TP \fB\-\-relaxed\-errors\fR relaxed GLSL semantic error\-checking mode .HP \fB\-\-resource\-set\-binding\fR [stage] name set binding .IP Set descriptor set and binding for individual resources .HP \fB\-\-resource\-set\-binding\fR [stage] set .IP Set descriptor set for all resources .TP \fB\-\-rsb\fR [stage] type set binding synonym for \fB\-\-resource\-set\-binding\fR .TP \fB\-\-shift\-image\-binding\fR [stage] num base binding number for images (uav) .HP \fB\-\-shift\-image\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-sib\fR [stage] num synonym for \fB\-\-shift\-image\-binding\fR .TP \fB\-\-shift\-sampler\-binding\fR [stage] num base binding number for samplers .HP \fB\-\-shift\-sampler\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-ssb\fR [stage] num synonym for \fB\-\-shift\-sampler\-binding\fR .TP \fB\-\-shift\-ssbo\-binding\fR [stage] num base binding number for SSBOs .HP \fB\-\-shift\-ssbo\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-sbb\fR [stage] num synonym for \fB\-\-shift\-ssbo\-binding\fR .TP \fB\-\-shift\-texture\-binding\fR [stage] num base binding number for textures .HP \fB\-\-shift\-texture\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-stb\fR [stage] num synonym for \fB\-\-shift\-texture\-binding\fR .TP \fB\-\-shift\-uav\-binding\fR [stage] num base binding number for UAVs .HP \fB\-\-shift\-uav\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-suavb\fR [stage] num synonym for \fB\-\-shift\-uav\-binding\fR .TP \fB\-\-shift\-UBO\-binding\fR [stage] num base binding number for UBOs .HP \fB\-\-shift\-UBO\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-shift\-cbuffer\-binding\fR [stage] num synonym for \fB\-\-shift\-UBO\-binding\fR .HP \fB\-\-shift\-cbuffer\-binding\fR [stage] [num set]... per\-descriptor\-set shift values .TP \fB\-\-sub\fR [stage] num synonym for \fB\-\-shift\-UBO\-binding\fR .TP \fB\-\-source\-entrypoint\fR the given shader source function is renamed to be the given in \fB\-e\fR .TP \fB\-\-sep\fR synonym for \fB\-\-source\-entrypoint\fR .TP \fB\-\-stdin\fR Read from stdin instead of from a file. You'll have to provide the shader stageusing \fB\-S\fR. .TP \fB\-\-suppress\-warnings\fR suppress GLSL warnings (except as required by #extension : warn) .TP \fB\-\-target\-env\fR {vulkan1.0|opengl} set the execution environment code will execute in (as opposed to language semantics selected by \fB\-\-client\fR) defaults: 'vulkan1.0' under \fB\-\-client vulkan\fR 'opengl' under \fB\-\-client opengl\fR .TP \fB\-\-variable\-name\fR Creates a C header file that contains a uint32_t array named initialized with the shader binary code. .TP \fB\-\-vn\fR synonym for \fB\-\-variable\-name\fR .SH ALSO SEE https://github.com/KhronosGroup/glslang https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/