summaryrefslogtreecommitdiffstats
path: root/src/glsl
Commit message (Collapse)AuthorAgeFilesLines
* glsl2: Fix scons build for all platformsJakob Bornecrantz2010-09-101-0/+1
|
* glsl2: Implement noise[1234] built-in functions using ir_unop_noiseIan Romanick2010-09-095-104/+458
|
* glsl2: Add lowering pass to remove noise opcodesIan Romanick2010-09-094-1/+75
|
* glsl2: Add ir_unop_noiseIan Romanick2010-09-092-0/+5
|
* glsl/builtins: normalize of a negative scalar should be -1.0.Kenneth Graunke2010-09-092-2/+2
|
* glsl: add several EmitNo* options, and MaxUnrollIterationsLuca Barbieri2010-09-086-10/+12
| | | | | | | | | This increases the chance that GLSL programs will actually work. Note that continues and returns are not yet lowered, so linking will just fail if not supported. Signed-off-by: Ian Romanick <[email protected]>
* glsl: Add info about talloc and optimization passes to the README.Eric Anholt2010-09-081-0/+26
|
* glsl: Update README talking about multi-instruction operations.Eric Anholt2010-09-081-4/+4
| | | | | | The previous thing taking multiple instructions ended up being handled at the IR level, as we suggested would be the common result. Pick a new one.
* glsl/builtins: Set the API in the fake context.Kenneth Graunke2010-09-082-0/+2
| | | | Otherwise it gets used uninitialized.
* glsl2: Clear out profile pointers in _mesa_glsl_release_functionsIan Romanick2010-09-082-0/+2
| | | | | | Otherwise builtin_profiles contains dangling pointers the next time _mesa_read_profile is called. I suspect this may fix bugzilla #29847, but I was never able to reproduce it.
* glsl: Fix for scalar float built-in definitions.Kenneth Graunke2010-09-083-4/+4
| | | | These need abs, and we need more tests.
* glsl: regenerate builtinsEric Anholt2010-09-081-1/+1
|
* glsl: Fix typo in builtin step() using a wrong channel.Eric Anholt2010-09-081-1/+1
|
* ir_validate: Ensure ir_binop_dot is only used on vector types.Kenneth Graunke2010-09-081-0/+1
|
* glsl: Refresh automatically generated file builtin_function.cpp.Kenneth Graunke2010-09-081-11/+9
|
* glsl/builtins: Don't use ir_binop_dot on floating point values.Kenneth Graunke2010-09-084-6/+6
| | | | ir_binop_dot is only defined for vector types. Use ir_binop_mul.
* glsl/builtins: Simplify degenerate scalar float cases.Kenneth Graunke2010-09-083-5/+3
| | | | | | | The code being generated was just stupid, considering that: - normalize(x) = 1.0 - length(x) = x - distance(x, y) = x - y
* glsl2: Make sure _mesa_glsl_parse_state constructor gets a contextIan Romanick2010-09-082-2/+4
| | | | | Fix an major regression in dc754586. Too bad that change was obviously never tested.
* glsl: Support GLSL ES in the standalone compile.Chia-I Wu2010-09-081-1/+3
| | | | GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.
* glsl: Require a context in _mesa_glsl_parse_state.Chia-I Wu2010-09-082-62/+62
| | | | | Create a dummy context in the standalone compiler and pass it to _mesa_glsl_parse_state.
* glcpp: Fix build on non-GCC compilers.Kenneth Graunke2010-09-072-90/+92
|
* ast_to_hir: Mark arrays as lvalues in GLSL ES, but prohibit assignment.Kenneth Graunke2010-09-071-1/+7
| | | | | | This allows them to be passed as out/inout parameters, but still prevents them from being used as the target of an assignment. This is per section 5.8 of the GLSL ES 1.00 specification.
* glsl: Allow overloading of built-ins without hiding in GLSL ES.Kenneth Graunke2010-09-071-1/+1
| | | | The rules are explicitly different from desktop GLSL.
* glsl: Move is_builtin flag back to ir_function_signature.Kenneth Graunke2010-09-079-15/+28
| | | | | | | | | | | This effectively reverts b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c. In desktop GLSL, defining a function with the same name as a built-in hides that built-in function completely, so there would never be built-in and user function signatures in the same ir_function. However, in GLSL ES, overloading built-ins is allowed, and does not hide the built-in signatures - so we're back to needing this.
* ast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.Kenneth Graunke2010-09-071-0/+9
|
* ast_to_hir: Reject unsized array declarations in GLSL ES 1.00.Kenneth Graunke2010-09-071-9/+18
|
* ast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.Kenneth Graunke2010-09-071-1/+1
| | | | Everything but 1.10 supports this, so just change the check to ==.
* linker: Fix assertion and cross-version checks for version 100.Kenneth Graunke2010-09-071-2/+3
| | | | | | Fixes an assert (min_version >= 110) which was no longer correct, and also prohibits linking ES2 shaders with non-ES2 shaders. I'm not positive this is correct, but the specification doesn't seem to say.
* glsl: Add built-in function profiles for GLSL ES 1.00.Kenneth Graunke2010-09-073-11/+2953
|
* glsl: Add built-in variables for GLSL ES 1.00.Kenneth Graunke2010-09-072-0/+82
|
* glsl: Split out types that are in 1.10 but not GLSL ES 1.00.Kenneth Graunke2010-09-073-15/+35
|
* glsl: Recognize GLSL ES 1.00 keywords.Kenneth Graunke2010-09-074-281/+287
|
* glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke2010-09-078-227/+249
| | | | Also define it if #version 100 is encountered.
* glsl: Accept language version 100 and make it the default on ES2.Kenneth Graunke2010-09-074-242/+255
|
* glsl: Set default language version in mesa_glsl_parse_state constructor.Kenneth Graunke2010-09-074-260/+249
| | | | | | | | | | This should make it easier to change the default version based on the API (say, version 1.00 for OpenGL ES). Also, synchronize the symbol table's version with the parse state's version just before doing AST-to-HIR. This way, it will be set when it matters, but the main initialization code doesn't have to care about the symbol table.
* glsl2: Forbid array-types in ?: operator in GLSL 1.10Ian Romanick2010-09-071-0/+11
| | | | Fixes bugzilla #30039.
* glsl2: Early return with visit_continue in ↵Ian Romanick2010-09-071-1/+1
| | | | | | | | | | | | loop_analysis::visit(ir_dereference_variable *) Returning early with visit_continue_with_parent prevented the then-statements and else-statements of if-statements such as the following from being processed: if (some_var) { ... } else { ... } Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.
* glsl: Change grammar rules for selection statements to match the spec.Kenneth Graunke2010-09-073-950/+913
| | | | | | Fixes piglit test case loop-06.vert. Unfortunately, causes 1 shift/reduce conflict.
* glsl2: check for _NumLinkedShaders being 0Török Edvin2010-09-071-1/+1
| | | | | | | Otherwise spring 0.82+.4.0 crashes when starting a game because prog->_LinkedShaders[0] is NULL. This also fixes piglit test cases glsl-link-empty-prog-0[12].
* glsl: Add new files to sconscript.José Fonseca2010-09-051-0/+3
|
* ir_reader: Only validate IR when a global 'debug' flag is set.Kenneth Graunke2010-09-051-1/+4
| | | | | | | | | This extra validation is very useful when working on the built-ins, but in general overkill - the results should stay the same unless the built-ins or ir_validate have changed. Also, validating all the built-in functions in every test case makes piglit run unacceptably slow.
* ir_reader: Run ir_validate on the generated IR.Kenneth Graunke2010-09-041-0/+2
| | | | It's just too easy to get something wrong in hand-written IR.
* ir_reader: Emit global variables at the top of the instruction list.Kenneth Graunke2010-09-041-2/+11
| | | | | | | | Since functions are emitted when scanning for prototypes, functions always come first, even if the original IR listed the variable declarations first. Fixes an ir_validate error (to be turned on in the next commit).
* ir_reader: Drop support for reading the old assignment format.Kenneth Graunke2010-09-041-6/+4
|
* glsl: Regenerate autogenerated file builtin_function.cpp.Kenneth Graunke2010-09-041-402/+390
|
* glsl/builtins: Convert assignments to new format (with write mask).Kenneth Graunke2010-09-0415-398/+389
|
* ir_reader: Read the new assignment format (with write mask).Kenneth Graunke2010-09-041-6/+46
| | | | | This preserves the ability to read the old format, for momentary compatibility with all the existing IR implementations of built-ins.
* ir_reader: Track the current function and report it in error messages.Kenneth Graunke2010-09-041-0/+6
|
* glsl/builtins: Actually print the info log if reading a builtin failed.Kenneth Graunke2010-09-041-0/+1
|
* exec_list: replace class with structBrian Paul2010-09-031-1/+1
| | | | To match the definition below.