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
|
|
|
|
_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.
|
|
|
|
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.
|
|
|
|
These functions do sanity checks on the register file and index.
|
|
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. :(
|
|
The program string is kept in the program object. On the second call
into glProgramStringARB the previous kept string would be leaked.
|
|
|
|
A slightly modified version of a patch from Vinson Lee.
|
|
A slightly modified version of a patch from Vinson Lee.
|
|
|
|
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
|
|
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.
|
|
git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa
regenerated lex.yy.c
|
|
This logs glUseProgram() calls to stderr.
|
|
|
|
See bug 24531.
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
Conflicts:
src/gallium/auxiliary/util/u_cpu_detect.c
|
|
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
|
|
|
|
|
|
|
|
lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).
|
|
|
|
Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a
divide by zero if x=0 and wind up with unpredictable results.
Now use CMP instruction to test for x<=0 and return zero in that case.
|
|
|
|
These options can be used to force vertex/fragment shaders to be no-op
shaders (actually, simple pass-through shaders). For debug/test purposes.
|
|
For debug/test purposes.
|
|
Conflicts:
src/mesa/shader/program_parse.tab.c
|
|
Conflicts:
src/mesa/drivers/dri/intel/intel_clear.c
|
|
|
|
|
|
|
|
Conflicts:
src/mesa/vbo/vbo_exec_array.c
|
|
This is similar to what r300 does inside the driver, but I've added it as
a generic option since it seems most hardware will want it.
Fixes piglit nv-init-zero-reg.vpfp and nv-init-zero-addr.vpfp.
|
|
This helps let drivers treat NV_vp like ARB_vp.
|