aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_parse.tab.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mesa_7_6_branch'Brian Paul2009-10-281-720/+353
|\ | | | | | | | | | | | | 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-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 remote branch 'origin/mesa_7_6_branch'Eric Anholt2009-10-231-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/intel/intel_fbo.c src/mesa/drivers/dri/intel/intel_mipmap_tree.c src/mesa/drivers/dri/intel/intel_mipmap_tree.h src/mesa/drivers/dri/intel/intel_tex_copy.c src/mesa/drivers/dri/intel/intel_tex_image.c
| * ARB prog parser: Fix parameter array size comparisonIan Romanick2009-10-221-1/+1
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'asm-shader-rework-2'Ian Romanick2009-09-251-1028/+1398
|\ \ | | | | | | | | | | | | Conflicts: src/mesa/shader/program_parse.tab.c
| * | Merge branch 'master' into asm-shader-rework-2Ian Romanick2009-09-101-229/+228
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.tab.h
| * | NV fp parser: Add support for condition codesIan Romanick2009-09-101-878/+1017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conditional write masks and the condition-code based KIL instruction are all supported. The specific behavior of KIL in the following shader may or may not match the behavior of other implementations: !!ARBfp1.0 TEMP GT; MOVC GT, fragment.texcoord[0]; KIL GT.x; END Should be it interpreted as 'KIL srcReg' or as 'KIL ccTest'? The current parser will interpret it as 'KIL srcReg'.
| * | ARB prog parser: Differentiate between used and unused names in the lexerIan Romanick2009-09-101-628/+631
| | | | | | | | | | | | | | | 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-361/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | ARB prog parser: Add new constructor for asm_instructionIan Romanick2009-09-041-294/+327
| | | | | | | | | | | | | | | The new constructor copies fields from the prog_instruction that the parser expects the lexer to set.
| * | NV fp parser: Add support for absolute value operator on instruction operandsIan Romanick2009-09-031-834/+897
| | |
| * | NV fp parser: Support new scalar constant behaviorIan Romanick2009-09-031-729/+753
| | | | | | | | | | | | | | | | | | ARBfp requires scalar constants have a '.x' suffix, but NVfp_option does not. This shows up with instructions that require a scalar parameter (e.g., COS).
| * | NV fp parser: Parse TXD instructionIan Romanick2009-09-011-841/+894
| | |
| * | NV fp lexer: Add new opcodesIan Romanick2009-08-311-335/+336
| | |
* | | ARB prog parser: regenerated fileBrian Paul2009-09-151-193/+197
| |/ |/|
* | ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul2009-09-041-3/+2
| | | | | | | | Fixes compilation warnings with MSVC.
* | ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul2009-09-041-5/+5
| | | | | | | | | | 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-011-201/+201
|/ | | | | | 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.
* ARB prog parser: Regenerate parser from previous commitIan Romanick2009-08-241-6/+6
|
* ARB prog parser: Revert part of previous change to constant parsingIan Romanick2009-08-201-8/+8
| | | | | | The commit "ARP prog parser: Implement the spec, not what makes sense" broke the parsing of scalar constants. This commit reverts that part of that commit. Now vp_swizzle.c passes.
* ARB prog parser: Add support for RGBA components to SWZ instruction in fpIan Romanick2009-07-301-259/+318
|
* ARB prog parser: Prevent NULL ptr deref for KIL instructionIan Romanick2009-07-301-1/+9
| | | | | The KIL instruction doesn't have a destination register, so dereferencing dst in asm_instruction_ctor would cause a segfault.
* ARP prog parser: Implement the spec, not what makes senseIan Romanick2009-07-291-62/+71
|
* ARB prog parser: Get program limits from the contextIan Romanick2009-07-291-24/+3
| | | | | Some debug code from the older stand-alone version of the assembler was hanging around and needed to go.
* ARB prog parser: Finish implementing fp state.depth.rangeIan Romanick2009-07-291-565/+586
|
* Indentation fixes.Ian Romanick2009-07-291-8/+8
|
* ARB prog parser: Set NumAttributes based on the number of attribs readIan Romanick2009-07-291-0/+1
|
* ARB prog parser: Set component negation mask for SWZ instructionIan Romanick2009-07-281-210/+211
|
* ARB prog parser: Set correct register file for OUTPUT variablesIan Romanick2009-07-281-197/+204
|
* ARB prog parser: Add support for GL_MESA_texture_arrayIan Romanick2009-07-271-808/+849
| | | | This isn't really tested yet as no drivers actually support this extension.
* ARB prog parser: More robust error message for bad OPTION stringIan Romanick2009-07-271-235/+239
|
* ARB prog parser: Add support for GL_ARB_fragment_program_shadowIan Romanick2009-07-271-810/+869
| | | | | Passes the piglit asmparsertest shadow-0[123].txt tests and progs/demos/shadowtex.
* ARB prog parser: Fix handling of RECTIan Romanick2009-07-271-232/+235
| | | | | Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before allowing use of RECT texture target.
* ARB prog parser: Correct handling of some extensions that interact w/ARB_vpIan Romanick2009-07-271-171/+188
|
* ARB prog: Update generated files missed on previous two commitsIan Romanick2009-07-271-2/+2
| | | | The changes are, as it turns out, purely cosmetic.
* ARB prog: Clean up several memory leaksIan Romanick2009-07-271-5/+30
| | | | | As far as I am able to determine via code inspection and using Valgrind, that should be all of the leaks in the parser.
* ARB prog parse: Fix cut-and-paste error for constant vectorsIan Romanick2009-07-241-52/+58
|
* parser: Clean up a bunch of silly compiler warningsIan Romanick2009-07-221-252/+259
|
* parser: Track a few more frag prog related valuesIan Romanick2009-07-221-227/+250
|
* parser: Ensure that param_binding_type is set correctlyIan Romanick2009-07-221-0/+4
|
* parser: Set NumParametersIan Romanick2009-07-221-0/+2
|
* parser: Clean up generation of error strings during assemblyIan Romanick2009-07-221-4/+57
|
* parser: Initialize unused instruction source registersIan Romanick2009-07-221-0/+4
| | | | | | The 965 driver expects unused source registers (e.g., SrcReg[2] of a DP3 instruction) to have a register file of PROGRAM_UNDEFINED. Initializing these source registers ensures that this happens.
* parser: Anonymous constants come from the PROGRAM_CONSTANT fileIan Romanick2009-07-221-197/+199
|
* ARB_fp/vp: Initial import of new ARB vp/fp assemblerIan Romanick2009-07-201-0/+4915
This still needs quite a bit of work, but a bunch of the programs in progs/vp produce correct results.