summaryrefslogtreecommitdiff
path: root/src/glsl
AgeCommit message (Collapse)Author
2010-11-16Refresh autogenerated glcpp parser.Kenneth Graunke
2010-11-16glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.Kenneth Graunke
Per section 4.5.4 of the GLSL 1.30 specification.
2010-11-16glsl: Simplify generation of swizzle for vector constructorsIan Romanick
2010-11-16glsl: Refactor is_vec_{zero,one} to be methods of ir_constantIan Romanick
These predicates will be used in other places soon.
2010-11-15glsl: Add ir_constant_expression.cpp to SConscript.Vinson Lee
This was accidentally removed in commit 32aaf89823de11e98cb59d5ec78c66cd3e74bcd4. Fixes SCons builds.
2010-11-15glsl: remove opt_constant_expression.cpp from SConscriptBrian Paul
And alphabetize the opt_* files.
2010-11-15glsl: fix assorted MSVC warningsBrian Paul
2010-11-15glsl: Rename various ir_* files to lower_* and opt_*.Kenneth Graunke
This helps distinguish between lowering passes, optimization passes, and other compiler code.
2010-11-15glsl: Remove unused and out of date Makefile.am.Kenneth Graunke
This was from when glsl2 lived in a separate repository and used automake.
2010-11-15glsl: Add constant expression handling for asinh, acosh, and atanh.Kenneth Graunke
2010-11-15glsl: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke
2010-11-15glsl: Implement the asinh, acosh, and atanh built-in functions.Kenneth Graunke
2010-11-15generate_builtins.py: Fix inconsistent use of tabs and spaces warning.Kenneth Graunke
2010-11-15glsl: Refresh autogenerated lexer and parser files.Kenneth Graunke
For the last three commits.
2010-11-15glsl: Add support for the 'u' and 'U' unsigned integer suffixes.Kenneth Graunke
2010-11-15glsl: Add new keywords and reserved words for GLSL 1.30.Kenneth Graunke
2010-11-15glsl: Rework reserved word/keyword handling in the lexer.Kenneth Graunke
This consolidates the TOKEN_OR_IDENTIFIER and RESERVED_WORD macros into a single KEYWORD macro. The old TOKEN_OR_IDENTIFIER macros handled the case of a word going from an identifier to a keyword; the RESERVED_WORD macro handled a word going from a reserved word to a language keyword. However, neither could properly handle samplerBuffer (for example), which is an identifier in 1.10 and 1.20, a reserved word in 1.30, and a keyword in 1.40 and on. Furthermore, the existing macros didn't properly handle reserved words in GLSL ES 1.00. The best they could do was return a token (rather than an identifier), resulting in an obtuse parser error, rather than a user-friendly "you used a reserved word" error message.
2010-11-15glsl: Convert glsl_type::base_type from #define'd constants to an enum.Kenneth Graunke
This is nice because printing type->base_type in GDB will now give you a readable name instead of a number.
2010-11-15glsl: Remove GLSL_TYPE_FUNCTION define.Kenneth Graunke
Functions are not first class objects in GLSL, so there is never a value of function type. No code actually used this except for one function which asserted it shouldn't occur. One comment mentioned it, but was incorrect. So we may as well remove it entirely.
2010-11-11glsl: Free the loop state context when we free the loop state.Eric Anholt
Since this was talloced off of NULL instead of the compile state, it was a real leak over the course of the program. Noticed with valgrind --leak-check=full --show-reachable=yes. We should really change these passes to generally get the compile context as an argument so simple mistakes like this stop mattering.
2010-11-11glsl: fix crash in loop analysis when some controls can't be determinedAras Pranckevicius
Fixes loop-07.frag.
2010-11-09glsl: Remove unnecessary "unused variable" warning suppression.Kenneth Graunke
The "instructions" variable -is- used, so the cast to void can go away.
2010-11-09glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadowIan Romanick
NOTE: this is a candidate for the 7.9 branch.
2010-11-09glsl: Fix ir_expression::constant_expression_value()Chad Versace
When the type of the ir_expression is error_type, return NULL. This fixes bug 31371.
2010-11-08ir_dead_functions: Actually free dead functions and signatures.Kenneth Graunke
This makes linked shaders use around 36k less memory since the built-in prototypes are now freed.
2010-11-08r600g: implement texture_get_handle (needed for eglExportDRMImageMESA)Benjamin Franzke
2010-11-03ir_reader: Fix some potential NULL pointer dereferences.Kenneth Graunke
Found by inspection.
2010-11-03ir_reader: Remove useless error check.Kenneth Graunke
It's already been determined that length == 3, so clearly swiz->next is a valid S-Expression.
2010-11-03ir_reader: Return a specific ir_dereference variant.Kenneth Graunke
There's really no reason to return the base class when we have more specific information about what type it is.
2010-11-03glsl: Don't print a useless space at the end of an S-Expression list.Kenneth Graunke
We really only want to print spaces -between- elements, not after each element. This cleans up error messages from IR reader, making them (mildly) easier to read.
2010-11-03Refresh autogenerated file builtin_function.cpp.Kenneth Graunke
2010-11-03glsl/builtins: Clean up some ugly autogenerated code in atan.Kenneth Graunke
In particular, calling the abs function is silly, since there's already an expression opcode for that. Also, assigning to temporaries then assigning those to the final location is rather redundant.
2010-11-03glsl/builtins: Rename 'x' to 'y_over_x' in atan(float) implementation.Kenneth Graunke
For consistency with the vec2/vec3/vec4 variants.
2010-10-29glsl: Remove unused ARRAY_SIZE macro.Kenneth Graunke
It's also equivalent to Elements(...) which is already used elsewhere.
2010-10-27Fix build on systems where "python" is python 3.Kenneth Graunke
First, it changes autoconf to use a "python2" binary when available, rather than plain "python" (which is ambiguous). Secondly, it changes the Makefiles to use $(PYTHON) $(PYTHON_FLAGS) rather than calling python directly. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Matthew William Cox <matt@mattcox.ca> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-10-25glsl: Fix constant component count in vector constructor emitting.Kenneth Graunke
Fixes freedesktop.org bug #31101 as well as piglit test cases assignment-type-mismatch.vert and constructor-28.vert.
2010-10-25glsl: Fix ast-to-hir for ARB_fragment_coord_conventionsChad Versace
Function ast_declarator_list::hir(), when processing keywords added by extension ARB_fragment_coord_conventions, made the mistake of checking only if the extension was __supported by the driver__. The correct behavior is to check if the extensi0n is __enabled in the parse state__. NOTE: this is a candidate for the 7.9 branch. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2010-10-21Refresh autogenerated file builtin_function.cpp.Kenneth Graunke
Since this is just generated by python, it's questionable whether this should continue to live in the repository - Mesa already has other things generated from python as part of the build process.
2010-10-21generate_builtins.py: Output large strings as arrays of characters.Kenneth Graunke
This works around MSVC's 65535 byte limit, unfortunately at the expense of any semblance of readability and much larger file size. Hopefully I can implement a better solution later, but for now this fixes the build.
2010-10-21glsl: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke
2010-10-21glsl: Add support for GLSL 1.30's modf built-in.Kenneth Graunke
2010-10-21glcpp: Refresh autogenerated lexer file.Kenneth Graunke
2010-10-21glcpp: Return NEWLINE token for newlines inside multi-line comments.Kenneth Graunke
This is necessary for the main compiler to get correct line numbers.
2010-10-20glsl: Remove useless ir_shader enumeration value.Kenneth Graunke
2010-10-20glsl: Add assert for unhandled ir_shader case.Vinson Lee
Silences this GCC warning. ast_to_hir.cpp: In function 'void apply_type_qualifier_to_variable(const ast_type_qualifier*, ir_variable*, _mesa_glsl_parse_state*, YYLTYPE*)' ast_to_hir.cpp:1768: warning: enumeration value 'ir_shader' not handled in switch
2010-10-19linker: Improve handling of unread/unwritten shader inputs/outputsIan Romanick
Previously some shader input or outputs that hadn't received location assignments could slip through. This could happen when a shader contained user-defined varyings and was used with either fixed-function or assembly shaders. See the piglit tests glsl-[fv]s-user-varying-ff and sso-user-varying-0[12]. NOTE: this is a candidate for the 7.9 branch.
2010-10-19glsl: Commit generated file glsl_lexer.cppChad Versace
Changes are due to commit "glsl: Fix lexer rule for ^=".
2010-10-19glsl: Fix lexer rule for ^=Chad Versace
The caret is a special character, and needs to be quoted or escaped.
2010-10-19glsl: Implement ast-to-hir for bit-logic opsChad Versace
Implement by adding to ast_expression::hir() the following cases: - ast_and_assign - ast_or_assign - ast_xor_assign
2010-10-19glsl: Define bit_logic_result_type() in ast_to_hir.cppChad Versace
This function type checks the operands of and returns the result type of bit-logic operations. It replaces the type checking performed in the following cases of ast_expression::hir() : - ast_bit_and - ast_bit_or - ast_bit_xor