summaryrefslogtreecommitdiffstats
path: root/src/glsl/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'draw-instanced'Brian Paul2011-01-151-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_llvm.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/glsl/ir_set_program_inouts.cpp src/mesa/tnl/t_vb_program.c
| * glsl: add support for system values and GL_ARB_draw_instancedBrian Paul2010-12-081-0/+1
| |
* | glsl: fix implicit int to bool warningBrian Paul2011-01-141-1/+1
| | | | | | | | Maybe preprocess() should return a bool.
* | glsl: Make builtin_compiler portable for non-unices.José Fonseca2011-01-121-31/+28
| |
* | glsl: Use do_common_optimization in the standalone compiler.Kenneth Graunke2010-11-251-20/+1
|/ | | | NOTE: This is a candidate for the 7.9 branch.
* glsl: Improve usage message for glsl_compilerChad Versace2010-11-171-9/+19
| | | | | | | | | | | | | | | | | 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
* glsl: Slightly change the semantic of _LinkedShadersIan Romanick2010-10-141-1/+12
| | | | | | | | | | | | | | | 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.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-6/+6
|
* glsl: add several EmitNo* options, and MaxUnrollIterationsLuca Barbieri2010-09-081-1/+1
| | | | | | | | | 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 <[email protected]>
* glsl: Support GLSL ES in the standalone compile.Chia-I Wu2010-09-081-1/+3
| | | | GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.
* glsl: Require a context in _mesa_glsl_parse_state.Chia-I Wu2010-09-081-6/+41
| | | | | Create a dummy context in the standalone compiler and pass it to _mesa_glsl_parse_state.
* glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke2010-09-071-1/+1
| | | | Also define it if #version 100 is encountered.
* glsl2: Add module to perform simple loop unrollingIan Romanick2010-09-031-1/+2
|
* glsl2: Perform initial bits of loop analysis during compilationIan Romanick2010-09-031-0/+5
|
* mesa: Free old linked shaders when relinking new shaders.Eric Anholt2010-08-181-1/+5
|
* glsl2: Add constant propagation.Eric Anholt2010-08-091-0/+1
| | | | | | | | 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.
* glsl2: Clean-up two 'unused variable' warningsIan Romanick2010-08-021-0/+3
|
* glsl2: Add new tree grafting optimization pass.Eric Anholt2010-07-311-0/+1
|
* glsl2: Make the dead code handler make its own talloc context.Eric Anholt2010-07-271-1/+1
| | | | | 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.
* glsl2: Add optimization pass for algebraic simplifications.Eric Anholt2010-07-271-0/+1
| | | | | | 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).
* glsl2: Fix standalone compiler to not crash horribly.Kenneth Graunke2010-07-221-41/+4
| | | | | ir_to_mesa was updated for the _mesa_glsl_parse_state constructor changes, but main.cpp was not.
* linker: Link built-in functions instead of including them in every shaderIan Romanick2010-07-211-0/+4
| | | | | | | | 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.
* glsl2: Implement utility routine to talloc reparent an IR treeIan Romanick2010-07-201-9/+1
|
* glsl2: Add definitions of the builtin constants present in GLSL 1.10.Eric Anholt2010-07-201-1/+18
| | | | | Fixes: glsl1-built-in constants
* glsl2: Don't validate IR if there were compilation errorsIan Romanick2010-07-201-3/+3
|
* linker: Track and validate GLSL versions used in shadersIan Romanick2010-07-191-0/+1
|
* linker: Stub-out intrastage linkerIan Romanick2010-07-121-0/+22
|
* glsl2: Remove generate_temporary and global temporary counter.Kenneth Graunke2010-07-081-1/+0
| | | | | | | 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...)
* glsl2: Add pass for supporting variable vector indexing in rvalues.Eric Anholt2010-07-061-0/+1
| | | | | | | 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.
* glsl2: Print the linking info log in the stand-alone compilerIan Romanick2010-07-021-0/+3
|
* glsl2: Conditionally allow optional extensions to be enabledIan Romanick2010-07-011-0/+1
| | | | | The only optional extension currently supported by the compiler is GL_EXT_texture_array.
* glsl2: Conditionally define preprocessor tokens for optional extensionsIan Romanick2010-07-011-1/+3
| | | | | The only optional extension currently supported by the compiler is GL_EXT_texture_array.
* glsl2: Add gl_MaxTextureCoordsIan Romanick2010-07-011-0/+1
|
* glsl2: Preprocessed source doesn't need to live past compile time.Kenneth Graunke2010-06-301-4/+1
|
* glsl2: Steal the live IR and free the rest of the junk.Kenneth Graunke2010-06-301-0/+11
|
* glsl2: Use Mesa's gl_shader_program instead of our own struct glsl_program.Eric Anholt2010-06-301-2/+2
| | | | This avoids more allocation and shuffling of data around.
* glsl2: Move our data from a glsl_shader* on the side to the main gl_shader *.Eric Anholt2010-06-301-25/+22
| | | | | 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.
* glsl2: Pass MaxDrawBuffers from core Mesa into the GLSL compilerIan Romanick2010-06-291-0/+2
|
* glsl_type: Add _mesa_glsl_release_types to release all type related storageIan Romanick2010-06-291-0/+1
|
* glsl2: Add option to stand-alone GLSL compiler to dump IR before optimizationsIan Romanick2010-06-281-0/+7
|
* glsl2: Use the parser state as the talloc context for dead code elimination.Eric Anholt2010-06-251-1/+1
| | | | This cuts runtime by around 20% from talloc_parent() lookups.
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-241-0/+256