summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_lexer.l
AgeCommit message (Collapse)AuthorFilesLines
2009-11-06Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"Ian Romanick1-42/+3
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-27ARB prog parser: Fix epic memory leak in lexer / parser interfaceIan Romanick1-3/+42
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-15mesa: Use _mesa_strtod in the lexer for assembly shadersNeil Roberts1-4/+5
See bug 24531.
2009-09-04ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul1-0/+1
Fixes compilation warnings with MSVC.
2009-09-04ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul1-2/+2
Fixes symbol collisions with typedefs in Microsoft headers. Perhaps we should prefix/suffix all the lexer tokens to avoid this.
2009-08-23ARB prog lexer: Fix lexer to eat both DOS and Unix line endingsIan Romanick1-1/+1
2009-07-29ARB prog lexer: attenuation is not just for vpIan Romanick1-1/+1
2009-07-27ARB prog parser: Add support for GL_MESA_texture_arrayIan Romanick1-0/+5
This isn't really tested yet as no drivers actually support this extension.
2009-07-27ARB prog parser: Add support for GL_ARB_fragment_program_shadowIan Romanick1-0/+4
Passes the piglit asmparsertest shadow-0[123].txt tests and progs/demos/shadowtex.
2009-07-27ARB prog parser: Fix handling of RECTIan Romanick1-1/+2
Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before allowing use of RECT texture target.
2009-07-27ARB prog: Delete comment about possibly needing to free a bufferIan Romanick1-4/+0
Valgrind doesn't complain about a leak here, so delete the comment about possibly needing to free the state returned by yy_scan_bytes.
2009-07-20ARB_fp/vp: Initial import of new ARB vp/fp assemblerIan Romanick1-0/+482
This still needs quite a bit of work, but a bunch of the programs in progs/vp produce correct results.