Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
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.
|
|
Conflicts:
src/mesa/shader/lex.yy.c
src/mesa/shader/program_lexer.l
|
|
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. :(
|
|
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'.
|
|
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.
|
|
|
|
This isn't really tested yet as no drivers actually support this extension.
|
|
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.
|
|
This gets basic texturing working. w00t!
|
|
|
|
This still needs quite a bit of work, but a bunch of the programs in progs/vp
produce correct results.
|