summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/library
Commit message (Collapse)AuthorAgeFilesLines
* mesa: move shader/slang/* sources to main/slang/*Brian Paul2010-06-1010-7327/+0
| | | | Reduce the source tree depth a bit.
* glsl: avoid using rcp in length() functionsBrian Paul2010-03-291-3/+3
| | | | See prev commit for related info.
* glsl: remove rcp from sqrt()Brian Paul2010-03-291-10/+4
| | | | | | | Per a patch from Marek Olšák, we can simply multiply the incoming value by 1/sqrt(x) instead of using rcp. We're keeping the x==0 check to avoid generating NaN for sqrt(0).
* Grammar and spelling fixesJeff Smith2010-03-121-1/+1
| | | | | Signed-off-by: Jeff Smith <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* glsl: implement support for GL_EXT_texture_arrayBrian Paul2010-02-253-0/+96
| | | | | | | | 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.
* scons: User friendly message for code generated filesJosé Fonseca2010-02-101-2/+2
|
* slang: Add gitignore for autogenerated files.Michal Krol2009-12-201-0/+1
|
* slang: Delete a file that is now autogenerated.Michal Krol2009-12-121-880/+0
| | | | | | This file has been modified in master and removed in feature branch. This gave a merge conflict I couldn't resolve by removing and git adding it to index.
* Merge branch 'master' into glsl-pp-rework-2Michal Krol2009-12-122-34/+922
|\ | | | | | | | | | | | | | | | | Conflicts: progs/perf/drawoverhead.c progs/perf/teximage.c progs/perf/vbo.c progs/perf/vertexrate.c src/mesa/shader/slang/library/slang_common_builtin_gc.h
| * glsl: regenerated fileBrian Paul2009-09-291-49/+57
| |
| * glsl: rewrite sqrt(x) intrinsic to handle x=0Brian Paul2009-09-291-34/+42
| | | | | | | | | | | | Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a divide by zero if x=0 and wind up with unpredictable results. Now use CMP instruction to test for x<=0 and return zero in that case.
* | scons: Get GLSL code building correctly when cross compiling.José Fonseca2009-12-101-0/+8
| | | | | | | | | | This is quite messy. GLSL code has to be built twice: one for the host OS, another for the target OS.
* | Build mesa glsl with make.michal2009-12-101-38/+17
| | | | | | | | Still don't know how to add glsl to mesa dependencies.
* | slang/library: Don't need the *_gc.h files, they are autogenerated now.Michal Krol2009-11-257-2828/+0
| |
* | scons: Autogenerate GLSL builtin library *_gc.h from *.gc files.Michal Krol2009-11-251-0/+44
| |
* | slang: Regenerate .gc files.Michal Krol2009-11-135-2590/+2581
| |
* | slang: Get rid of the old syntax file and utilities.Michal Krol2009-11-134-2396/+0
| |
* | slang: Differentiate between uints and floats.Michal Krol2009-09-222-4/+4
| |
* | slang: Correctly handle end of tokens marker.Michal Krol2009-09-082-2/+2
| |
* | slang: Do not parse whitespace.Michal Krol2009-09-082-190/+72
| | | | | | | | The preprocessor tokeniser deals with those.
* | slang: Correctly parse numbers from the new preprocessor.Michal Krol2009-09-082-4/+4
| |
* | slang: Remove the old preprocessor.Michal Krol2009-09-088-1418/+1
| |
* | slang: Remove dependencies on error tokens.Michal Krol2009-09-082-10/+10
| |
* | slang: Adapt shader syntax description to grammar parser changes.Michal Krol2009-09-072-303/+78
|/
* glsl: fix typo: s/vec4_tex1d_proj/vec4_tex_1d_proj/Brian Paul2009-03-102-24/+24
| | | | This regression came from commit c0b59420eec5ffdf22a5919d38851c3620b97c09.
* glsl: use new IR opcodes for TEX instructions with shadow comparisonBrian Paul2009-02-206-165/+165
| | | | | | Such TEX instructions will have the TexShadow flag set. The gl_program::ShadowSamplers field is now set in the linker. We missed that before.
* glsl: rename GLSL texture assembly instructions to be more legibleBrian Paul2009-02-206-309/+315
|
* Merge commit 'origin/master' into gallium-0.2Alan Hourihane2009-01-144-13/+35
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: docs/install.html docs/relnotes-7.3.html src/mesa/shader/slang/slang_codegen.c src/mesa/shader/slang/slang_compile.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_preprocess.c src/mesa/shader/slang/slang_preprocess.h
| * glsl: add preprocessor support for #pragmaBrian Paul2009-01-132-0/+31
| | | | | | | | | | | | Two forms are supported: Pragmas are silently ignored at this time.
| * glsl: better fix for for-loop scope issue (commit ↵Brian Paul2009-01-122-13/+4
| | | | | | | | 6333005f7aea3e5d1d86a5c47b3fa2a1ed2f3ff0)
| * glsl: fix typo in the vec2 += operator functionBrian Paul2009-01-082-2/+2
| |
| * glsl: fix broken +=, -=, *=, /= operatorsBrian Paul2009-01-082-737/+786
| | | | | | | | | | | | | | These functions need to return the final computed value. Now expressions such as a = (b += c) work properly. Also, no need to use __asm intrinsics in these functions. The resulting code is the same when using ordinary arithmetic operators and is more legible.
* | glsl: fix typo in the vec2 += operator functionBrian Paul2009-01-092-2/+2
| |
* | glsl: fix broken +=, -=, *=, /= operatorsBrian Paul2009-01-092-737/+786
| | | | | | | | | | | | | | These functions need to return the final computed value. Now expressions such as a = (b += c) work properly. Also, no need to use __asm intrinsics in these functions. The resulting code is the same when using ordinary arithmetic operators and is more legible.
* | Merge commit 'origin/master' into gallium-0.2Brian Paul2009-01-021-2/+3
|\| | | | | | | | | | | | | Conflicts: src/mesa/main/ffvertex_prog.c src/mesa/main/texenvprogram.c
| * mesa: updated comments about GLSL constantsBrian Paul2009-01-011-2/+3
| |
* | Merge commit 'origin/master' into gallium-0.2Brian Paul2008-12-302-54/+60
|\| | | | | | | | | | | Conflicts: src/mesa/main/config.h
| * mesa: allow variable indexing into the predefined uniform variable arraysBrian Paul2008-12-302-54/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge commit 'origin/master' into gallium-0.2Brian Paul2008-12-169-2756/+2796
|\|
| * mesa: bump glsl grammar revisionBrian Paul2008-12-159-10/+10
| | | | | | | | And update some copyrights.
| * mesa: checkpoint commit of GLSL 1.20 array syntax.Brian Paul2008-12-119-2753/+2793
| | | | | | | | | | | | This allows things like float[3] x = float[3](1., 2., 3.); Parsing and AST construction now. Codegen not working yet.
* | Merge commit 'origin/master' into gallium-0.2Alan Hourihane2008-11-259-2639/+2743
|\|
| * mesa: added support for GLSL 1.20 array.length() methodBrian Paul2008-11-242-0/+27
| | | | | | | | This is the only method supported in GLSL 1.20 so we take a few short-cuts.
| * mesa: support for GLSL 1.20 array typesBrian Paul2008-11-249-2639/+2716
| | | | | | | | This allows syntax like "float[8] foo, bar;"
* | Merge commit 'origin/master' into gallium-0.2Alan Hourihane2008-11-201-16/+13
|\|
| * mesa: minor comment reformatttingBrian Paul2008-11-191-16/+13
| |
* | Merge commit 'origin/master' into gallium-0.2Keith Whitwell2008-11-152-186/+184
|\| | | | | | | | | | | Conflicts: src/mesa/shader/prog_print.c
| * mesa: use the tighter definition of GLSL ftransform() from the gallium branchesBrian Paul2008-11-132-31/+40
| |
| * mesa: remove unused/obsolete __NormalMatrixTranspose matrixBrian Paul2008-11-132-186/+184
| |
* | Merge commit 'origin/master' into gallium-0.2Brian Paul2008-11-119-2981/+3125
|\| | | | | | | | | | | | | Conflicts: src/mesa/shader/prog_execute.c src/mesa/shader/slang/library/slang_vertex_builtin_gc.h