summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Work-arounds for platforms that lack C99 math functionsIan Romanick2010-08-131-0/+28
|
* glsl2/Makefile: Add a 'make builtins' target.Kenneth Graunke2010-08-131-1/+6
| | | | | | | | | This copies over a dummy builtin_functions.cpp and rebuilds a bootstrapped version of the compiler, then uses that to generate the proper list of builtins. Finally, it rebuilds the compiler with the new list. Unfortunately, it's no longer automatic, but at least it works.
* glsl2: Rework builtin function generation.Kenneth Graunke2010-08-13102-5685/+15738
| | | | | | | | | | | | | | | | Each language version/extension and target now has a "profile" containing all of the available builtin function prototypes. These are written in GLSL, and come directly out of the GLSL spec (except for expanding genType). A new builtins/ir/ folder contains the hand-written IR for each builtin, regardless of what version includes it. Only those definitions that have prototypes in the profile will be included. The autogenerated IR for texture builtins is no longer written to disk, so there's no longer any confusion as to what's hand-written or generated. All scripts are now in python instead of perl.
* ir_reader: Don't mark functions as defined if their body is empty.Kenneth Graunke2010-08-131-1/+1
|
* glsl2: Commit generated file change by commit ab18be74Ian Romanick2010-08-131-10/+2
| | | | | This would have been included in commit 23f6017d, but make wisely did not regenerate the file when the .lpp file did not change.
* glsl2: Add a pass to strip out noop swizzles.Eric Anholt2010-08-134-0/+83
| | | | | | With the glsl2-965 branch, the optimization of glsl-algebraic-rcp-rcp regressed due to noop swizzles hiding information from ir_algebraic. This cleans up those noop swizzles for us.
* glsl2: Convert ir_constant_propagation to ir_rvalue_visitor.Eric Anholt2010-08-131-55/+9
| | | | This one is a little tricky because of the LHS handling.
* glsl2: Add a generic visitor class to call back with pointers to each rvalue.Eric Anholt2010-08-135-208/+203
| | | | | I keep copy and pasting this code all over, so consolidate it in one place.
* mesa: Avoid using c++ keyword in dri_util.h when compiled with c++.Eric Anholt2010-08-131-0/+4
|
* intel: Remove include of texmem.h, since we haven't used it in ages.Eric Anholt2010-08-134-4/+2
|
* glsl2: Move ir_to_mesa handling to driver CompileShader and LinkShader hooks.Eric Anholt2010-08-134-52/+99
| | | | | This lets drivers override ir_to_mesa with their own codegen, or at least have a native alternative.
* glsl2: Add support for ir_unop_neg to ir_mat_op_to_vecEric Anholt2010-08-131-0/+24
|
* glsl2: Move the common optimization passes to a helper function.Eric Anholt2010-08-134-73/+72
| | | | | These are passes that we expect all codegen to be happy with. The other lowering passes for Mesa IR are moved to the Mesa IR generator.
* glsl2: Refresh autogenerated bison parser.Kenneth Graunke2010-08-132-118/+125
|
* Fix an MSVC build error (bugzilla 29570).Vinson Lee2010-08-131-1/+1
|
* glsl2: Remove unnecessary use of 'struct' before type namesIan Romanick2010-08-136-58/+57
| | | | | | | | In C++ you don't have to say 'struct' or 'class' if the declaration of the type has been seen. Some compilers will complain if you use 'struct' when 'class' should have been used and vice versa. Fixes bugzilla #29539.
* glsl2: Use stdint.h instead of inttypes.hIan Romanick2010-08-134-4/+4
|
* glsl2: Commit generated file changed by previous commitIan Romanick2010-08-131-55/+47
|
* glsl2: Use --nounistd to fix MSVC buildIan Romanick2010-08-132-2/+3
| | | | | Also remove the --never-interactive command line option for the preprocessor lexer. This was already done for main compiler lexer.
* linker: Assign attrib location 0 if gl_Vertex is not usedIan Romanick2010-08-131-1/+36
| | | | | | | If gl_Vertex is not used in the shader, then attribute location 0 is available for use. Fixes piglit test case glsl-getattriblocation (bugzilla #29540).
* glsl2: Include string.h in preprocessorJakob Bornecrantz2010-08-131-0/+1
|
* glsl2: Commit generated files changed by previous two commitsIan Romanick2010-08-133-1403/+1314
|
* glsl2: Avoid token name collisions with names used by Windows header filesIan Romanick2010-08-132-31/+31
|
* glsl2: Eliminate tokens for square matrix short namesIan Romanick2010-08-132-7/+4
| | | | | | MAT2 and MAT2X2, for example, are treated identically by the parser. The language version based error checking (becuase mat2x2 is not available in GLSL 1.10) is already done in the lexer.
* scons: Build the new glsl2 code.José Fonseca2010-08-133-43/+78
|
* talloc: Make it compile with MSVC, MinGW, and Xcode/gcc4.0.José Fonseca2010-08-134-3/+129
| | | | Based on Aras Pranckevičius' patch.
* talloc: Import 2.0.1 code.José Fonseca2010-08-135-0/+3792
|
* glsl2: Use MIN2 from macros.h instead of open coding itIan Romanick2010-08-121-11/+7
|
* glsl2: Use Elements from main/compiler.h instead of open-codingIan Romanick2010-08-126-16/+5
|
* mesa: check for null shader->InfoLog before printingBrian Paul2010-08-121-1/+3
|
* glsl2: Commit generated file changed by previous commitIan Romanick2010-08-121-0/+1
|
* glsl2: Add missing include of string.hIan Romanick2010-08-121-107/+108
| | | | Makes the build happy on non-GCC platforms.
* gallium: Link DRI drivers with g++ and test with CXXJakob Bornecrantz2010-08-121-8/+5
| | | | | New shader compiler need libc++ runtime. This works already if we are using llvm so this just covers the !llvm case.
* glsl2: Change command line options passed to flexIan Romanick2010-08-111-1/+1
| | | | | | | | | Remove --never-interactive because it is already specified in the source using %option. Use -o instead of --outfile. Some of the %option commands may also need to be removed for compatibility with older versions (e.g., 2.5.4) of flex. This should fix bugzilla #29209.
* glsl2: Commit generated files changed by previous commitIan Romanick2010-08-112-249/+249
|
* glsl2: Use bison command line option to set prefixIan Romanick2010-08-112-2/+1
| | | | | | Bison version 2.3 doesn't seem to support %name-prefix in the source. This should fix bugzilla #29207.
* glsl2: Commit generated files changed by previous commitIan Romanick2010-08-113-1259/+1287
|
* glsl2: Emit error from lexer when illegal reserved word is encounteredIan Romanick2010-08-112-41/+53
| | | | | | | | Without this, the parser will generate obtuse, useless error diagnostics when reservered word that are not used by the grammar are encountered in a shader. Fixes bugzilla #29519.
* glsl2: Don't declare a variable called sig that shadows the other oneIan Romanick2010-08-111-1/+1
| | | | | | | | | Accidentally having a variable called 'sig' within an if-statement cause the higher scope 'sig' to always be NULL. As a result a new function signature was created for a function definition even when one already existed from a prototype declaration. Fixes piglit test case glsl-function-prototype (bugzilla #29520).
* glcpp: Fix "unterminated if" diagnostic.Carl Worth2010-08-114-4/+8
| | | | | | | | | | | This was previously being appended to the output string *after* a copy of the supposedly final string was made and handed to the caller. So the diagnostic was never actually visible to the user. We fix this by moving the check for an unterminated #if from glcpp_parser_destroy to the calling function, preprocess. This fixes the test case 083-unterminated-if.c.
* glccp: Regenerate glcpp-parse.cCarl Worth2010-08-111-376/+393
| | | | Due to a recent change to glcpp-parse.y.
* glcpp: Add an explicit diagnostic for #if with no expression.Carl Worth2010-08-112-1/+14
| | | | | | | This is more clear than the previously-generated diagnostic which was something confusing like "enexpected newline". This change makse test 080-if-witout-expression.c now pass.
* glcpp: Reword diagnostic for #elif with no expressionCarl Worth2010-08-113-3/+2
| | | | | | Rather than telling the user what to fix, the standard convention is to describe what the detected problem is. With this change, test 081-elif-without-expression now passes.
* glcpp: Add several tests for diagnostics.Carl Worth2010-08-1120-0/+72
| | | | | | Which are proving to be useful since some of these tests are not yet acting as desired, (in particular, the unterminated if test is not generating any diagnostic).
* glcpp: Regenerate glcpp-lex.cCarl Worth2010-08-111-9/+23
| | | | After a recent change to glcpp-lex.l
* glcpp: Initialize line and column numbers to 1, not 0.Carl Worth2010-08-111-1/+1
| | | | | Error messages make more sense this way since the convention is for the first line of a file to be numbered from 1, rather than 0.
* glcpp-test: Capture the stderr output of the preprocessor.Carl Worth2010-08-111-1/+1
| | | | This allows writing tests that verify diagnostics from the preprocessor.
* osmesa: link with new libglsl.a libBrian Paul2010-08-111-2/+1
|
* glsl2: added casts to silence warningsBrian Paul2010-08-113-12/+12
|
* glsl2: remove stray semicolonBrian Paul2010-08-111-1/+1
|