Age | Commit message (Collapse) | Author |
|
|
|
GLSL 1.10 disallows initializers for uniforms but GLSL 1.20 and later
allows them. This patch uses the #version directive to allow/disallow
uniform initializers.
This addresses bug 25807, but piglit also needs to be fixed to specify
the GLSL version in the shader.
|
|
This function will search the constant parameters in an effort to re-use
constant slots. For example, {1,2,3,4} and {4,1,1,2} can be stored in
one constant slot and accessed with different swizzles. The swizzle info
must be propogated though the parsing code in a few places.
Fixes Piglit "vpfp-generic tests/shaders/generic/big-param.vpfp" failure.
|
|
Conflicts:
src/gallium/auxiliary/util/u_network.c
src/gallium/auxiliary/util/u_network.h
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/trace/tr_rbug.c
src/gallium/state_trackers/vega/bezier.c
src/gallium/state_trackers/vega/vg_context.c
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_driver.c
src/gallium/winsys/xlib/xlib_brw_context.c
src/mesa/main/mtypes.h
|
|
|
|
Need to use the constant 1ULL and 0xllx format string. This fixes incorrect
results and a NULL pointer/parameter bug.
|
|
(cherry picked from commit 970823978c2f7d2cf0757aa6ddbd6289b34c476f)
|
|
Conflicts:
configure.ac
progs/demos/morph3d.c
progs/demos/textures.c
progs/glsl/shtest.c
progs/glsl/texaaline.c
progs/tests/packedpixels.c
progs/xdemos/corender.c
src/mesa/main/version.h
|
|
When we start compiling a shader, first free the existing gl_program.
This (mostly) fixes the piglit glsl-reload-source test.
Without this change, we were actually appending the new GPU code
onto the previous program.
|
|
|
|
|
|
|
|
If a register was only being used as a destination (as will happen when
generated condition-codes) we missed its use. So we'd errantly return
a register index that was really in-use, not free.
Fixes bug 25579.
|
|
|
|
|
|
For some cases, _mesa_GetIntegerv reads up to params[15].
|
|
|
|
|
|
|
|
Handle both NV vertex programs and NV vertex state programs passed to
glProgramStringARB.
|
|
|
|
|
|
|
|
_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.
|
|
|
|
A slightly modified version of a patch from Vinson Lee.
|
|
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.
|
|
|
|
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>
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|