summaryrefslogtreecommitdiff
path: root/src/glsl
AgeCommit message (Collapse)Author
2011-03-16android: Add Android.mk's.Chia-I Wu
2011-03-16android: Add pre-generated files.Chia-I Wu
make -C src/glsl builtin_function.cpp make -C src/es1api make -C src/es2api make -C src/shared-glapi make -C src/mesa/mai/api_exec_es{12}.c
2011-03-16android: Fix build with bionic.Chia-I Wu
2011-03-15glsl: add cast to silence signed/unsigned comparison warningBrian Paul
2011-03-15glsl: Only allow unsized array assignment in an initializerIan Romanick
It should have been a tip when the spec says "However, implicitly sized arrays cannot be assigned to. Note, this is a rare case that *initializers and assignments appear to have different semantics*." (empahsis mine) Fixes bugzilla #34367. NOTE: This is a candidate for stable release branches.
2011-03-15glsl: Skip processing the first function's body in do_dead_functions().Eric Anholt
It can't call anything, so there's no point.
2011-03-15glsl: Whitespace fixup in opt_dead_functions.cpp.Eric Anholt
2011-03-15glsl: Skip processing of expression trees in discard simplification.Eric Anholt
It only cares about "if", "loop", and "discard".
2011-03-15glsl: Reduce processing of expression trees in do_structure_splitting.Eric Anholt
Most of the time we don't have a non-uniform struct variable in the shader, so this cuts the time spent in do_structure_splitting during glean texCombine by about 2/3.
2011-03-15glsl: Skip processing expression trees in do_if_simplification().Eric Anholt
Reduces time spent in this during glean texCombine by about 2/3.
2011-03-15glsl: Skip processing expression trees in optimize_redundant_jumps()Eric Anholt
Cuts the time spent in this function during glean texCombine by 2/3.
2011-03-15scons: copy hash_table.c, symbol_table.c to glsl directoryJose Fonseca
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 <brianp@vmware.com>
2011-03-14glsl: Explicitly specify a type when reading/printing ir_texture.Kenneth Graunke
This is necessary for GLSL 1.30+ shadow sampling functions, which return a single float rather than splatting the value to a vec4 based on GL_DEPTH_TEXTURE_MODE.
2011-03-14texture_builtins.py: Add support for 130-style Shadow sampler variants.Kenneth Graunke
2011-03-12glsl: Document glsl_type::sampler_dimensionalityChad Versace
2011-03-11mesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.Eric Anholt
It would be nice if we handled optimized uniform math like this in some generic way, since people often end up doing uniform expressions in shaders, but for now keep this hard-coded like it was in the texenvprogram code.
2011-03-11mesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.Eric Anholt
For fixed function fragment processing in GLSL IR, we want to be able to reference this state value. gl_* not explicitly permitted is reserved, so using this variable name internally shouldn't be any issue.
2011-03-10glsl: silence warning in printf() with a castBrian Paul
2011-03-08glsl: Use insert_before for lists instead of open coding itIan Romanick
2011-03-08linker: Add imported functions to the linked IRIan Romanick
Fixes piglit test glsl-function-chain16 and bugzilla #34203. NOTE: This is a candidate for stable release branches.
2011-03-08glsl: Add several function / call related validationsIan Romanick
The signature list in a function must contain only ir_function_signature nodes. The target of an ir_call must be an ir_function_signature. These were added while trying to debug Mesa bugzilla #34203.
2011-03-08glsl: Function signatures cannot have NULL return typeIan Romanick
The return type can be void, and this is the case where a `_ret_val' variable should not be declared.
2011-03-04glsl: Process redeclarations before initializersIan Romanick
If an array redeclaration includes an initializer, the initializer would previously be dropped on the floor. Instead, directly apply the initializer to the correct ir_variable instance and append the generated instructions. Fixes bugzilla #34374 and piglit tests glsl-{vs,fs}-array-redeclaration. NOTE: This is a candidate for stable release branches. 0292ffb8 and 8e6cb9fe are also necessary.
2011-03-04glsl: Refactor AST-to-HIR code handling variable initializersIan Romanick
2011-03-04glsl: Refactor AST-to-HIR code handling variable redeclarationsIan Romanick
2011-03-04scons: Unbreak mingw cross compilation.José Fonseca
2011-03-04scons: Get glsl2 and glcpp programs building correctly.José Fonseca
2011-03-04glsl/glcpp: Use stdio.h instead of unistd.h.José Fonseca
2011-03-04glsl: Define YY_NO_UNISTD_H on MSVC.José Fonseca
2011-03-03glcpp: Remove trailing contexts from #if rules.Kenneth Graunke
These are now unnecessary.
2011-03-03glcpp: Rework lexer to use a SKIP state rather than REJECT.Kenneth Graunke
Previously, the rule deleted by this commit was matched every single time (being the longest match). If not skipping, it used REJECT to continue on to the actual correct rule. The flex manual advises against using REJECT where possible, as it is one of the most expensive lexer features. So using it on every match seems undesirable. Perhaps more importantly, it made it necessary for the #if directive rules to contain a look-ahead pattern to make them as long as the (now deleted) "skip the whole line" rule. This patch introduces an exclusive start state, SKIP, to avoid REJECTs. Each time the lexer is called, the code at the top of the rules section will run, implicitly switching the state to the correct one. Fixes piglit tests 16384-consecutive-chars.frag and 16385-consecutive-chars.frag.
2011-03-03glcpp/tests: Update 063-comments.c.expected to match output.Kenneth Graunke
The expected result has been out of sync with what glcpp produces for some time; glcpp's actual result seems to be correct and is very close to GCC's cpp. Updating this will make it easier to catch regressions in upcoming commits.
2011-03-03scons: More tweaks to fix MinGW build.José Fonseca
2011-03-03scons: Ensure generated headers are in the include path.José Fonseca
2011-03-02glsl: Remove unused glcpp/Makefile.am.Kenneth Graunke
This is a remnant of when glsl2 lived in its own repository.
2011-03-02glsl: Remove 'tests' subfolder.Kenneth Graunke
These have long since moved to piglit and aren't useful to have here.
2011-03-01scons: Use Flex and Bison to generate lexer/parser files.Kenneth Graunke
This gets it building again here; I'll leave it up to the SCons maintainers to make further improvements.
2011-03-01glsl: Rename .lpp to .ll and .ypp to .yy.Kenneth Graunke
SCons has built-in support for .ll and .yy, but not .lpp and .ypp. Since there's no real benefit to using the old names, change them.
2011-03-01Add generated parser / lexer files to gitignore listsIan Romanick
2011-03-01glcpp: Remove files generated by flex and bison from GITIan Romanick
2011-03-01glsl: Remove files generated by flex and bison from GITIan Romanick
2011-02-28glsl: Enable GL_OES_texture_3D extension for ES2.Kenneth Graunke
2011-02-28glsl: Use reralloc instead of plain realloc.Kenneth Graunke
Plugs a memory leak when compiling shaders with user defined structures. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-27glsl/builtins: Fix return type for textureSize sampler2DArray variants.Kenneth Graunke
A copy and paste error.
2011-02-26glsl/Makefile: Remove builtin_function.cpp if generation fails.Arkadiusz Miskiewicz
Fixes bug #34346. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-02-21Use C-style system headers in C++ code to avoid issues with std:: namespaceIan Romanick
2011-02-19glsl: Remove $(PWD) from Makefile in favor of .Kenneth Graunke
Hopefully should fix bug #34468.
2011-02-15linker: Fix off-by-one error implicit array sizingIan Romanick
Arrays are zero based. If the highest element accessed is 6, the array needs to have 7 elements. Fixes piglit test glsl-fs-implicit-array-size-03 and bugzilla #34198. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-15glsl: Reinstate constant-folding for division by zeroChad Versace
Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160 Commit e7c1f058d18f62aa4871aec623f994d7b68cb8c1 disabled constant-folding when division-by-zero occured. This was a mistake, because the spec does allow division by zero. (From section 5.9 of the GLSL 1.20 spec: Dividing by zero does not cause an exception but does result in an unspecified value.) For floating-point division, the original pre-e7c1f05 behavior is reinstated. For integer division, constant-fold 1/0 to 0.
2011-02-15Revert "glsl: Fix constant-folding for reciprocal expressions"Chad Versace
This reverts commit b3cf92aa916ee0537ee37723c23a9897ac9cd3e0. The reverted commit prevented constant-folding of reciprocal expressions when the reciprocated expression was 0. However, since the spec allows division by zero, constant-folding *is* permissible in this case. From Section 5.9 of the GLSL 1.20 spec: Dividing by zero does not cause an exception but does result in an unspecified value.