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.
|
|
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
|
|
|
|
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.
|
|
|
|
|
|
For some cases, _mesa_GetIntegerv reads up to params[15].
|
|
|
|
|
|
A slightly modified version of a patch from Vinson Lee.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
When we concatenate shaders to do our form of poor-man linking, if there's
multiple #version directives, preprocessing fails. This change disables
the extra #version directives by changing the first two chars to //.
This should help with some Wine issues such as bug 23946.
|
|
|
|
|
|
|
|
|
|
|
|
This branch introduces new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment
program inputs for GLSL gl_FrontFacing and gl_PointCoord. Before, these
attributes were packed with the FOG attribute. That made things
complicated elsewhere.
|
|
If a vertex shader uses gl_Vertex, gl_Normal, etc, we need to include them
when the user queries the list of active attributes. Before this we were
just including the user-defined attributes.
|
|
This is a more logical place for this code.
Also add some functions for querying vertex shader input names, types, etc.
|
|
Previously, the FOGC attribute contained the fragment fog coord, front/back-
face flag and the gl_PointCoord.xy values. Now each of those things are
separate fragment program attributes. This simplifies quite a few things in
Mesa and gallium.
Need to test i965 driver and fix up point coord handling in the gallium/draw
module...
|
|
Conflicts:
src/gallium/drivers/softpipe/sp_quad_blend.c
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A slightly modified version of a patch from Vinson Lee.
|
|
Conflicts:
src/gallium/auxiliary/util/u_cpu_detect.c
|
|
|
|
These options can be used to force vertex/fragment shaders to be no-op
shaders (actually, simple pass-through shaders). For debug/test purposes.
|
|
|
|
When a function parameter is const-qualified we can avoid making a copy
of the actual parameter (we basically do a search/replace when inlining).
This is now done for array element params too, resulting in better code
(fewer MOV instructions).
We should allow some other types of function arguments here but let's be
conservative for the moment.
|
|
The two indexes were mixed up when accessing a row of a matrix in an array
of matrices.
|
|
Conflicts:
src/mesa/main/dlist.c
src/mesa/vbo/vbo_save_api.c
|
|
gl_NormalMatrix is the inverse transpose of the modelview matrix, but
as every matrix here needs to be transposed, we end up with
{MODELVIEW_MATRIX, INVERSE}.
|
|
Link fails if too many varying vars.
(cherry picked from master, commit cc58fbcf2c5c88f406818db60910f537e03610d6)
|
|
|
|
A new node type (SLANG_OPER_RETURN_INLINED) is used to denote 'return'
statements inside inlined functions which need special handling.
All glean glsl1 tests pass for EmitContReturn=FALSE and TRUE.
|
|
Fixes glean "function with early return (3)" case (when EmitContReturn=FALSE).
|