| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Check whether the index is within bounds before accessing the array.
Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: Brian Paul <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
References to program local and enviroment parameters are put into the
unified program parameters list as PROGRAM_STATE_VAR entries which point
into the local or environment arrays. So the param_binding_type field
should be PROGRAM_STATE_VAR.
This fixes the piglit vpfp-generic vp-arl-env-array.vpfp and
vp-arl-local-array.vpfp test failures.
|
| |
|
|
|
|
|
|
|
|
| |
We need to disable constant consolidation when building an array of
constants which might be indexed indirectly.
Fixes regression in piglit vpfp-generic vp-arl-constant-array.vpfp
test caused by earlier constant consolidation patch.
|
| |
|
|
|
|
|
|
| |
Only search for an existing, matching constant if swizzleOut is non-null.
We need to be able to disable constant consolidation when building an
array of constants which will be indexed indirectly.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
| |
| |
| | |
(cherry picked from commit 970823978c2f7d2cf0757aa6ddbd6289b34c476f)
|
| |
| |
| |
| |
| | |
Need to use the constant 1ULL and 0xllx format string. This fixes incorrect
results and a NULL pointer/parameter bug.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\|
| |
| |
| |
| | |
Conflicts:
src/gallium/drivers/softpipe/sp_quad_blend.c
|
| | |
|
|\| |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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].
|
| | |
|
| | |
|
| |
| |
| |
| | |
Bug #24984.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a GLbitfield64 type and several macros to operate on 64-bit
fields. The OutputsWritten field of gl_program is changed to use that
type. This results in a fair amount of fallout in drivers that use
programs.
No changes are strictly necessary at this point as all bits used are
below the 32-bit boundary. Fairly soon several bits will be added for
clip distances written by a vertex shader. This will cause several
bits used for varyings to be pushed above the 32-bit boundary. This
will affect any drivers that support GLSL.
At this point, only the i965 driver has been modified to support this
eventuality.
I did this as a "squash" merge. There were several places through the
outputswritten64 branch where things were broken. I foresee this
causing difficulties later for bisecting. The history is still
available in the branch.
Conflicts:
src/mesa/drivers/dri/i965/brw_wm.h
|
| | |
|
| |
| |
| |
| |
| |
| | |
This shaves more instructions off of the VS of my GL demo, but no
performance difference this time at n=6. This also fixes a regression
that was in this path, which is now piglit's glsl-vs-mov-after-deref.
|
|\| |
|
| | |
|
| |
| |
| |
| |
| | |
Handle both NV vertex programs and NV vertex state programs passed to
glProgramStringARB.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes bug 24967.
|
| |
| |
| |
| |
| |
| |
| | |
Depending on the writemask or the opcode, we can often trim the source
channels considered used for dead code elimination. This saves actual
instructions on 965 in the non-GLSL path for glean glsl1, and cleans up
the writemasks of programs even further.
|
| |
| |
| |
| |
| | |
This fixes the dead code elimination to work on the particular code
mentioned in the previous commit.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GLSL code such as:
vec4 result = {0, 1, 0, 0};
gl_FragColor = result;
emits code like:
0: MOV TEMP[0], CONST[0];
1: MOV OUTPUT[1], TEMP[0];
and this replaces it with:
0: MOV TEMP[0], CONST[0];
1: MOV OUTPUT[1], CONST[0];
Even when the dead code eliminator fails to clean up a now-useless MOV
instruction (since it doesn't do live/dead ranges), this should at reduce
dependencies.
|
| |
| |
| |
| |
| |
| |
| | |
This cleans up a bunch of instructions in GLSL programs to have limited
writemasks, which would translate to wins in shaders that hit the i965
brw_wm_glsl.c path by depending less on in-driver optimizations. It will
also help hit other optimization passes I'm looking at.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|