summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_codegen.c
AgeCommit message (Collapse)Author
2009-01-14glsl: support sampler arrays.Alan Hourihane
2009-01-09glsl: make minimum struct size = 2, not 1Brian Paul
1-component structs such as "struct foo { float x; }" could get placed at any position within a register. This caused some trouble computing the field offset which assumed all struct objects were placed at R.x. It would be unusual to hit this case in normal shaders.
2009-01-07glsl: bump up MAX_FOR_LOOP_UNROLL_COMPLEXITYBrian Paul
2009-01-07mesa: Add _mesa_snprintf.José Fonseca
On Windows snprintf is renamed as _snprintf. (cherry picked from commit f8f9a1b620d31d1a59855fd502caed325d4a324f)
2009-01-07glsl: disable some unused functions (but don't remove just yet)Brian Paul
2009-01-07glsl: also unroll loops with variable declarations such as "for (int i = 0; ..."Brian Paul
2009-01-06glsl: loop unroll adjustmentsBrian Paul
Add a "max complexity" heuristic to allow unrolling long loops with small bodies and short loops with large bodies. The loop unroll limits may need further tweaking...
2009-01-06glsl: implement loop unrolling for simple 'for' loopsBrian Paul
Loops such as this will be unrolled: for (i = 0; i < 4; ++i) { body; } where 'body' isn't too large. This also helps to fix the issue reported in bug #19190. The problem there is indexing vector types with a variable index. For example: vec4 v; v[2] = 1.0; // equivalent to v.z = 1.0 v[i] = 2.0; // variable index into vector!! Since the for-i loop can be unrolled, we can avoid the problems associated with variable indexing into a vector (at least in this case).
2009-01-06mesa: Move var declaration to top of scope.Brian Paul
(cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1)
2009-01-05mesa: fix a GLSL swizzled writemask bugBrian Paul
This fixes cases such as: vec4 v4; vec2 v2; v4.xz.yx = v2; The last line now correctly compiles into MOV TEMP[1].xz, TEMP[0].yyxw; Helps to fix the Humus Domino demo. See bug 19189.
2008-12-31mesa: increase max texture image units and GLSL samplers to 16Brian Paul
The max texture coord units is still 8. All the fixed-function paths are still limited to 8 too. But GLSL shaders can use more samplers now. Note that some texcoord-related data structures are declared to be 16 elements in size rather than 8. This just simplifies the code in a few places; the extra elements aren't accessible to the user. These changes haven't been extensively tested yet, but sanity checking has been done. It should be possible to increase the max image units/samplers to 32 without doing anything special. Beyond that we'll need longer bitfields in a few places.
2008-12-16mesa: fix some GLSL array regressionsBrian Paul
array.length() wasn't working. Swizzle mask for accessing elements of float arrays was incorrect.
2008-12-15mesa: bump glsl grammar revisionBrian Paul
And update some copyrights.
2008-12-15mesa: more re-org of variable declarations in glsl compilerBrian Paul
2008-12-15mesa: more comments, clean upBrian Paul
2008-12-15mesa: added comments, remove unused codeBrian Paul
2008-12-15mesa: checkpoint: handle uniform vars in _slang_gen_var_decl()Brian Paul
This allows uniform declarations with scalar/array initializers. The code is rough though, and will be cleaned up.
2008-12-12mesa: place glsl constant arrays in constant memoryBrian Paul
For example, a declaration like const float[3] xxx = float[3](1.1, 2.2, 3.3); will place the array in the constant buffer whereas a regular, non-const array would be placed in the temporary register file. Next up: do the same thing for uniform arrays.
2008-12-12mesa: code clean-up in glsl compilerBrian Paul
2008-12-12mesa: remove unneeded swizzle init code in glsl compilerBrian Paul
2008-12-12mesa: disable glsl debug outputBrian Paul
2008-12-12mesa: basic array constructors work nowBrian Paul
For example: float[3] xxx = float[3](1.1, 2.2, 3.3); Optimizations for const-qualified arrays next.
2008-12-12mesa: fix some more GLSL 1.20 array things.Brian Paul
Function that return arrays should work now.
2008-12-12mesa: more glsl function renamingBrian Paul
2008-12-12mesa: glsl compiler function renamingBrian Paul
2008-12-12mesa: move some glsl compiler functions to different files to be more consistantBrian Paul
2008-12-12mesa: checkpoint: GLSL 1.20 array constructorsBrian Paul
2008-12-11mesa: consolidate variable declaration initializer code for globals tooBrian Paul
2008-12-11mesa: move variable initializer IR generation into _slang_gen_var_decl()Brian Paul
More code consolidation coming...
2008-12-11mesa: simplify some glsl variable declaration codeBrian Paul
2008-12-11mesa: glsl clean-upsBrian Paul
2008-12-11mesa: checkpoint commit of GLSL 1.20 array syntax.Brian Paul
This allows things like float[3] x = float[3](1., 2., 3.); Parsing and AST construction now. Codegen not working yet.
2008-11-26mesa: add missing type check for function callsBrian Paul
2008-11-24mesa: added support for GLSL 1.20 array.length() methodBrian Paul
This is the only method supported in GLSL 1.20 so we take a few short-cuts.
2008-11-24mesa: set flags for varying varsBrian Paul
2008-11-24mesa: add Flags field to gl_program_parameterBrian Paul
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
2008-11-21mesa: issue error, don't crash, when calling a prototyped, but undefined ↵Brian Paul
function Bug #18659.
2008-11-21mesa: better variable name: s/aux/store/Brian Paul
2008-11-19mesa: rework GLSL array code generationBrian Paul
We now express arrays in terms of indirect addressing. For example: dst = a[i]; becomes: MOV dst, TEMP[1 + TEMP[2].y]; At instruction-emit time indirect addressing is converted into ARL/ ADDR-relative form: ARL ADDR.x, TEMP[2].y; MOV dst, TEMP[1 + ADDR.x]; This fixes a number of array-related issues. Arrays of arrays and complex array/struct nesting works now. There may be some regressions, but more work is coming.
2008-11-19mesa: updated commentBrian Paul
2008-11-13mesa: no longer need Writemask field in GLSL IR nodesBrian Paul
The Swizzle and Size fields carry all the info we need now.
2008-11-13mesa: remove some do-nothing GLSL codeBrian Paul
2008-11-10mesa: track initialization status of uniform variables. Plus, asst clean-ups.Brian Paul
2008-11-10mesa: initial support for uniform variable initializers.Brian Paul
This lets one specify initial values for uniforms in the code, avoiding the need to call glUniform() in some cases.
2008-11-07mesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually ↵Brian Paul
emitted yet though)
2008-11-05mesa: fix a GLSL array indexing codegen bugBrian Paul
Expressions like array[i] + array[j] didn't work properly before.
2008-11-04mesa: fix float-valued GLSL vertex attribute variablesBrian Paul
The swizzle mask for such variables wasn't set up properly.
2008-11-01mesa: fix assignment / parameter passing of sampler typesBrian Paul
2008-10-31mesa: fix copy/paste error in GLSL error msgBrian Paul
2008-09-25mesa: prevent the slang code generator from aborting when faced with a ↵Sam Hocevar
sampler variable redeclaration.