summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_codegen.c
AgeCommit message (Collapse)Author
2010-06-10mesa: move shader/slang/* sources to main/slang/*Brian Paul
Reduce the source tree depth a bit.
2010-05-24glsl: silence unused var warningsBrian Paul
2010-05-24mesa: Handle FEATURE_es2_glsl differences at runtime tooKristian Høgsberg
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
2010-05-03glsl: change variable declared assertion into conditionalBrian Paul
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.
2010-05-01glsl: s/sprintf/_mesa_snprintf/Vinson Lee
2010-04-01glsl: pass datatype to _mesa_add_varying()Brian Paul
Will be needed later for transform feedback support.
2010-03-04glsl: Remove unsigned greater than or equal zero comparison.Vinson Lee
2010-03-04glsl: Remove unsigned greater than or equal zero comparison.Vinson Lee
2010-03-04glsl: Return NULL on _slan_gen_asm error path on non-debug builds.Vinson Lee
Exit the function early on the error path, instead of continuing, to prevent a null pointer dereference later on.
2010-02-27glsl: Move assert from outside to inside of _slang_gen_swizzle function.Vinson Lee
2010-02-27glsl: Assert pointer is not null before dereferencing.Vinson Lee
2010-02-25glsl: implement support for GL_EXT_texture_arrayBrian Paul
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.
2010-02-19mesa: restore _mesa_snprintf() - it's needed for WindowsBrian Paul
This reverts part of commit 298be2b028263b2c343a707662c6fbfa18293cb2
2010-02-19Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg
2010-02-19Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg
2010-02-19Remove _mesa_strcmp in favor of plain strcmp.Kenneth Graunke
2010-02-13mesa: Fix compiler warningsKarl Schultz
Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio.
2010-01-27mesa: fix double->float assignment warnings, int/uint comparison warningsBrian Paul
Reported by Karl Schultz.
2010-01-04glsl: use varName variable in _slang_gen_assignment()Brian Paul
2009-12-29glsl: added uniform initializer checkBrian Paul
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.
2009-11-17mesa: fix assorted compiler warningsBrian Paul
2009-09-29glsl: add support for CMP instructionBrian Paul
2009-09-24glsl: init var to silence warningBrian Paul
2009-08-12glsl: move predefined shader input/output info/code to slang_builtin.cBrian Paul
This is a more logical place for this code. Also add some functions for querying vertex shader input names, types, etc.
2009-07-09glsl: do const parameter optimization for array element actual parametersBrian Paul
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.
2009-06-26glsl: move/simplify error checking for 'return' statementsBrian Paul
2009-06-26glsl: overhaul 'return' statement handlingBrian Paul
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.
2009-06-26glsl: predicate assignments according to __returnFlagBrian Paul
Fixes glean "function with early return (3)" case (when EmitContReturn=FALSE).
2009-06-26glsl: silence a problem warningBrian Paul
2009-06-26glsl: code refactoring for return statementsBrian Paul
2009-06-26glsl: fix assorted regressions related to early-return-removalBrian Paul
2009-06-26glsl: rework loop nesting codeBrian Paul
2009-06-26glsl: remove test for loop unrolling when we hit conditional cont/breakBrian Paul
This is no longer needed since we added the new _slang_loop_contains_continue_or_break() function/test.
2009-06-26glsl: checkpoint: predicate __retVal = expr with __returnFlagBrian Paul
The glean "function with early return (1)" test passes now.
2009-06-26glsl: use new helper functions in _slang_gen_logical_and/or()Brian Paul
2009-06-26glsl: checkpoint: replace 'return' with __returnFlag=true;Brian Paul
Needed for "remove early returns" transformation.
2009-06-26glsl: fix uninitialized var in _slang_gen_for_without_continue()Brian Paul
2009-06-26glsl: check-point: declare _returnFlagBrian Paul
2009-06-26glsl: use slang_generate_declaration() to consolidate some codeBrian Paul
2009-06-26glsl: remove obsolete commentBrian Paul
2009-06-26glsl: implement _slang_gen_while_without_continue()Brian Paul
2009-06-26glsl: fix a bug involving 'continue' in 'for' loopsBrian Paul
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.
2009-06-26glsl: use _slang_loop_contains_continue_or_break() to check for unrollingBrian Paul
The previous test failed for nested loops.
2009-06-26glsl: use new _slang_loop_contains_continue() helper functionBrian Paul
2009-06-26glsl: implement continue->break translation for do-while loopsBrian Paul
2009-06-26glsl: remove debug code, misc clean-upBrian Paul
2009-06-26glsl: implement continue->break transformation for for-loopsBrian Paul
2009-06-26glsl: don't unroll loops containing continue/breakBrian Paul
Just search the AST in _slang_can_unroll_for_loop().
2009-06-26Revert "slang: if/else/break & if/else/continue work for unrolled loops"Brian Paul
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
2009-04-01glsl: implement compiling/linking of separate compilation unitsBrian Paul
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.