summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
Commit message (Collapse)AuthorAgeFilesLines
* prog parse: Handle GL_FRAGMENT_PROGRAM_ARB in glLoadProgramNVIan Romanick2009-11-071-0/+15
|
* prog parse: Handle GL_FRAGMENT_PROGRAM_NV in glProgramStringARBIan Romanick2009-11-071-5/+15
|
* ARB prog parser: Regenerate parser from previous commits.Ian Romanick2009-11-061-242/+268
|
* ARB prog parser: Release old program string in ↵Ian Romanick2009-11-062-4/+6
| | | | | | | | | _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.
* ARB prog parser: Release strings returned from the lexer that don't need to ↵Ian Romanick2009-11-061-1/+27
| | | | be kept
* Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"Ian Romanick2009-11-065-337/+207
| | | | | | | | 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.
* mesa: remove unneeded #includesBrian Paul2009-10-282-9/+0
|
* mesa: include imports.h to silence warningBrian Paul2009-10-281-0/+1
|
* ARB prog parser: Fix epic memory leak in lexer / parser interfaceIan Romanick2009-10-275-207/+337
| | | | | | | | | | | | | | | | 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. :(
* ARB prog parser: Don't leak program stringIan Romanick2009-10-271-0/+4
| | | | | The program string is kept in the program object. On the second call into glProgramStringARB the previous kept string would be leaked.
* ARB prog parser: Don't leak symbol table header structuresIan Romanick2009-10-271-0/+16
|
* glsl: fix memory leakBrian Paul2009-10-271-2/+6
| | | | A slightly modified version of a patch from Vinson Lee.
* ARB prog parser: Fix parameter array size comparisonIan Romanick2009-10-222-2/+2
| | | | | | | | 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.
* mesa: regenerated lex.yy.c w/ _mesa_strtod()Brian Paul2009-10-151-192/+193
|
* mesa: Use _mesa_strtod in the lexer for assembly shadersNeil Roberts2009-10-151-4/+5
| | | | See bug 24531.
* shader_api: Fix bounds checking of glUniform and glUniformMatrixNicolai Hähnle2009-10-071-9/+22
| | | | | Signed-off-by: Nicolai Hähnle <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* prog_parameter: Document the fact that Size may be > 4Nicolai Hähnle2009-10-071-1/+7
| | | | Signed-off-by: Nicolai Hähnle <[email protected]>
* mesa: fix mem leaksBrian Paul2009-10-011-0/+4
|
* glsl: fix mem leakBrian Paul2009-10-011-0/+1
|
* mesa: Return -FLT_MAX instead of 0 for LG2(0).Vinson Lee2009-10-011-1/+1
| | | | | lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0 for LG2(0).
* 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.
* glsl: add support for CMP instructionBrian Paul2009-09-294-0/+4
|
* mesa: move declaration before codeVinson Lee2009-09-251-2/+3
|
* i965: Emit zero initialization for NV VP temporaries as required.Eric Anholt2009-09-243-0/+49
| | | | | | | 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.
* mesa: Initialize NV_vertex_program fields for the parameter lists and such.Eric Anholt2009-09-243-0/+55
| | | | This helps let drivers treat NV_vp like ARB_vp.
* mesa: added commentBrian Paul2009-09-241-0/+1
|
* Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-241-6/+1
|\
| * mesa: don't bias LOD in shader interpreter; do it in swrastBrian Paul2009-09-231-6/+1
| |
* | glsl: init var to silence warningBrian Paul2009-09-241-1/+1
| |
* | glsl: fix missing initializers warningBrian Paul2009-09-241-2/+2
| |
* | r300: Fix handling of NV_vertex_program parametersNicolai Hähnle2009-09-211-0/+1
| | | | | | | | | | | | | | 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 <[email protected]>
* | Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-152-0/+43
|\|
| * glsl: added some link debug code (disabled)Brian Paul2009-09-141-0/+15
| |
| * glsl: remove extra #version directives from concatenated shader sourcesBrian Paul2009-09-141-0/+28
| | | | | | | | | | | | | | | | 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.
* | ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul2009-09-045-195/+195
| | | | | | | | Fixes compilation warnings with MSVC.
* | ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul2009-09-045-37/+23
| | | | | | | | | | Fixes symbol collisions with typedefs in Microsoft headers. Perhaps we should prefix/suffix all the lexer tokens to avoid this.
* | ARB prog parser: Fix handling of stateOptModMatNumIan Romanick2009-09-012-203/+203
| | | | | | | | | | | | 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.
* | mesa: debug printf for KILBrian Paul2009-08-311-0/+5
| |
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-271-8/+8
|\|
| * mesa: direct program debug output to stderr instead of stdoutmarvin242009-08-271-9/+9
| |
* | mesa: move decls before codeVinson Lee2009-08-271-2/+4
| |
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-261-4/+15
|\|
| * glsl: signal that the program needs to be re-translated when samplers changeBrian Paul2009-08-261-4/+15
| |
* | glsl: asst. clean-ups in set_program_uniform()Brian Paul2009-08-261-14/+7
| | | | | | | | | | Remove redunant type check for samplers (assert instead). Move some local vars. Update comments.
* | mesa: var renaming, new assertionBrian Paul2009-08-261-4/+5
| |
* | mesa: additional instruction field size assertionsBrian Paul2009-08-261-0/+6
| |
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-08-261-3/+7
|\|
| * glsl: fix bug in sampler array indexingBrian Paul2009-08-261-3/+7
| | | | | | | | | | | | | | | | | | Need to add the 'offset' parameter when indexing the parameter array. Before, if we were setting arrays of samplers, we were actually only setting the 0th sampler's value. Because of how progs/glsl/samplers.c is constructed, this wasn't showing up as a failure in the samplers_array output.
| * ARB prog: Set error instead of falling through with incorrect valueBrian Paul2009-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a fragment program only parameter was queried of a vertex program (e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and a random value would be returned. This caused 'glxinfo -l' to show the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for GL_MAX_PROGRAM_ENV_PARAMETERS_ARB. This is confusing and incorrect. (cherry picked from master, commit 4bccd693a72a0b42dffc849034263a68e779ca91)