Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | glsl: loop unroll adjustments | Brian Paul | 2009-01-06 | 1 | -1/+20 |
| | | | | | | | 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... | ||||
* | glsl: implement loop unrolling for simple 'for' loops | Brian Paul | 2009-01-06 | 1 | -24/+205 |
| | | | | | | | | | | | | | | | | | 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). | ||||
* | mesa: Move var declaration to top of scope. | Brian Paul | 2009-01-06 | 1 | -0/+8 |
| | | | | (cherry picked from commit 3740a06e28f4cd09e2a3dce2da60320aa9304df1) | ||||
* | mesa: fix a GLSL swizzled writemask bug | Brian Paul | 2009-01-05 | 1 | -2/+18 |
| | | | | | | | | | 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. | ||||
* | mesa: fix warning about possibly undefined var in GLSL compiler | Brian Paul | 2009-01-02 | 1 | -6/+4 |
| | |||||
* | mesa: fix another "out of samplers" problem | Brian Paul | 2009-01-02 | 3 | -18/+50 |
| | | | | | | Now only the samplers that are actually used by texture() functions are saved in the uniform variable list. Before, we could run out of samplers if too many were declared while only some of them were actually used. | ||||
* | mesa: updated comments about GLSL constants | Brian Paul | 2009-01-01 | 1 | -2/+3 |
| | |||||
* | mesa: increase max texture image units and GLSL samplers to 16 | Brian Paul | 2008-12-31 | 2 | -6/+7 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | mesa: fix bug in evaluation of structure fields | Brian Paul | 2008-12-30 | 1 | -3/+1 |
| | | | | Fixes incorrect size information. See bug 19273. | ||||
* | mesa: allow variable indexing into the predefined uniform variable arrays | Brian Paul | 2008-12-30 | 5 | -91/+376 |
| | | | | | | | | | | | | | | | | | | | This allows code such as "vec4 a = gl_LightSource[i].ambient;" to work. When a built-in uniform array is indexed with a variable index we need to "unroll" the whole array into the parameter list (aka constant buffer) because we don't know which elements may be accessed at compile-time. In the case of the gl_LightSource array of size [8], we emit 64 state references into the parameter array (8 elements times 8 vec4s per gl_LightSourceParameters struct). Previously, we only allowed constant-indexed references to uniform arrays (such as gl_LightSource[2].position) which resulted in a single state reference being added to the parameter array, not 64. We still optimize this case. Users should be aware that using "gl_LightSource[i].ambient" in their shaders is a bit expensive since state validation will involve updating all 64 light source entries in the parameter list. | ||||
* | mesa: better error message when running out of GLSL samplers | Brian Paul | 2008-12-30 | 1 | -1/+4 |
| | |||||
* | mesa: comments for some state vars | Brian Paul | 2008-12-30 | 1 | -4/+4 |
| | |||||
* | GLSL: The LOG2 macro doesn't have enough precision | Ian Romanick | 2008-12-19 | 1 | -2/+9 |
| | | | | | It looks like the LOG2 macro only has 8 or 9 bits of precission, but the ARB_vertex_program spec says "accurate to at least 10 bits". | ||||
* | glsl: Fix handling of nested parens in macro actual arguments. | Michal Krol | 2008-12-18 | 1 | -2/+15 |
| | |||||
* | mesa: disable debug output | Brian Paul | 2008-12-16 | 1 | -2/+2 |
| | |||||
* | mesa: fix some GLSL array regressions | Brian Paul | 2008-12-16 | 4 | -66/+85 |
| | | | | | array.length() wasn't working. Swizzle mask for accessing elements of float arrays was incorrect. | ||||
* | mesa: rename slang_library_noise.[ch] to prog_noise.[ch] and rename functions | Brian Paul | 2008-12-15 | 4 | -520/+650 |
| | | | | | The noise functions were not glsl-specific. Also, ran indent on the code to clean it up. | ||||
* | mesa: bump glsl grammar revision | Brian Paul | 2008-12-15 | 11 | -13/+13 |
| | | | | And update some copyrights. | ||||
* | mesa: more re-org of variable declarations in glsl compiler | Brian Paul | 2008-12-15 | 1 | -52/+56 |
| | |||||
* | mesa: more comments, clean up | Brian Paul | 2008-12-15 | 1 | -10/+12 |
| | |||||
* | mesa: added comments, remove unused code | Brian Paul | 2008-12-15 | 1 | -32/+9 |
| | |||||
* | mesa: checkpoint: handle uniform vars in _slang_gen_var_decl() | Brian Paul | 2008-12-15 | 1 | -18/+59 |
| | | | | | This allows uniform declarations with scalar/array initializers. The code is rough though, and will be cleaned up. | ||||
* | mesa: use IFLOOR(x) instead of (int) FLOORF(x) | Brian Paul | 2008-12-12 | 1 | -1/+1 |
| | |||||
* | mesa: place glsl constant arrays in constant memory | Brian Paul | 2008-12-12 | 1 | -7/+93 |
| | | | | | | | | 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. | ||||
* | mesa: remove old size=4 limit | Brian Paul | 2008-12-12 | 1 | -1/+0 |
| | |||||
* | mesa: code clean-up in glsl compiler | Brian Paul | 2008-12-12 | 1 | -7/+8 |
| | |||||
* | mesa: remove unneeded swizzle init code in glsl compiler | Brian Paul | 2008-12-12 | 1 | -18/+0 |
| | |||||
* | mesa: disable glsl debug output | Brian Paul | 2008-12-12 | 1 | -2/+2 |
| | |||||
* | mesa: remove unused varpool code in glsl compiler | Brian Paul | 2008-12-12 | 4 | -26/+0 |
| | |||||
* | mesa: basic array constructors work now | Brian Paul | 2008-12-12 | 1 | -13/+144 |
| | | | | | | For example: float[3] xxx = float[3](1.1, 2.2, 3.3); Optimizations for const-qualified arrays next. | ||||
* | mesa: copy array_len in slang_fully_specified_type_copy() | Brian Paul | 2008-12-12 | 1 | -0/+1 |
| | |||||
* | mesa: remove incorrect array_len assignment | Brian Paul | 2008-12-12 | 1 | -1/+0 |
| | |||||
* | mesa: array size fix in _slang_typeof_operation() | Brian Paul | 2008-12-12 | 1 | -1/+9 |
| | |||||
* | mesa: fix some more GLSL 1.20 array things. | Brian Paul | 2008-12-12 | 2 | -12/+33 |
| | | | | Function that return arrays should work now. | ||||
* | mesa: more glsl function renaming | Brian Paul | 2008-12-12 | 5 | -28/+28 |
| | |||||
* | mesa: use _slang_alloc() | Brian Paul | 2008-12-12 | 2 | -2/+2 |
| | |||||
* | mesa: glsl compiler function renaming | Brian Paul | 2008-12-12 | 10 | -32/+32 |
| | |||||
* | mesa: more glsl type/function movement | Brian Paul | 2008-12-12 | 5 | -30/+14 |
| | |||||
* | mesa: move some glsl compiler functions to different files to be more consistant | Brian Paul | 2008-12-12 | 6 | -196/+197 |
| | |||||
* | mesa: move _slang_locate_function() to different file | Brian Paul | 2008-12-12 | 4 | -83/+86 |
| | |||||
* | mesa: remove unused fixup table code in glsl compiler | Brian Paul | 2008-12-12 | 3 | -61/+1 |
| | |||||
* | mesa: checkpoint: GLSL 1.20 array constructors | Brian Paul | 2008-12-12 | 7 | -24/+92 |
| | |||||
* | mesa: consolidate variable declaration initializer code for globals too | Brian Paul | 2008-12-11 | 1 | -19/+3 |
| | |||||
* | mesa: move variable initializer IR generation into _slang_gen_var_decl() | Brian Paul | 2008-12-11 | 1 | -79/+93 |
| | | | | More code consolidation coming... | ||||
* | mesa: simplify some glsl variable declaration code | Brian Paul | 2008-12-11 | 1 | -23/+21 |
| | |||||
* | mesa: glsl clean-ups | Brian Paul | 2008-12-11 | 4 | -47/+56 |
| | |||||
* | mesa: checkpoint commit of GLSL 1.20 array syntax. | Brian Paul | 2008-12-11 | 11 | -2836/+2974 |
| | | | | | | This allows things like float[3] x = float[3](1., 2., 3.); Parsing and AST construction now. Codegen not working yet. | ||||
* | mesa: in slang linker, replace assertion with link error when max samplers ↵ | Brian Paul | 2008-12-09 | 1 | -6/+18 |
| | | | | exceeded | ||||
* | mesa: fix default switch case in append_token(), see bug 18734 | Brian Paul | 2008-11-28 | 1 | -2/+3 |
| | |||||
* | mesa: remove an assertion (see bug 18734) | Brian Paul | 2008-11-27 | 1 | -1/+0 |
| |