path: root/src/mesa/shader/
AgeCommit message (Collapse)AuthorFilesLines
2009-11-06ARB prog parser: Regenerate parser from previous commits.Ian Romanick1-242/+268
2009-11-06Revert "ARB prog parser: Fix epic memory leak in lexer / parser interface"Ian Romanick1-17/+4
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-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. :(
2009-10-22ARB prog parser: Fix parameter array size comparisonIan Romanick1-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.
2009-09-04ARB prog: replace 'unsigned' with 'gl_state_index'Brian Paul1-3/+2
Fixes compilation warnings with MSVC.
2009-09-04ARB prog: rename POINT, SIZE to POINT_TOK, SIZE_TOKBrian Paul1-5/+5
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 Romanick1-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.
2009-08-24ARB prog parser: Regenerate parser from previous commitIan Romanick1-6/+6
2009-08-20ARB prog parser: Revert part of previous change to constant parsingIan Romanick1-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.
2009-07-30ARB prog parser: Add support for RGBA components to SWZ instruction in fpIan Romanick1-259/+318
2009-07-30ARB prog parser: Prevent NULL ptr deref for KIL instructionIan Romanick1-1/+9
The KIL instruction doesn't have a destination register, so dereferencing dst in asm_instruction_ctor would cause a segfault.
2009-07-29ARP prog parser: Implement the spec, not what makes senseIan Romanick1-62/+71
2009-07-29ARB prog parser: Get program limits from the contextIan Romanick1-24/+3
Some debug code from the older stand-alone version of the assembler was hanging around and needed to go.
2009-07-29ARB prog parser: Finish implementing fp state.depth.rangeIan Romanick1-565/+586
2009-07-29Indentation fixes.Ian Romanick1-8/+8
2009-07-29ARB prog parser: Set NumAttributes based on the number of attribs readIan Romanick1-0/+1
2009-07-28ARB prog parser: Set component negation mask for SWZ instructionIan Romanick1-210/+211
2009-07-28ARB prog parser: Set correct register file for OUTPUT variablesIan Romanick1-197/+204
2009-07-27ARB prog parser: Add support for GL_MESA_texture_arrayIan Romanick1-808/+849
This isn't really tested yet as no drivers actually support this extension.
2009-07-27ARB prog parser: More robust error message for bad OPTION stringIan Romanick1-235/+239
2009-07-27ARB prog parser: Add support for GL_ARB_fragment_program_shadowIan Romanick1-810/+869
Passes the piglit asmparsertest shadow-0[123].txt tests and progs/demos/shadowtex.
2009-07-27ARB prog parser: Fix handling of RECTIan Romanick1-232/+235
Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before allowing use of RECT texture target.
2009-07-27ARB prog parser: Correct handling of some extensions that interact w/ARB_vpIan Romanick1-171/+188
2009-07-27ARB prog: Update generated files missed on previous two commitsIan Romanick1-2/+2
The changes are, as it turns out, purely cosmetic.
2009-07-27ARB prog: Clean up several memory leaksIan Romanick1-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.
2009-07-24ARB prog parse: Fix cut-and-paste error for constant vectorsIan Romanick1-52/+58
2009-07-22parser: Clean up a bunch of silly compiler warningsIan Romanick1-252/+259
2009-07-22parser: Track a few more frag prog related valuesIan Romanick1-227/+250
2009-07-22parser: Ensure that param_binding_type is set correctlyIan Romanick1-0/+4
2009-07-22parser: Set NumParametersIan Romanick1-0/+2
2009-07-22parser: Clean up generation of error strings during assemblyIan Romanick1-4/+57
2009-07-22parser: Initialize unused instruction source registersIan Romanick1-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.
2009-07-22parser: Anonymous constants come from the PROGRAM_CONSTANT fileIan Romanick1-197/+199
2009-07-20ARB_fp/vp: Initial import of new ARB vp/fp assemblerIan Romanick1-0/+4915
This still needs quite a bit of work, but a bunch of the programs in progs/vp produce correct results.