Age | Commit message (Collapse) | Author |
|
_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.
|
|
be kept
|
|
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.
|
|
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. :(
|
|
The program string is kept in the program object. On the second call
into glProgramStringARB the previous kept string would be leaked.
|
|
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.
|
|
Fixes compilation warnings with MSVC.
|
|
Fixes symbol collisions with typedefs in Microsoft headers.
Perhaps we should prefix/suffix all the lexer tokens to avoid this.
|
|
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.
|
|
|
|
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.
|
|
|
|
The KIL instruction doesn't have a destination register, so
dereferencing dst in asm_instruction_ctor would cause a segfault.
|
|
|
|
Some debug code from the older stand-alone version of the assembler
was hanging around and needed to go.
|
|
|
|
|
|
|
|
|
|
|
|
This isn't really tested yet as no drivers actually support this extension.
|
|
|
|
Passes the piglit asmparsertest shadow-0[123].txt tests and
progs/demos/shadowtex.
|
|
Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before
allowing use of RECT texture target.
|
|
|
|
As far as I am able to determine via code inspection and using
Valgrind, that should be all of the leaks in the parser.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
This still needs quite a bit of work, but a bunch of the programs in progs/vp
produce correct results.
|