summaryrefslogtreecommitdiffstats
path: root/src/compiler/Makefile.glsl.am
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Add a lowering pass for 64-bit integer multiplicationIan Romanick2017-01-201-0/+1
| | | | | | | | v2: Rename lower_64bit.cpp and lower_64bit_test.cpp to lower_int64. Suggested by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Add tracking for elements of an array-of-arrays that have been accessedIan Romanick2016-12-191-0/+1
| | | | | | | | | | | If there's a better way to provide access to ir_array_refcount_entry private members to the test functions, I am very interested to know about it. Signed-off-by: Ian Romanick <[email protected]> Cc: Francisco Jerez <[email protected]> Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]>
* util: import cache.c/h from glslMarek Olšák2016-11-151-4/+0
| | | | | | | | | | It's not dependent on GLSL and it can be useful for shader caches that don't deal with GLSL. v2: address review comments v3: keep the other 3 lines in configure.ac Reviewed-by: Emil Velikov <[email protected]>
* glsl/standalone: Optimize add-of-neg to subtractIan Romanick2016-11-101-0/+1
| | | | | | | | | | | | | This just makes the output of the standalone compiler a little more compact. v2: Fix indexing typo noticed by Iago. Move the add_neg_to_sub_visitor to it's own header file. Add a unit test that exercises the visitor. Both the neg_a_plus_b and neg_a_plus_neg_b tests reproduced the bug that Iago discovered. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: Add pthread libs to cache_testRhys Kidd2016-10-271-1/+4
| | | | | | | | | | | Fixes the following compile error, present when the SHA1 library is libgcrypt: CCLD glsl/tests/cache-test glsl/.libs/libglsl.a(libmesautil_la-mesa-sha1.o): In function `call_once': /mesa/src/util/../../include/c11/threads_posix.h:96: undefined reference to `pthread_once' Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* compiler: avoid warning about redefinition of PYTHON_GENErik Faye-Lund2016-10-261-1/+0
| | | | | | | | | | | | PYTHON_GEN is defined to the exact same thing in both Makefile.glsl.am and Makefile.nir.am. This makes automake complain, so let's lift the definition up to Makefile.am, the same way as MKDIR_GEN. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl: Add initial functions to implement an on-disk cacheTimothy Arceri2016-09-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code provides for an on-disk cache of objects. Objects are stored and retrieved via names that are arbitrary 20-byte sequences, (intended to be SHA-1 hashes of something identifying for the content). The directory used for the cache can be specified by means of environment variables in the following priority order: $MESA_GLSL_CACHE_DIR $XDG_CACHE_HOME/mesa <user-home-directory>/.cache/mesa By default the cache will be limited to a maximum size of 1GB. The environment variable: $MESA_GLSL_CACHE_MAX_SIZE can be set (at the time of GL context creation) to choose some other size. This variable is a number that can optionally be followed by 'K', 'M', or 'G' to select a size in kilobytes, megabytes, or gigabytes. By default, an unadorned value will be interpreted as gigabytes. The cache will be entirely disabled at runtime if the variable MESA_GLSL_CACHE_DISABLE is set at the time of GL context creation. Many thanks to Kristian Høgsberg <[email protected]> for the initial implementation of code that led to this patch. In particular, the idea of using an mmapped file, (indexed by a portion of the SHA-1), for the efficent implementation of cache_has_key was entirely his idea. Kristian also provided some very helpful advice in discussions regarding various race conditions to be avoided in this code. Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Use the generated constant expression codeIan Romanick2016-08-301-0/+6
| | | | | | | | | | | | | | Immediately previous to this patch, diff -wud src/glsl/ir_constant_expression.cpp \ src/glsl/ir_expression_operation_constant.h should be "minimal." v3: With much help from José Fonseca, fix the SCons build. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Generate ir_expression_operation_strings.h from PythonIan Romanick2016-08-301-1/+7
| | | | | | | | | | | | 'diff -ud' is clean. v2: Massive rebase. v3: With much help from José Fonseca, fix the SCons build. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Dylan Baker <[email protected]>
* glsl: Generate ir_expression_operation.h from PythonIan Romanick2016-08-301-0/+8
| | | | | | | | | | | | | There are differences in where end-of-line comments are placed, but 'diff -wud' is clean. v2: Massive rebase. v3: With much help from José Fonseca, fix SCons build. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Dylan Baker <[email protected]>
* glsl: Make the generated sources build rules more like NIRIan Romanick2016-08-171-3/+1
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: add warning-testAlejandro Piñeiro2016-05-261-1/+2
| | | | | | | | | | | It executes compiler-glsl on all the available shaders, and it checks that the outcome is the expected. Bash code based on the already existing optimization-test v2: rebasing: use --version option Reviewed-by: Ian Romanick <[email protected]>
* glsl: split out libstandaloneRob Clark2016-05-251-5/+11
| | | | | | | | | Split standalone glsl_compiler into a libstandalone.la and a thin main.cpp. This way drivers can re-use the glsl standalone frontend in their own standalone compilers. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* compiler: automake: split out glsl into separate makefileEmil Velikov2016-04-111-0/+217
Preserve the functionality while keeping the files smaller and more readable. v2: Do not include Makefile.sources from the GLSL makefile (silences automake warnings) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Jason Ekstrand <[email protected]> (v1)