summaryrefslogtreecommitdiffstats
path: root/src/glsl/SConscript
Commit message (Collapse)AuthorAgeFilesLines
* glsl_compiler: Re-enable building glsl_compilerIan Romanick2013-10-071-3/+3
| | | | | | | | | | This allows application developers to use Mesa's compiler as a standalone validator for their shaders. This is mostly a revert of commit 569f0e4. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Remove builtin_compiler from the build system.Kenneth Graunke2013-09-091-48/+18
| | | | | | | | | We don't actually use anything from builtin_function.cpp, so we don't need to generate it anymore. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Paul Berry <[email protected]>
* scons: Add imports.c to builtin_compiler build.Vinson Lee2013-01-241-0/+2
| | | | | | | | Fixes build regression introduced by commit eac030e38e3cdd4ed4534516e3d3a50c8a372719. Signed-off-by: Vinson Lee <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59835
* glsl/Makefile.sources: Correct BUILTIN_COMPILER_CXX_FILESMatt Turner2013-01-221-3/+2
| | | | | | | | | | | | | | | Squashed with two reverts: Revert "android: Update for builtin_stubs.cpp move" This reverts commit c0def90ede1e939173041b8785303de90f8fdc6c. Revert "scons: Update for builtin_stubs.cpp" This reverts commit 8ac4b82699ad0a59ae6ae6d3415702eaa5d4fe3b. Tested-by: Andreas Boll <[email protected]> Tested-on-Android-by: Chad Versace <[email protected]>
* mesa: Use the new hash table for the variable refcount visitor.Eric Anholt2012-12-071-0/+4
| | | | | | | Reviewed-by: Jordan Justen <[email protected]> [[email protected]: open_hash_table => hash_table] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* program/hash_table.c: rename to program/prog_hash_table.cJordan Justen2012-12-071-2/+2
| | | | | | | | Removes a collision of the object file name for main/hash_table and program/hash_table. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* automake: Merge *_CXX_FILES variables in the glsl build.Eric Anholt2012-11-121-1/+1
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* scons: Update for builtin_stubs.cppJosé Fonseca2012-11-021-3/+4
| | | | | | | | | | | | Note this by itself is not enough to fix scons build -- it will fail until you remove: rm -rf build/*/glsl/builtin_compiler because that node was a filei before, but it will be now a directory. This also means that bisecting across this change will require wiping the build directory..
* scons: Use full path of texture_builtins.py.Vinson Lee2012-09-291-1/+1
| | | | | | | | | | Fixes this build error on Cygwin. Explicit dependency `src/glsl/builtins/tools/texture_builtins.py' not found, needed by target `build/cygwin-x86-debug/glsl/builtin_function.cpp'. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: add new -p (prefix) options for yaccBrian Paul2012-09-151-1/+1
| | | | These were recently added to the Makefiles.
* scons: set YACCHXXFILESUFFIX to stop needless rebuilding of the parserJosé Fonseca2012-08-021-0/+4
| | | | | | | | Before, the GLSL parser was getting rebuilt every time that scons was run. The problem was scons was expecting a glsl_parser.hpp file but we were generating a glsl_parser.h file. Signed-off-by: Brian Paul <[email protected]>
* scons: Add glsl/glcpp to the include path.Vinson Lee2012-06-231-2/+2
| | | | | | | | | | Fixes this build failure on Solaris. Compiling build/sunos-debug/glsl/glcpp/glcpp-lex.c ... "src/glsl/glcpp/glcpp-lex.l", line 30: cannot find include file: "glcpp-parse.h" Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: rename Makefile.sources' _SOURCES variablesMatt Turner2012-01-301-3/+3
| | | | | | | | automake uses variables named *_SOURCES. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Eric Anholt <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* scons: include src/glsl/Makefile.sourcesChia-I Wu2011-11-021-68/+14
| | | | Reviewed-by: Brian Paul <[email protected]>
* scons: Add link_uniforms.cpp to SConscript.Vinson Lee2011-10-251-0/+1
|
* glsl: Implement a lowering pass for gl_ClipDistance.Paul Berry2011-09-231-0/+1
| | | | | | | | | | | | | | | | | | | In i965 GEN6+ (and I suspect most other hardware), gl_ClipDistance needs to be laid out as a pair of vec4's (the first containing clip distances 0-3, and the second containing clip distances 4-7). However, it is declared in GLSL as an array of 8 floats. This lowering pass acts at the GLSL level, modifying the declaration of gl_ClipDistance so that it is an array of vec4's rather than an array of floats, and renaming it to gl_ClipDistanceMESA. In addition, it modifies all accesses to the array so that they access the appropiate component of one of the vec4's. Since some hardware may not internally represent gl_ClipDistance as a pair of vec4's, this lowering pass is optional. To enable it, set the LowerClipDistance flag in gl_shader_compiler_options to true. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add standalone_scaffolding.cpp to SConscript.Vinson Lee2011-07-221-0/+1
|
* glsl: Add ir_function_detect_recursion.cpp to SConscript.Vinson Lee2011-07-201-0/+1
|
* scons: make embedding orthogonal to the platformJosé Fonseca2011-06-171-2/+2
| | | | To enable embedding in platforms other than linux.
* scons: copy hash_table.c, symbol_table.c to glsl directoryJose Fonseca2011-03-151-2/+7
| | | | | | | | This fixes an issue where the .obj files wound up in the src/ directory rather than the build/ directory. That prevented combined 32-bit and 64-bit builds from working. Signed-off-by: Brian Paul <[email protected]>
* scons: Unbreak mingw cross compilation.José Fonseca2011-03-041-7/+12
|
* scons: Get glsl2 and glcpp programs building correctly.José Fonseca2011-03-041-20/+21
|
* scons: More tweaks to fix MinGW build.José Fonseca2011-03-031-5/+16
|
* scons: Ensure generated headers are in the include path.José Fonseca2011-03-031-0/+3
|
* scons: Use Flex and Bison to generate lexer/parser files.Kenneth Graunke2011-03-011-4/+15
| | | | | This gets it building again here; I'll leave it up to the SCons maintainers to make further improvements.
* scons: builtin_glsl_function on windows needs bundled getopt.José Fonseca2011-02-111-1/+7
|
* scons: Try to support building 64bit binaries on 32bit windows.José Fonseca2011-02-111-4/+1
|
* glsl: Add opt_copy_propagation_elements.cpp to SConscript.Vinson Lee2011-02-041-0/+1
| | | | Fixes SCons build.
* scons/glsl: add top-level 'include' dir to CPPPATHBrian Paul2011-01-311-0/+1
| | | | | To avoid using the /usr/include/GL/gl.h file which may be lacking some special #defines.
* Remove talloc from the SCons build system.Kenneth Graunke2011-01-311-19/+1
|
* ralloc: Add a fake implementation of ralloc based on talloc.Kenneth Graunke2011-01-311-0/+1
|
* glsl: Fix mingw crosscompileJakob Bornecrantz2011-01-251-0/+1
|
* scons: Fix cross-compilation.José Fonseca2011-01-131-30/+39
| | | | Hairy stuff. Don't know how to do it better though.
* glsl: Make builtin_compiler build on Windows with MSVC.José Fonseca2011-01-121-1/+13
|
* getopt: Import OpenBSD getopt implementation for MSVC.José Fonseca2011-01-121-0/+4
|
* glsl: Autogenerate builtin_functions.cpp as part of the build process.Kenneth Graunke2011-01-101-2/+22
| | | | | | Python is already necessary for other parts of Mesa, so there's no reason we can't just generate it. This patch updates both make and SCons to do so.
* glsl: new glsl_strtod() wrapper to fix decimal point interpretationBrian Paul2010-12-141-0/+1
| | | | | | | | We always want to use '.' as the decimal point. See http://bugs.freedesktop.org/show_bug.cgi?id=24531 NOTE: this is a candidate for the 7.10 branch.
* glsl: Add a lowering pass to move discards out of if-statements.Kenneth Graunke2010-12-011-0/+1
| | | | | | | This should allow lower_if_to_cond_assign to work in the presence of discards, fixing bug #31690 and likely #31983. NOTE: This is a candidate for the 7.9 branch.
* glsl: Add an optimization pass to simplify discards.Kenneth Graunke2010-12-011-0/+1
| | | | NOTE: This is a candidate for the 7.9 branch.
* glsl: Add lower_vector.cpp to SConscript.Vinson Lee2010-11-191-0/+1
|
* glsl: Combine many instruction lowering passes into one.Kenneth Graunke2010-11-191-4/+1
| | | | | | | This should save on the overhead of tree-walking and provide a convenient place to add more instruction lowering in the future. Signed-off-by: Ian Romanick <[email protected]>
* glsl: Add ir_constant_expression.cpp to SConscript.Vinson Lee2010-11-151-0/+1
| | | | | | This was accidentally removed in commit 32aaf89823de11e98cb59d5ec78c66cd3e74bcd4. Fixes SCons builds.
* glsl: remove opt_constant_expression.cpp from SConscriptBrian Paul2010-11-151-3/+2
| | | | And alphabetize the opt_* files.
* glsl: Rename various ir_* files to lower_* and opt_*.Kenneth Graunke2010-11-151-24/+24
| | | | | This helps distinguish between lowering passes, optimization passes, and other compiler code.
* glsl: add pass to lower variable array indexing to conditional assignmentsLuca Barbieri2010-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currenly GLSL happily generates indirect addressing of any kind of arrays. Unfortunately DirectX 9 GPUs are not guaranteed to support any of them in general. This pass fixes that by lowering such constructs to a binary search on the values, followed at the end by vectorized generation of equality masks, and 4 conditional assignments for each mask generation. Note that this requires the ir_binop_equal change so that we can emit SEQ to generate the boolean masks. Unfortunately, ir_structure_splitting is too dumb to turn the resulting constant array references to individual variables, so this will need to be added too before this pass can actually be effective for temps. Several patches in the glsl2-lower-variable-indexing were squashed into this commit. These patches fix bugs in Luca's original implementation, and the individual patches can be seen in that branch. This was done to aid bisecting in the future. Signed-off-by: Ian Romanick <[email protected]>
* glsl2: Add pass to remove redundant jumpsIan Romanick2010-09-131-0/+1
|
* glsl: add continue/break/return unification/elimination pass (v2)Luca Barbieri2010-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in v2: - Base class renamed to ir_control_flow_visitor - Tried to comply with coding style This is a new pass that supersedes ir_if_return and "lowers" jumps to if/else structures. Currently it causes no regressions on softpipe and nv40, but I'm not sure whether the piglit glsl tests are thorough enough, so consider this experimental. It can be asked to: 1. Pull jumps out of ifs where possible 2. Remove all "continue"s, replacing them with an "execute flag" 3. Replace all "break" with a single conditional one at the end of the loop 4. Replace all "return"s with a single return at the end of the function, for the main function and/or other functions This gives several great benefits: 1. All functions can be inlined after this pass 2. nv40 and other pre-DX10 chips without "continue" can be supported 3. nv30 and other pre-DX10 chips with no control flow at all are better supported Note that for full effect we should also teach the unroller to unroll loops with a fixed maximum number of iterations but with the canonical conditional "break" that this pass will insert if asked to. Continues are lowered by adding a per-loop "execute flag", initialized to TRUE, that when cleared inhibits all execution until the end of the loop. Breaks are lowered to continues, plus setting a "break flag" that is checked at the end of the loop, and trigger the unique "break". Returns are lowered to breaks/continues, plus adding a "return flag" that causes loops to break again out of their enclosing loops until all the loops are exited: then the "execute flag" logic will ignore everything until the end of the function. Note that "continue" and "return" can also be implemented by adding a dummy loop and using break. However, this is bad for hardware with limited nesting depth, and prevents further optimization, and thus is not currently performed.
* glsl2: Fix scons build for all platformsJakob Bornecrantz2010-09-101-0/+1
|
* glsl: Add new files to sconscript.José Fonseca2010-09-051-0/+3
|
* scons: Add glsl_symbol_table.cppJosé Fonseca2010-08-261-0/+1
|