Age | Commit message (Collapse) | Author |
|
NOTE: This is a candidate for the 7.9 branch.
|
|
The new usage message lists possible command line options. (Newcomers to Mesa
currently have to trawl through the source to find the command line options,
and we should save them from that trouble.)
Example Output
--------------
usage: ./glsl_compiler [options] <file.vert | file.geom | file.frag>
Possible options are:
--glsl-es
--dump-ast
--dump-hir
--dump-lir
--link
|
|
Previously _LinkedShaders was a compact array of the linked shaders
for each shader stage. Now it is arranged such that each slot,
indexed by the MESA_SHADER_* defines, refers to a specific shader
stage. As a result, some slots will be NULL. This makes things a
little more complex in the linker, but it simplifies things in other
places.
As a side effect _NumLinkedShaders is removed.
NOTE: This may be a candidate for the 7.9 branch. If there are other
patches that get backported to 7.9 that use _LinkedShader, this patch
should be cherry picked also.
|
|
|
|
This increases the chance that GLSL programs will actually work.
Note that continues and returns are not yet lowered, so linking
will just fail if not supported.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.
|
|
Create a dummy context in the standalone compiler and pass it to
_mesa_glsl_parse_state.
|
|
Also define it if #version 100 is encountered.
|
|
|
|
|
|
|
|
Whereas constant folding evaluates constant expressions at rvalue
nodes, constant propagation tracks constant components of vectors
across execution to replace (possibly swizzled) variable dereferences
with constant values, triggering possible constant folding or reduced
variable liveness.
|
|
|
|
|
|
This way, we don't need to pass in a parse state, and the context
doesn't grow with the number of passes through optimization.
|
|
This cleans up the assembly output of almost all the non-logic tests
glsl-algebraic-*. glsl-algebraic-pow-two needs love (basically,
flattening to a temporary and squaring it).
|
|
ir_to_mesa was updated for the _mesa_glsl_parse_state constructor
changes, but main.cpp was not.
|
|
This is an invasive set of changes. Each user shader tracks a set of other
shaders that contain built-in functions. During compilation, function
prototypes are imported from these shaders. During linking, the
shaders are linked with these built-in-function shaders just like with
any other shader.
|
|
|
|
Fixes:
glsl1-built-in constants
|
|
|
|
|
|
|
|
Most places in the code simply use a static name, which works because
names are never used to look up an ir_variable. generate_temporary is
simply unnecessary (and looks like it would leak memory, and isn't
thread safe...)
|
|
The Mesa IR needs this to support vector indexing correctly, and
hardware backends such as 915 would want this behavior as well.
Fixes glsl-vs-vec4-indexing-2.
|
|
|
|
The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
|
|
The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
|
|
|
|
|
|
|
|
This avoids more allocation and shuffling of data around.
|
|
This saves recompiling at link time. gl_shader->ir is made a pointer
so that we don't have to bring exec_list into mtypes.h.
|
|
|
|
|
|
|
|
This cuts runtime by around 20% from talloc_parent() lookups.
|
|
|