summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_lexer.l
Commit message (Collapse)AuthorAgeFilesLines
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-495/+0
|
* Replace _mesa_strtod with _mesa_strtof.Marcin Baczyński2010-03-151-4/+4
| | | | Reviewed-by: Ian Romanick <[email protected]>
* ARB prog parser: added (float) casts and regenerate filesBrian Paul2010-03-111-4/+4
|
* mesa: Add "shader/" path to #include statements in shader parser/lexer sourcesAlan Coopersmith2010-01-221-5/+5
| | | | | | | | Signed-off-by: Alan Coopersmith <[email protected]> Note sure why the compiler's -I paths aren't doing the job, but this is OK. Signed-off-by: Brian Paul <[email protected]>
* Merge branch 'mesa_7_6_branch'Ian Romanick2009-11-061-40/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should fix the memory leaks in the assembly parser without the regressions. The conflicts in program_lexer.l were related to changes in returning strings between the branches (always return IDENTIFIER vs. returing either IDENTIFIER or USED_IDENTIFIER). The conflicts in program_parse.y were related to two changes in master One change prints a variable name in an error message. The other change adds outputVarSize to the OUTPUT_statement rule. The cause the position of the IDENTIFIER to change from $2 to $3. Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_lexer.l src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.y
| * Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"Ian Romanick2009-11-061-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.
* | ARB prog parser: Fix a couple issues with previous merge from mesa_7_6_branchIan Romanick2009-11-021-5/+3
| | | | | | | | | | | | | | | | Since the addition of support for Nvidia condition codes, the lexer internally uses handle_ident to select between returning IDENTIFIER and USED_IDENTIFIER. Also, use return_string instead of strdup. Fixes bug #24809.
* | Merge branch 'mesa_7_6_branch'Brian Paul2009-10-281-2/+43
|\| | | | | | | | | | | | | Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_lexer.l
| * ARB prog parser: Fix epic memory leak in lexer / parser interfaceIan Romanick2009-10-271-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. :(
* | Merge branch 'mesa_7_6_branch' of ↵Alex Deucher2009-10-191-4/+5
|\| | | | | | | | | | | git+ssh://[email protected]/git/mesa/mesa regenerated lex.yy.c
| * mesa: Use _mesa_strtod in the lexer for assembly shadersNeil Roberts2009-10-151-4/+5
| | | | | | | | See bug 24531.
* | NV fp lexer: Add UP4B and UP4UB instructions that were previously missingIan Romanick2009-09-241-0/+2
| |
* | Merge branch 'master' into asm-shader-rework-2Ian Romanick2009-09-101-2/+7
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.tab.h
| * | mesa: Include <unistd.h> only when one is available.Michal Krol2009-09-071-0/+4
| |/
| * ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul2009-09-041-0/+1
| | | | | | | | Fixes compilation warnings with MSVC.
| * ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul2009-09-041-2/+2
| | | | | | | | | | Fixes symbol collisions with typedefs in Microsoft headers. Perhaps we should prefix/suffix all the lexer tokens to avoid this.
* | ARB prog lexer: Add missing #include to silence compile warningIan Romanick2009-09-101-0/+1
| |
* | ARB prog parser: Differentiate between used and unused names in the lexerIan Romanick2009-09-101-8/+12
| | | | | | | | | | The lexer will return IDENTIFIER only when the name does not have an associated symbol. Otherwise USED_IDENTIFIER is returned.
* | NV fp parser: Support instruction and TEMP / OUTPUT sizesIan Romanick2009-09-041-118/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for declaring TEMP and OUTPUT variables as 'LONG' or 'SHORT' precision. The precision specifiers are parsed, but they are currently ignored. Some support for this may be added in the future, but neither Intel hardware nor, as far as I'm aware, Radeon hardware support multiple precisions. Also adds support for instruction precision ('X', 'H', and 'R') suffixes and instruction condition code output ('C') suffix. This results in a fairly major change to the lexer. Instructions are matched with all the possible suffix strings. The suffix string are then carved off by a context (i.e., which program mode and options are set) aware parser that converts the suffixes to bits in prog_instruction. This could have been handled in the same way _SAT was originally handled in the lexer, but it would have resulted in a very large lexer with lots of opportunity for cut-and-paste errors.
* | NV fp lexer: Add new opcodesIan Romanick2009-08-311-0/+36
|/
* ARB prog lexer: Fix lexer to eat both DOS and Unix line endingsIan Romanick2009-08-231-1/+1
|
* ARB prog lexer: attenuation is not just for vpIan Romanick2009-07-291-1/+1
|
* ARB prog parser: Add support for GL_MESA_texture_arrayIan Romanick2009-07-271-0/+5
| | | | This isn't really tested yet as no drivers actually support this extension.
* ARB prog parser: Add support for GL_ARB_fragment_program_shadowIan Romanick2009-07-271-0/+4
| | | | | Passes the piglit asmparsertest shadow-0[123].txt tests and progs/demos/shadowtex.
* ARB prog parser: Fix handling of RECTIan Romanick2009-07-271-1/+2
| | | | | Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before allowing use of RECT texture target.
* ARB prog: Delete comment about possibly needing to free a bufferIan Romanick2009-07-271-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.
* ARB_fp/vp: Initial import of new ARB vp/fp assemblerIan Romanick2009-07-201-0/+482
This still needs quite a bit of work, but a bunch of the programs in progs/vp produce correct results.