summaryrefslogtreecommitdiff
path: root/src/mesa/shader
AgeCommit message (Collapse)Author
2009-11-07prog parse: Handle GL_VERTEX_PROGRAM_ARB in glLoadProgramNVIan Romanick
2009-11-07prog parse: Handle GL_VERTEX_PROGRAM_NV in glProgramStringARBIan Romanick
Handle both NV vertex programs and NV vertex state programs passed to glProgramStringARB.
2009-11-07prog parse: Handle GL_FRAGMENT_PROGRAM_ARB in glLoadProgramNVIan Romanick
2009-11-07prog parse: Handle GL_FRAGMENT_PROGRAM_NV in glProgramStringARBIan Romanick
2009-11-06ARB prog parser: Regenerate parser from previous commits.Ian Romanick
2009-11-06ARB prog parser: Release old program string in ↵Ian Romanick
_mesa_parse_arb_{fragment,vertex}_program The program structure passed to _mesa_parse_arb_program is just a place holder. The stings that actually need to be released are only known to the functions calling _mesa_parse_arb_program, so they should be freed there.
2009-11-06ARB prog parser: Release strings returned from the lexer that don't need to ↵Ian Romanick
be kept
2009-11-06Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"Ian Romanick
This reverts commit 93dae6761bc90bbd43b450d2673620ec189b2c7a. This change was completely broken when the parser uses multiple strings in a single production. It would be nice if bug fixes could initially land somewhere other than the stable branch.
2009-10-28mesa: remove unneeded #includesBrian Paul
2009-10-28mesa: include imports.h to silence warningBrian Paul
2009-10-27ARB prog parser: Fix epic memory leak in lexer / parser interfaceIan Romanick
Anything that matched IDENTIFIER was strdup'ed and returned to the parser. However, almost every case of IDENTIFIER in the parser just dropped the returned string on the floor. Every swizzle string, every option string, every use of a variable, etc. leaked memory. Create a temporary buffer in the parser state (string_dumpster and dumpster_size). Return strings from the lexer to the parser in the buffer. Grow the buffer as needed. When the parser needs to keep a string (i.e., delcaring a new variable), let it make a copy then. The only leak that valgrind now detects is /occasionally/ the copy of the program string in gl_program::String is leaked. I'm not seeing how. :(
2009-10-27ARB prog parser: Don't leak program stringIan Romanick
The program string is kept in the program object. On the second call into glProgramStringARB the previous kept string would be leaked.
2009-10-27ARB prog parser: Don't leak symbol table header structuresIan Romanick
2009-10-27glsl: fix memory leakBrian Paul
A slightly modified version of a patch from Vinson Lee.
2009-10-22ARB prog parser: Fix parameter array size comparisonIan Romanick
Array indexes are invalid when >= the maximum, but array sizes are only in valid when > the maximum. This prevented programs from declaring a single maximum size array. See the piglit vp-max-array test.
2009-10-15mesa: regenerated lex.yy.c w/ _mesa_strtod()Brian Paul
2009-10-15mesa: Use _mesa_strtod in the lexer for assembly shadersNeil Roberts
See bug 24531.
2009-10-07shader_api: Fix bounds checking of glUniform and glUniformMatrixNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-10-07prog_parameter: Document the fact that Size may be > 4Nicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-01mesa: fix mem leaksBrian Paul
2009-10-01glsl: fix mem leakBrian Paul
2009-10-01mesa: Return -FLT_MAX instead of 0 for LG2(0).Vinson Lee
lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0 for LG2(0).
2009-09-29glsl: regenerated fileBrian Paul
2009-09-29glsl: rewrite sqrt(x) intrinsic to handle x=0Brian Paul
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.
2009-09-29glsl: add support for CMP instructionBrian Paul
2009-09-25mesa: move declaration before codeVinson Lee
2009-09-24i965: Emit zero initialization for NV VP temporaries as required.Eric Anholt
This is similar to what r300 does inside the driver, but I've added it as a generic option since it seems most hardware will want it. Fixes piglit nv-init-zero-reg.vpfp and nv-init-zero-addr.vpfp.
2009-09-24mesa: Initialize NV_vertex_program fields for the parameter lists and such.Eric Anholt
This helps let drivers treat NV_vp like ARB_vp.
2009-09-24mesa: added commentBrian Paul
2009-09-24Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-24glsl: init var to silence warningBrian Paul
2009-09-24glsl: fix missing initializers warningBrian Paul
2009-09-23mesa: don't bias LOD in shader interpreter; do it in swrastBrian Paul
2009-09-21r300: Fix handling of NV_vertex_program parametersNicolai Hähnle
The handling is a bit inefficient, unfortunately, but I don't want to make any intrusive changes for Mesa 7.6. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-15Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-14glsl: added some link debug code (disabled)Brian Paul
2009-09-14glsl: remove extra #version directives from concatenated shader sourcesBrian Paul
When we concatenate shaders to do our form of poor-man linking, if there's multiple #version directives, preprocessing fails. This change disables the extra #version directives by changing the first two chars to //. This should help with some Wine issues such as bug 23946.
2009-09-04ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul
Fixes compilation warnings with MSVC.
2009-09-04ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul
Fixes symbol collisions with typedefs in Microsoft headers. Perhaps we should prefix/suffix all the lexer tokens to avoid this.
2009-09-01ARB prog parser: Fix handling of stateOptModMatNumIan Romanick
The optional array index should clearly be enclosed in square brackets. This helps the oglconform test vp_binding.c get a bit farther, but it still fails.
2009-08-31mesa: debug printf for KILBrian Paul
2009-08-27Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-27mesa: direct program debug output to stderr instead of stdoutmarvin24
2009-08-27mesa: move decls before codeVinson Lee
2009-08-26Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-26glsl: asst. clean-ups in set_program_uniform()Brian Paul
Remove redunant type check for samplers (assert instead). Move some local vars. Update comments.
2009-08-26glsl: signal that the program needs to be re-translated when samplers changeBrian Paul
2009-08-26mesa: var renaming, new assertionBrian Paul
2009-08-26mesa: additional instruction field size assertionsBrian Paul
2009-08-26Merge branch 'mesa_7_5_branch'Brian Paul