summaryrefslogtreecommitdiffstats
path: root/src/glsl
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Fix ir_expression::constant_expression_value()Chad Versace2010-11-091-0/+3
| | | | | When the type of the ir_expression is error_type, return NULL. This fixes bug 31371.
* ir_dead_functions: Actually free dead functions and signatures.Kenneth Graunke2010-11-081-0/+2
| | | | | This makes linked shaders use around 36k less memory since the built-in prototypes are now freed.
* r600g: implement texture_get_handle (needed for eglExportDRMImageMESA)Benjamin Franzke2010-11-083-261/+250
|
* ir_reader: Fix some potential NULL pointer dereferences.Kenneth Graunke2010-11-031-4/+4
| | | | Found by inspection.
* ir_reader: Remove useless error check.Kenneth Graunke2010-11-031-6/+0
| | | | | It's already been determined that length == 3, so clearly swiz->next is a valid S-Expression.
* ir_reader: Return a specific ir_dereference variant.Kenneth Graunke2010-11-031-6/+9
| | | | | There's really no reason to return the base class when we have more specific information about what type it is.
* glsl: Don't print a useless space at the end of an S-Expression list.Kenneth Graunke2010-11-031-1/+2
| | | | | | 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.
* Refresh autogenerated file builtin_function.cpp.Kenneth Graunke2010-11-031-24/+9
|
* glsl/builtins: Clean up some ugly autogenerated code in atan.Kenneth Graunke2010-11-031-20/+5
| | | | | | 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.
* glsl/builtins: Rename 'x' to 'y_over_x' in atan(float) implementation.Kenneth Graunke2010-11-031-4/+4
| | | | For consistency with the vec2/vec3/vec4 variants.
* glsl: Remove unused ARRAY_SIZE macro.Kenneth Graunke2010-10-291-4/+0
| | | | It's also equivalent to Elements(...) which is already used elsewhere.
* Fix build on systems where "python" is python 3.Kenneth Graunke2010-10-271-1/+1
| | | | | | | | | | | 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 <[email protected]> Signed-off-by: Matthew William Cox <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Fix constant component count in vector constructor emitting.Kenneth Graunke2010-10-251-1/+1
| | | | | Fixes freedesktop.org bug #31101 as well as piglit test cases assignment-type-mismatch.vert and constructor-28.vert.
* glsl: Fix ast-to-hir for ARB_fragment_coord_conventionsChad Versace2010-10-251-1/+1
| | | | | | | | | | | 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 <[email protected]>
* Refresh autogenerated file builtin_function.cpp.Kenneth Graunke2010-10-211-3160/+205
| | | | | | 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.
* generate_builtins.py: Output large strings as arrays of characters.Kenneth Graunke2010-10-211-2/+14
| | | | | | 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.
* glsl: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke2010-10-211-0/+88
|
* glsl: Add support for GLSL 1.30's modf built-in.Kenneth Graunke2010-10-213-0/+51
|
* glcpp: Refresh autogenerated lexer file.Kenneth Graunke2010-10-211-23/+13
|
* glcpp: Return NEWLINE token for newlines inside multi-line comments.Kenneth Graunke2010-10-211-2/+2
| | | | This is necessary for the main compiler to get correct line numbers.
* glsl: Remove useless ir_shader enumeration value.Kenneth Graunke2010-10-204-12/+2
|
* glsl: Add assert for unhandled ir_shader case.Vinson Lee2010-10-201-0/+4
| | | | | | | | 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
* linker: Improve handling of unread/unwritten shader inputs/outputsIan Romanick2010-10-191-11/+25
| | | | | | | | | | | | 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.
* glsl: Commit generated file glsl_lexer.cppChad Versace2010-10-191-312/+312
| | | | Changes are due to commit "glsl: Fix lexer rule for ^=".
* glsl: Fix lexer rule for ^=Chad Versace2010-10-191-1/+1
| | | | The caret is a special character, and needs to be quoted or escaped.
* glsl: Implement ast-to-hir for bit-logic opsChad Versace2010-10-191-4/+12
| | | | | | | Implement by adding to ast_expression::hir() the following cases: - ast_and_assign - ast_or_assign - ast_xor_assign
* glsl: Define bit_logic_result_type() in ast_to_hir.cppChad Versace2010-10-191-32/+67
| | | | | | | | | 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
* glsl: Implement ast-to-hir for bit-shift-assignmentChad Versace2010-10-191-4/+12
| | | | | | Implement by adding to ast_expression::hir() these cases: - ast_ls_assign - ast_rs_assign
* glsl: Define shift_result_type() in ast_to_hir.cppChad Versace2010-10-191-41/+67
| | | | | | | | This function type checks the operands of and returns the result type of bit-shift operations. It replaces the type checking performed in the following cases of ast_expression::hir() : - ast_lshift - ast_rshift
* glsl: Regenerate parser files.Kenneth Graunke2010-10-182-249/+256
|
* glsl: Fix copy and paste error in ast_bit_and node creation.Kenneth Graunke2010-10-181-1/+1
| | | | All & operations were incorrectly being generated as ast_bit_or.
* glsl: Don't return NULL IR for erroneous bit-shift operators.Kenneth Graunke2010-10-181-5/+0
| | | | | | | | Existing code relies on IR being generated (possibly with error type) rather than returning NULL. So, don't break - go ahead and generate the operation. As long as an error is flagged, things will work out. Fixes fd.o bug #30914.
* glsl: add ir_unop_round_even case to silence unhandled enum warningBrian Paul2010-10-151-0/+1
|
* linker: Trivial indention fixIan Romanick2010-10-151-2/+2
|
* glsl: Fix ir validation for bit logic opsChad Versace2010-10-151-5/+9
| | | | | | | | | | | | In ir_validate::visit_leave(), the cases for - ir_binop_bit_and - ir_binop_bit_xor - ir_binop_bit_or were incorrect. It was incorrectly asserted that both operands must be the same type, when in fact one may be scalar and the other a vector. It was also incorrectly asserted that the resultant type was the type of the left operand, which in fact does not hold when the left operand is a scalar and the right operand is a vector.
* glsl: Implement constant expr evaluation for bitwise logic opsChad Versace2010-10-151-0/+54
| | | | | | | | Implement by adding the following cases to ir_exporession::constant_expression_value(): - ir_binop_bit_and - ir_binop_bit_or - ir_binop_bit_xor
* glsl: Implement constant expr evaluation for bit-shift opsChad Versace2010-10-151-0/+48
| | | | | | | Implement by adding the following cases to ir_expression::constant_expression_value(): - ir_binop_lshfit - ir_binop_rshfit
* glsl: Implement constant expr evaluation for bitwise-notChad Versace2010-10-151-0/+15
| | | | | Implement by adding a case to ir_expression::constant_expression_value() for ir_unop_bit_not.
* glsl: Implement ast-to-hir for binary shifts in GLSL 1.30Chad Versace2010-10-152-3/+71
| | | | | | | | | | Implement by adding the following cases to ast_expression::hir(): - ast_lshift - ast_rshift Also, implement ir validation for the new operators by adding the following cases to ir_validate::visit_leave(): - ir_binop_lshift - ir_binop_rshift
* glsl: Change generated file glsl_lexer.cppChad Versace2010-10-151-205/+215
|
* glsl: Add lexer rules for << and >> in GLSL 1.30Chad Versace2010-10-151-0/+2
| | | | Commit for generated file glsl_lexer.cpp follows this commit.
* glsl: Slightly change the semantic of _LinkedShadersIan Romanick2010-10-143-20/+84
| | | | | | | | | | | | | | | Previously _LinkedShaders was a compact array of the linked shaders for each shader stage. Now it is arranged such that each slot, indexed by the MESA_SHADER_* defines, refers to a specific shader stage. As a result, some slots will be NULL. This makes things a little more complex in the linker, but it simplifies things in other places. As a side effect _NumLinkedShaders is removed. NOTE: This may be a candidate for the 7.9 branch. If there are other patches that get backported to 7.9 that use _LinkedShader, this patch should be cherry picked also.
* glsl: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke2010-10-141-0/+120
|
* glsl: Add support for the 1.30 round() built-in.Kenneth Graunke2010-10-143-0/+31
| | | | | | | This implements round() via the ir_unop_round_even opcode, rather than adding a new opcode. We may wish to add one in the future, since it might enable a small performance increase on some hardware, but for now, this should suffice.
* glsl: Add front-end support for GLSL 1.30's roundEven built-in.Kenneth Graunke2010-10-143-0/+31
| | | | Implemented using the op-code introduced in the previous commit.
* glsl: Add a new ir_unop_round_even opcode for GLSL 1.30's roundEven.Kenneth Graunke2010-10-142-0/+3
| | | | Also, update ir_to_mesa's "1.30 is unsupported" case to "handle" it.
* glsl: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke2010-10-141-0/+60
|
* glsl: Add front-end support for the "trunc" built-in.Kenneth Graunke2010-10-143-0/+31
|
* linker: Reject shaders that have unresolved function callsIan Romanick2010-10-131-2/+6
| | | | | | | | | | This really amounts to just using the return value from link_function_calls. All the work was being done, but the result was being ignored. Fixes piglit test link-unresolved-funciton. NOTE: this is a candidate for the 7.9 branch.
* glsl: Initialize variable in ir_derefence_array::constant_expression_valueVinson Lee2010-10-131-1/+1
| | | | | | | Completely initialize data passed to ir_constant constructor. Fixes piglit glsl-mat-from-int-ctor-03 valgrind uninitialized value error on softpipe.