summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* configs: added -ltalloc to config filesBrian Paul2010-08-112-2/+2
|
* 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
|
* glsl2: added casts to silence warningsBrian Paul2010-08-111-4/+4
|
* glsl2: add cast to silence warningBrian Paul2010-08-111-1/+1
|
* glsl2: remove stray semicolonBrian Paul2010-08-111-1/+1
|
* glsl2: move declarations before codeBrian Paul2010-08-111-2/+4
|
* glsl2: remove trailing comma to silence warningBrian Paul2010-08-111-1/+1
|
* glcpp: Clean up intermediate file when test suite is interrupted.Carl Worth2010-08-111-0/+2
| | | | | The glcpp-test script was leaving around bogus *.valgrind-errors files if a valgrind test was interrupted.
* glcpp: Regenerate glcpp-parse.cCarl Worth2010-08-111-111/+133
| | | | After a recent change to glcpp-parse.y
* glcpp: Additional fixes for not evaluating skipped #if/#elif expressions.Carl Worth2010-08-115-19/+61
| | | | | | This adds a couple of test cases to expand our coverage of invalid #if and being skipped, (either by being nested inside an #if/#elif that evaluates to zero or by being after an #if/#elif that evaluates to non-zero).
* glcpp/tests: Commit forgotten file 074-elif-undef.c.expected.Kenneth Graunke2010-08-101-0/+4
|
* texture_builtins.py: Remove useless comments.Kenneth Graunke2010-08-101-2/+2
|
* glcpp: Discard output of cmp when running the test suite.Carl Worth2010-08-101-1/+1
| | | | | | | We're already using the return-value of cmp to print either PASS or FAIL and in the case of failure, we're subsequently running and showing the output of diff. So any warnings/errors from cmp itself are not actually needed, and can be quite confusing.
* glcpp: Fix expected result for the 064-version.c test.Carl Worth2010-08-101-0/+1
| | | | | | Commit d4a04f315560704bf1103df0b93723e468725df7 caused this test case to produce an additional blank line, which is otherwise harmless, but does need to be reflected in the .expected file for the test to pass.
* glcpp: Regnerate glcpp-parse.c and glcpp-parse.hCarl Worth2010-08-102-215/+224
| | | | After making a minor change to the .y file.
* glcpp: Initialize location structure at beginning of parse.Carl Worth2010-08-101-0/+8
| | | | | | | | | | Since we have a custom structure for YYLTYPE locations, we need to use an %initial-action directive to avoid triggering use of uninitialized memory when, for example, printing error messages. We apparently don't yet have a test case that allowed valgrind to find this bug for us, but valgrind found a similar problem in the other parser, so we fix this one as well.
* glsl2: Regenerate glsl_parser.cpp and glsl_parser.hCarl Worth2010-08-102-496/+505
| | | | After making a minor change to the .y file.
* glsl2: Initialize location structure at beginning of parse.Carl Worth2010-08-101-1/+9
| | | | | | | | Since we have a custom structure for YYLTYPE locations, we need to use an %initial-action directive to avoid triggering use of uninitialized memory when, for example, printing error messages. Thanks to valgrind for noticing this bug.
* glsl2: Make ir_algebraic reassociate add/mul operands for constant folding.Eric Anholt2010-08-091-1/+107
| | | | | | | | It's rather easy to produce two constant multiplies separated by other multiplies while writing a BRDF shader, and non-obvious enough in the resulting codegen that I didn't catch it in my demo code until just recently. Cuts 3 965 instructions from my demo (<1%), and 20 from glsl-fs-raytrace (1.3%).
* glsl2: Add a pass to transform ir_binop_sub to add(op0, neg(op1))Eric Anholt2010-08-095-0/+80
| | | | | | All the current HW backends transform subtract to adding the negation, so I haven't bothered peepholing it back out in Mesa IR. This allows some subtract of subtract to get removed in ir_algebraic.
* glsl2: Add constant propagation.Eric Anholt2010-08-096-0/+486
| | | | | | | | Whereas constant folding evaluates constant expressions at rvalue nodes, constant propagation tracks constant components of vectors across execution to replace (possibly swizzled) variable dereferences with constant values, triggering possible constant folding or reduced variable liveness.
* i965: More s/stderr/stdout/ for program debug.Eric Anholt2010-08-093-3/+3
|
* glsl2: Teach copy propagation about "if" and "loop" instructions.Eric Anholt2010-08-091-90/+158
| | | | | | | | | This lets us track copies across basic block boundaries. The loop doesn't get a filled out list of available copies into it yet, though. glsl-fs-raytrace drops from 585 to 535 Mesa IR instructions out of the compiler, and it appears that Yo Frankie's largest shaders decrease in Mesa IR count by about 10% as well.
* glsl2: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke2010-08-091-2/+2
|
* texture_builtins.py: Fix cut and paste errors in function names.Kenneth Graunke2010-08-093-4/+4
| | | | Some signatures were being generated with the wrong function name.
* glsl2: Use gl_DepthRange's proper name.Kenneth Graunke2010-08-091-1/+1
| | | | | It was being incorrectly added as gl_DepthRangeParameters, which is the type name, not the variable name.
* ir_algebraic: Support other comparisons in ir_unop_logic_notIan Romanick2010-08-091-0/+4
|
* ir_algebraic: Convert ir_unop_logic_not handler to use a switch statementIan Romanick2010-08-091-9/+19
| | | | | | Currently only ir_binop_equal and ir_binop_nequal are supported, but soon all of the relational operators will be added. Making this change now will simplify those commits.
* glsl2: do not use __retval name; two underscores is reserved word according ↵Aras Pranckevicius2010-08-092-5/+5
| | | | to GLSL spec (and Win7 ATI drivers do complain about that)
* glsl: fix missing return in ir_structure_splittingAras Pranckevicius2010-08-091-0/+1
|
* glsl2: Handle plain variable copies in struct splitting.Eric Anholt2010-08-081-3/+51
| | | | | glsl-fs-raytrace goes from 620 Mesa IR instructions out of the compiler to 585.
* glsl2: Add the 1.30 reserved keywords.Kenneth Graunke2010-08-075-1710/+2162
|
* ir_function_inlining: Fix missing iter.next() in inlining sampler params.Aras Pranckevicius2010-08-061-0/+2
| | | | Fixes glsl-fs-function-samplers.
* copy_propagation: do propagation into non-out call paramsAras Pranckevicius2010-08-061-5/+11
|
* glsl2: Move gl_program->InputsRead/OutputsWritten setting to an ir pass.Eric Anholt2010-08-064-67/+175
| | | | | | | This lets us handle arrays much better than trying to work backwards from assembly. Fixes fbo-drawbuffers-maxtargets on swrast (i965 needs loop unrolling)
* ir_to_mesa: Add support for sampler arrays.Eric Anholt2010-08-063-13/+43
| | | | | | | | | Support for samplers in general is still incomplete -- anything in a uniform struct will still be broken. But that doesn't appear to be any different from master. Fixes: glsl-fs-uniform-sampler-array.shader_test
* glsl2: Fix inlining with sampler array or struct dereferences as arguments.Eric Anholt2010-08-061-5/+138
| | | | | | | Previously, we'd replace an argument of mysampler[2] with a plain reference to mysampler by using the cloning hash table. Instead, use a visitor to clone whatever complicated sampler dereference into the sampler parameter derefs in the inlined function body.
* glsl2: Don't assert in a couple of places when encountering sampler arrays.Eric Anholt2010-08-062-4/+11
| | | | Fixes glean shaderAPI.
* ir_to_mesa: Give the expected size for _mesa_add_attribute().Eric Anholt2010-08-061-1/+2
| | | | Fixes a failure in glean shaderAPI.
* ir_to_mesa: Handle texture-array samplersIan Romanick2010-08-051-2/+4
| | | | Fixes piglit test array_texture.
* glsl2: Enable all supported extensions in stand-alone compilerIan Romanick2010-08-051-0/+5
|