summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_codegen.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: move shader/slang/* sources to main/slang/*Brian Paul2010-06-101-5357/+0
| | | | Reduce the source tree depth a bit.
* glsl: silence unused var warningsBrian Paul2010-05-241-0/+1
|
* mesa: Handle FEATURE_es2_glsl differences at runtime tooKristian Høgsberg2010-05-241-1/+3
| | | | | | | Now that we can support different APIs at runtime, we need to check the context for the API we're currently providing as well. https://bugs.freedesktop.org/show_bug.cgi?id=28194
* glsl: change variable declared assertion into conditionalBrian Paul2010-05-031-2/+1
| | | | | | | | | The slang_variable::declared field originated as a debug field but can be promoted for use during sematic error checking. Fixes fd.o bug 27921. NOTE: this is a candidate for back-porting to the 7.8 stable branch.
* glsl: s/sprintf/_mesa_snprintf/Vinson Lee2010-05-011-1/+1
|
* glsl: pass datatype to _mesa_add_varying()Brian Paul2010-04-011-1/+1
| | | | Will be needed later for transform feedback support.
* glsl: Remove unsigned greater than or equal zero comparison.Vinson Lee2010-03-041-1/+1
|
* glsl: Remove unsigned greater than or equal zero comparison.Vinson Lee2010-03-041-1/+1
|
* glsl: Return NULL on _slan_gen_asm error path on non-debug builds.Vinson Lee2010-03-041-0/+1
| | | | | Exit the function early on the error path, instead of continuing, to prevent a null pointer dereference later on.
* glsl: Move assert from outside to inside of _slang_gen_swizzle function.Vinson Lee2010-02-271-1/+1
|
* glsl: Assert pointer is not null before dereferencing.Vinson Lee2010-02-271-0/+1
|
* glsl: implement support for GL_EXT_texture_arrayBrian Paul2010-02-251-26/+50
| | | | | | | | GL_EXT_texture_array is different from the existing GL_MESA_texture_array support in that the former is only supported for GLSL, not fixed-function. The shadow compare versions of the sampler functions haven't been tested yet. The non-shadow versions have been tested with a new piglit test.
* mesa: restore _mesa_snprintf() - it's needed for WindowsBrian Paul2010-02-191-2/+2
| | | | This reverts part of commit 298be2b028263b2c343a707662c6fbfa18293cb2
* Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg2010-02-191-2/+2
|
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-3/+3
|
* Remove _mesa_strcmp in favor of plain strcmp.Kenneth Graunke2010-02-191-4/+4
|
* mesa: Fix compiler warningsKarl Schultz2010-02-131-1/+1
| | | | | Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio.
* mesa: fix double->float assignment warnings, int/uint comparison warningsBrian Paul2010-01-271-1/+1
| | | | Reported by Karl Schultz.
* glsl: use varName variable in _slang_gen_assignment()Brian Paul2010-01-041-3/+4
|
* glsl: added uniform initializer checkBrian Paul2009-12-291-0/+8
| | | | | | | | | GLSL 1.10 disallows initializers for uniforms but GLSL 1.20 and later allows them. This patch uses the #version directive to allow/disallow uniform initializers. This addresses bug 25807, but piglit also needs to be fixed to specify the GLSL version in the shader.
* mesa: fix assorted compiler warningsBrian Paul2009-11-171-1/+1
|
* glsl: add support for CMP instructionBrian Paul2009-09-291-0/+1
|
* glsl: init var to silence warningBrian Paul2009-09-241-1/+1
|
* glsl: move predefined shader input/output info/code to slang_builtin.cBrian Paul2009-08-121-103/+1
| | | | | This is a more logical place for this code. Also add some functions for querying vertex shader input names, types, etc.
* glsl: do const parameter optimization for array element actual parametersBrian Paul2009-07-091-2/+3
| | | | | | | | | | When a function parameter is const-qualified we can avoid making a copy of the actual parameter (we basically do a search/replace when inlining). This is now done for array element params too, resulting in better code (fewer MOV instructions). We should allow some other types of function arguments here but let's be conservative for the moment.
* glsl: move/simplify error checking for 'return' statementsBrian Paul2009-06-261-22/+14
|
* glsl: overhaul 'return' statement handlingBrian Paul2009-06-261-214/+202
| | | | | | | A new node type (SLANG_OPER_RETURN_INLINED) is used to denote 'return' statements inside inlined functions which need special handling. All glean glsl1 tests pass for EmitContReturn=FALSE and TRUE.
* glsl: predicate assignments according to __returnFlagBrian Paul2009-06-261-4/+29
| | | | Fixes glean "function with early return (3)" case (when EmitContReturn=FALSE).
* glsl: silence a problem warningBrian Paul2009-06-261-1/+2
|
* glsl: code refactoring for return statementsBrian Paul2009-06-261-70/+88
|
* glsl: fix assorted regressions related to early-return-removalBrian Paul2009-06-261-14/+34
|
* glsl: rework loop nesting codeBrian Paul2009-06-261-39/+79
|
* glsl: remove test for loop unrolling when we hit conditional cont/breakBrian Paul2009-06-261-4/+0
| | | | | This is no longer needed since we added the new _slang_loop_contains_continue_or_break() function/test.
* glsl: checkpoint: predicate __retVal = expr with __returnFlagBrian Paul2009-06-261-26/+60
| | | | The glean "function with early return (1)" test passes now.
* glsl: use new helper functions in _slang_gen_logical_and/or()Brian Paul2009-06-261-15/+9
|
* glsl: checkpoint: replace 'return' with __returnFlag=true;Brian Paul2009-06-261-7/+68
| | | | Needed for "remove early returns" transformation.
* glsl: fix uninitialized var in _slang_gen_for_without_continue()Brian Paul2009-06-261-1/+1
|
* glsl: check-point: declare _returnFlagBrian Paul2009-06-261-0/+33
|
* glsl: use slang_generate_declaration() to consolidate some codeBrian Paul2009-06-261-31/+37
|
* glsl: remove obsolete commentBrian Paul2009-06-261-3/+0
|
* glsl: implement _slang_gen_while_without_continue()Brian Paul2009-06-261-82/+115
|
* glsl: fix a bug involving 'continue' in 'for' loopsBrian Paul2009-06-261-23/+43
| | | | | | | | Need to execute the for loop's increment code before we continue. Add a slang_assemble_ctx::CurLoopOper field to keep track of the containing loop and avoid the "cont if true" path in this situation. Plus, assorted clean-ups.
* glsl: use _slang_loop_contains_continue_or_break() to check for unrollingBrian Paul2009-06-261-5/+36
| | | | The previous test failed for nested loops.
* glsl: use new _slang_loop_contains_continue() helper functionBrian Paul2009-06-261-5/+126
|
* glsl: implement continue->break translation for do-while loopsBrian Paul2009-06-261-15/+219
|
* glsl: remove debug code, misc clean-upBrian Paul2009-06-261-5/+0
|
* glsl: implement continue->break transformation for for-loopsBrian Paul2009-06-261-3/+167
|
* glsl: don't unroll loops containing continue/breakBrian Paul2009-06-261-0/+6
| | | | Just search the AST in _slang_can_unroll_for_loop().
* Revert "slang: if/else/break & if/else/continue work for unrolled loops"Brian Paul2009-06-261-37/+7
| | | | | | | | | | | We should just check if the loop contains a continue/break in the _slang_can_unroll_for_loop() test function... This reverts commit 989856bde47d699d7e18798df4013fbf962e1d4b. Conflicts: src/mesa/shader/slang/slang_codegen.h
* glsl: implement compiling/linking of separate compilation unitsBrian Paul2009-04-011-5/+14
| | | | | | | | | A shader program may consist of multiple shaders (source code units). If we find there are unresolved functions after compiling the unit that defines main(), we'll concatenate all the respective vertex or fragment shaders then recompile. This isn't foolproof but should work in most cases.