summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_codegen.c
AgeCommit message (Collapse)Author
2008-09-25mesa: prevent the slang code generator from aborting when faced with a ↵Sam Hocevar
sampler variable redeclaration.
2008-08-25mesa: glsl: grab latest fixes from gallium-0.1 branchBrian Paul
Includes: 1. Fixes failed asserting about bad swizzles in src reg emit. 2. Tracks uniform var usage. 3. Emit exp() in terms of EXP2 instruction.
2008-08-16mesa: import latest GLSL code from gallium-0.1 branchBrian Paul
2008-08-06mesa: glsl: count number of temp regs usedHaihao Xiang
2008-07-29mesa: cast to fix warningBrian Paul
2008-07-29mesa: fix bug/failure in recursive function inliningBrian Paul
Fixes a failure for cases such as y = f(a, f(a, b)) All the usual tests still pass but regressions are possible...
2008-07-29mesa: remove stray debug codeBrian Paul
2008-07-29mesa: glsl: assorted fixes for resolving polymorphic functionsBrian Paul
Plus, - fix some issues in casting function arguments to format param types. - fix some vec/mat constructor bugs - find/report more syntax/semantic errors
2008-07-29mesa: glsl: additional error detectionBrian Paul
Plus begin some fixes for vec/matrix constructors.
2008-07-29mesa: gls: fix broken else clause of conditional break/continueBrian Paul
In the following case: for () { if (cond) break; // or continue; else something; } The "something" block didn't get emitted.
2008-07-29mesa: Silence compiler warning on windows.Michal Krol
2008-07-29mesa: glsl: mark constructor params as constBrian Paul
2008-07-29mesa: glsl: rework swizzle storage handlingBrian Paul
Build on the heirarchal approach implemented for arrays/structs.
2008-07-29mesa: glsl: implement constructor functions for user-defined typesBrian Paul
2008-07-29mesa: fix +=, -=, etc. operatorsBrian Paul
2008-07-29mesa: assorted glsl uniform/attribute fixesBrian Paul
Fix incorrect uniform/attribute size query results. Add missing error checking for glUniform, glUniformMatrix params Fix an array size/allocation error.
2008-07-29mesa: glsl: various writemask/swizzle improvements and clean-upsBrian Paul
2008-07-29mesa: rework array/struct addressing code.Brian Paul
The slang_ir_storage type now has a pointer to parent storage to represent storage of an array element within an array, or a field within a struct. This fixes some problems related to addressing of fields/elements in non- trivial cases. More work to follow.
2008-07-29mesa: fix some function inlining bugsBrian Paul
Need to add local vars of original function to the new scope's variable list (though the DECLs were already present). In slang_operation_copy() call slang_replace_scope() for SLANG_OPER_BLOCK_NEW_SCOPE opers.
2008-07-03mesa: fix array storage allocation bugBrian Paul
2008-07-01mesa: fix a GLSL vector subscript/writemask bugBrian Paul
This fixes a failure for cases like: vec4 v; v[1] *= 2.0; The v[1] actually acts like a writemask, equivalent to v.y The fix is a bit convoluted, but will do for now.
2008-07-01mesa: move some functionsBrian Paul
2008-07-01mesa: better function inlining in the presence of 'return' statementsBrian Paul
Before, the presence of a 'return' statement always prevented inlining a function. This was because we didn't want to accidentally return from the _calling_ function. We still need the semantic of 'return' when inlining but we can't always use unconditional branches/jumps (GPUs don't always support arbitrary branching). Now, we allow inlining functions w/ return if the return is the last statement in the function. This fixes the common case of a function that returns a value, such as: vec4 square(const in vec4 x) { return x * x; } which effectively compiles into: vec4 square(const in vec4 x) { __retVal = x * x; return; } The 'return' can be no-op'd now and we can inline the function.
2008-05-20fix incorrect sampler numbering/indexing.Brian Paul
All samplers indexes were zero.
2008-05-16fix assertion typo: s/=/==/Brian Paul
2008-05-14Updated GLSL uniform/sampler handling from gallium-0.1 branchBrian Paul
Previously, the shader linker combined the uniforms used by the vertex and fragment shaders into a combined set of uniforms. This made the implementation of glUniform*() simple, but was rather inefficient otherwise. Now each shader gets its own set of uniforms (no more modelview matrix showing up in the fragment shader uniforms, for example). cherry-picked by hand from gallium-0.1 branch
2008-04-03rewrite some of the mat*mat, mat*vec intrinsicsBrian
Also, remove obsolete matrix codegen code.
2007-12-04Fix gl_FrontFacing compilation problemBrian
2007-10-26Merge branch '965-glsl'Zou Nan hai
Conflicts: src/mesa/drivers/dri/i965/brw_sf.h src/mesa/drivers/dri/i965/intel_context.c
2007-10-24Implement gl_PointCoord attribute for GLSL fragment shaders.Brian
Contains the normalized fragment position within a point sprite.
2007-07-31fix failure caused by undeclared variable (bug 11783)Brian
2007-07-26fix-up inlined/non-inlined function inconsistenciesBrian
2007-07-26Fix function call bug 11731. Also, fix up IR_CALL/IR_FUNC confusion.Brian
2007-07-26generate error upon writing to varying var in fragment program (bug 11733)Brian
2007-07-17Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa ↵Zou Nan hai
into 965-glsl
2007-07-12fix swizzle-related bug 11534Brian
2007-07-04Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian
of -I flags.
2007-07-04Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa ↵Zou Nan hai
into 965-glsl
2007-07-03add code for stpq, rgba writemasks in make_writemask(), bug 11404Brian
2007-05-14comment about fixing uniform structsBrian
2007-05-11user-declared uniform structs not supported yet (see bug 10908)Brian
2007-05-01Rewrite of slang_inline_asm_function() to do full parameter/argument ↵Brian
substitution. We had been taking a short-cut w/ asm inlines by just using parameters in order rather than doing full formal parameter -> actual argument substitution like ordinary inlined function calls. This worked in all cases but one: mix() in which the parameters were used in a different order. This fixes bug 10821.
2007-04-24fix double const, move an assertionKarl Schultze
2007-04-21Remove all the USE_MEMPOOL debug code.Brian
2007-04-21Use new memory pool allocator. Lots of debug code still in place...Brian
2007-04-19remove invalid assertionBrian
2007-04-19fix crash when program has invalid structure fieldBrian
2007-04-18fix an uninitialized variable and a warningBrian
2007-04-18record proper datatypes for uniforms/samplersBrian
2007-04-18Start fixing some issues with uniform variables and their types.Brian