summaryrefslogtreecommitdiffstats
path: root/src/glsl/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Link glsl_compiler with pthreads library.Jonathan Gray2014-03-111-1/+3
| | | | | | | | | | | | Fixes the following build error on OpenBSD: ./.libs/libglsl.a(builtin_functions.o)(.text+0x973): In function `mtx_lock': ../../include/c11/threads_posix.h:195: undefined reference to `pthread_mutex_lock' ./.libs/libglsl.a(builtin_functions.o)(.text+0x9a5): In function `mtx_unlock': ../../include/c11/threads_posix.h:248: undefined reference to `pthread_mutex_unlock' Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* automake: use only the folder name if it's a subfolder of the present oneEmil Velikov2014-03-111-2/+2
| | | | | | | v2: Resolve rebase conflicts. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* automake: silence folder creationEmil Velikov2014-03-111-2/+2
| | | | | | | | | | | There is little gain in printing whenever a folder is created. v2: - Use $(AM_V_at) over @ to have control in verbose builds. Suggested by Erik Faye-Lund. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* glsl: Link glcpp with math library.Vinson Lee2013-11-271-1/+3
| | | | | | | | | | | | | This patch fixes this build error with Oracle Solaris Studio. libtool: link: /opt/solarisstudio12.3/bin/cc -g -o glcpp/glcpp glcpp.o prog_hash_table.o ./.libs/libglcpp.a Undefined first referenced symbol in file sqrt prog_hash_table.o Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl/tests: Unit test vertex shader in / out with ↵Ian Romanick2013-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | link_invalidate_variable_locations Validates: - ir_variable::explicit_location should not be modified. - If ir_variable::explicit_location is not set, ir_variable::location, ir_variable::location_frac, and ir_variable::is_unmatched_generic_inout must be reset to 0. - If ir_variable::explicit_location is set, ir_variable::location should not be modified. ir_variable::location_frac, and ir_variable::is_unmatched_generic_inout must be reset to 0. Previous unit tests have shown that all non-generic inputs / outputs have explicit_location set. v2: Split the link_invalidate_variable_locations interface change out to a separate patch. Remove the vertex_in_builtin_without_explicit and vertex_out_builtin_without_explicit tests. There was a lot of good discussion about this on the mailing list to which I refer the interested reader. Both changes suggested by Paul. http://lists.freedesktop.org/archives/mesa-dev/2013-October/046652.html Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl/tests: Verify vertex shader built-ins generated by ↵Ian Romanick2013-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _mesa_glsl_initialize_variables Checks that the variables generated meet certain criteria. - Vertex shader inputs have an explicit location. - Vertex shader outputs have an explicit location. - Fragment shader-only varying locations are not used. - Vertex shader uniforms and system values don't have an explicit location. - Vertex shader constants don't have an explicit location and are read-only. - No other kinds of vertex variables exist. It does not verify that an specific variables exist. v2: Fix memory management mistakes in common_builtin::string_starts_with_prefix. Clean up error message reporting in common_builtin::no_invalid_variable_modes. Both suggested by Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: When constructing a variable with an interface type, set interface_typeIan Romanick2013-10-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since the addition of interface blocks with instance names, we have had an implicit invariant: var->type->is_interface() == (var->type == var->interface_type) The odd use of == here is intentional because !var->type->is_interface() implies var->type != var->interface_type. Further, if var->type->is_array() is true, we have a related implicit invariant: var->type->fields.array->is_interface() == (var->type->fields.array == var->interface_type) However, the ir_variable constructor doesn't maintain either invariant. That seems kind of silly... and I tripped over it while writing some other code. This patch makes the constructor do the right thing, and it introduces some tests to verify that behavior. v2: Add general-ir-test to .gitignore. Update the description of the ir_variable invariant for arrays in the commit message. Both suggested by Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl_compiler: Re-enable building glsl_compilerIan Romanick2013-10-071-0/+11
| | | | | | | | | | 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/tests: Add a test for properties of sampler types.Kenneth Graunke2013-09-151-0/+13
| | | | | | | | | | | | For each sampler type, this tests that: - The base type is GLSL_TYPE_SAMPLER. - The dimensionality is set correctly. - The returned data type is correct. - The sampler_array and sampler_shadow flags are set correctly. - sampler_coordinate_components() returns the correct value. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Remove builtin_compiler from the build system.Kenneth Graunke2013-09-091-16/+1
| | | | | | | | | 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]>
* build: remove unused API_DEFINESAndreas Boll2013-05-011-2/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa,glsl: Move round_to_even() from glsl to mesa/main (v2)Chad Versace2013-01-241-0/+2
| | | | | | | | | | | | | Move round_to_even's definition to mesa/main so that _mesa_float_to_half() can use it in order to eliminate rounding bias. In additon to moving the fuction definition, prefix its name with "_mesa", just as all other functions in mesa/main are prefixed. v2: Fix Android build. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* glsl/build: Build libglcpp and libglslcore in builtin_compilerMatt Turner2013-01-221-33/+19
| | | | | | And reuse them if not cross compiling. Tested-by: Andreas Boll <[email protected]>
* glsl/build: Build tests via the glsl MakefileMatt Turner2013-01-221-2/+36
| | | | Tested-by: Andreas Boll <[email protected]>
* glsl/build: Build glcpp via the glsl MakefileMatt Turner2013-01-221-25/+82
| | | | | | Removing the subdirectory recursion provides a small speed up. Tested-by: Andreas Boll <[email protected]>
* glsl/build: Don't build builtin_compiler separately if not cross compilingMatt Turner2013-01-221-2/+27
| | | | | | | Reduces the number of times that src/glsl/ is compiled when not cross compiling. Tested-by: Andreas Boll <[email protected]>
* glsl/build: Don't build glsl_compilerMatt Turner2013-01-221-9/+0
| | | | | | Use glslparsertest from piglit instead. Tested-by: Andreas Boll <[email protected]>
* glsl/build: Build glsl_test only on make checkMatt Turner2013-01-201-1/+2
| | | | Reviewed-by: Andreas Boll <[email protected]>
* glsl/build: Remove dead LIBRARY_* variablesMatt Turner2013-01-201-2/+0
| | | | Reviewed-by: Andreas Boll <[email protected]>
* Remove hacks for static MakefilesMatt Turner2013-01-131-7/+0
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build
* mesa: Use the new hash table for the variable refcount visitor.Eric Anholt2012-12-071-0/+2
| | | | | | | 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/+0
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* build: Don't cross-compile GLSL builtin compilerThierry Reding2012-11-011-35/+13
| | | | | | | | | | | | | | | | | | | | | | The builtin_compiler binary is used during the build process to generate code for the builtin GLSL functions. Since this binary needs to be run on the build host, it must not be cross-compiled. This patch fixes the build system to compile a second version of the source files and the builtin_compiler binary itself for the build system. It does so by defining the CC_FOR_BUILD and CXX_FOR_BUILD variables, which are searched for by the configure script and point to the location of native C and C++ compilers. In order for this to work properly, builtin_function.cpp is removed from BUILT_SOURCES, otherwise the build system would try to generate it before having had a chance to descend into the builtin_compiler subdirectory. With the builtin_compiler and glsl_compiler now being generated at different stages, the build instructions for glsl_compiler can be simplified a bit. Signed-off-by: Thierry Reding <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* build: Build src/glsl with visibility CFLAGSMatt Turner2012-10-011-3/+3
|
* build: Fix out-of-tree generation of builtin_function.cppMatt Turner2012-08-141-2/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* build/glsl: fix location of generated files.Christopher James Halse Rogers2012-08-131-4/+0
| | | | | | | | Like in src/mesa, use GLSL_BUILDDIR/GLSL_SRCDIR to unambiguously distinguish between in-tree and generated files. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]>
* Fix building glsl when using automake-1.12 after 68e04cc6Jon TURNEY2012-07-151-4/+10
| | | | | | | | | | | | | | | | Commit 68e04cc6 was tested using automake-1.11. Unfortunately, automake-1.12 made a "slightly backward-incompatible change" in the use of yacc with C++, and for a .yy file, the generated header file is now named .hh, not .h To work with both, write our own rule for running yacc, which generates a header file named .h, rather than using automake's rule. Also, remove things from BUILD_SOURCES which don't need to be there Also, update EXCLUDE rules in doxygen/glsl.doxy, for change of generated files from .cpp -> .cc, and glsl_lexer.h has never existed. Signed-off-by: Jon TURNEY <[email protected]>
* automake: convert libglslJon TURNEY2012-07-131-0/+106
| | | | | | | | | | | | | | | | | | | | v2: Use AM_V_GEN to silence generated code rules. Add BUILT_SOURCES to CLEANFILES v3: - Fix an accidental // in a path - Use automake make rules for lex/yacc rather than writing our own - Update .gitignore appropriately - Build a libglcpp convenience library rather than awkwardly including the files in libglsl and delegating the generation - Remove libglsl.a compatibility link on clean v4: - Automake's rules for lex/yacc make .cc if source is .ll or .yy, and apparently we must use those extensions "because of scons", so update everywhere glsl_parser.cpp -> glsl_parser.cc and glsl_lexer.cpp -> glsl_lexer.cc. This fixes 'make tarballs' and building with dricore enabled. Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* Revert "automake: src/glsl and src/glsl/glcpp"Matt Turner2012-01-311-81/+0
| | | | This reverts commit 9947656168d09f9019600fccc42ca8e0de49b83a.
* automake: src/glsl and src/glsl/glcppMatt Turner2012-01-301-0/+81
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Tested-by: Eric Anholt <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* glsl: Remove unused and out of date Makefile.am.Kenneth Graunke2010-11-151-81/+0
| | | | | This was from when glsl2 lived in a separate repository and used automake.
* 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-1/+2
|
* glsl2: Add lowering pass to remove noise opcodesIan Romanick2010-09-091-1/+2
|
* glsl2: Add module to perform simple loop unrollingIan Romanick2010-09-031-1/+2
|
* glsl2: Add module to suss out loop control variables from loop analysis dataIan Romanick2010-09-031-1/+2
| | | | This is the next step on the road to loop unrolling
* glsl2: Add module to analyze variables used in loopsIan Romanick2010-09-031-1/+2
| | | | This is the first step eventually leading to loop unrolling.
* glsl2: Replace the GLSL compiler with the glsl2 project.Eric Anholt2010-06-241-6/+2
|
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-241-0/+79