| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The refcounting bug was causing a memleak (unfreed programs).
The old parameter list sharing is not needed since the change in how
uniforms are handled.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
cherry-picked from master
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
GLSL Vertex and fragment shaders now have independent parameter buffers.
A new gl_uniform_list is used to keep track of program uniforms and where
each uniform is located in each shader's parameter buffer.
This makes better use of the space in each buffer and simplifies shader linking.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This allows making a bunch of functions static, and removes a state
tracker dependency on driverfuncs.c
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
GLSL sampler variables indicate which texture unit to use for TEX instructions.
Previously, this was baked into the fragment/vertex program and couldn't be
readily changed once set.
Now, SamplerUnits[] array indicates which texture unit is to be used for
each sampler variable. These values are set with glUniform1i().
This is extra state that must be passed to the fragment/vertex program
executor at runtime.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Handle TGSI labels correctly.
Enhance MESA opcode info queries.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Replaces the VERBOSE_GLSL, VERBOSE_GLSL_DUMP flags which only worked in debug
builds. MESA_GLSL will work both in debug and non-debug builds.
Also add facility to dump glUniform() calls to stdout.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit b2e779988eeb595187933fe2122d86f8ccfe059c.
I didn't mean to push this stuff yet. I'm having a bad git day...
|
| | | | | | |
|
| |_|_|_|/
|/| | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If an application never calls glUniform() to set sampler variable values
they'll remain 0 (the default value/unit).
Now call _mesa_update_shader_textures_used() at link time in case glUniform()
is never called. program->TextureUsed[] will then be correct for state
validation.
|
| |_|_|/
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Implementing _mesa_get_handle in using
glGetIntegerv(GL_CURRENT_PROGRAM, ...) allows glGetHandleARB to work.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The GL_ARB_shader_objects spec says that glAttachShaderARB is supposed
to return GL_INVALID_OPERATION if a shader is attached to a program
where it is already attached. _mesa_attach_shader perviously returned
without error in this case.
|
| | | |
| | | |
| | | |
| | | | |
(cherry picked from commit 7a6eba54d064cadf15f93df2c1748cf5e474ef03)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Additional error checking.
Allow setting elements of uniform arrays. This involves encoding both
a uniform location and a parameter offset in the value returned by
glGetUniformLocation().
Limit glUniform[if]v()'s count to the size of the uniform array.
When setting bool-valued uniforms, convert all float/int values to 0 or 1.
|
| |_|/
|/| |
| | |
| | | |
(cherry picked from commit 18cd9c229a1fc8da8b7669b8d1d100f6bbeca183)
|
| |/
|/| |
|
| |
| |
| |
| |
| | |
This is another step toward removing a whole bunch of -I flags from
the cc commands. Still need to address driver code...
|
| |
| |
| |
| |
| |
| |
| | |
Calls to glBindAttribLocation() should not take effect until the next time
that glLinkProgram() is called.
gl_shader_program::Attributes now just contains user-defined bindings.
gl_shader_program::VertexProgram->Attributes contains the actual/final bindings.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Fix incorrect uniform/attribute size query results.
Add missing error checking for glUniform, glUniformMatrix params
Fix an array size/allocation error.
|
| | |
|
| |
| |
| |
| | |
The old implementation could overwrite the caller's param buffer.
|
| |
| |
| |
| | |
program isn't linked
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
If the 'shader' parameter is wrong, need to either generate GL_INVALID_VALUE
or GL_INVALID_OPERATION. It depends on whether 'shader' actually names a
'program' or is a totally unknown ID.
There might be other cases to fix...
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This allows making a bunch of functions static, and removes a state
tracker dependency on driverfuncs.c
cherry-picked from gallium-0.1
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The refcounting bug was causing a memleak (unfreed programs).
The old parameter list sharing is not needed since the change in how
uniforms are handled.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the shader linker combined the uniforms used by the vertex and
fragment shaders into a combined set of uniforms. This made the implementation
of glUniform*() simple, but was rather inefficient otherwise. Now each shader
gets its own set of uniforms (no more modelview matrix showing up in the
fragment shader uniforms, for example).
cherry-picked by hand from gallium-0.1 branch
|
| | |
|
| |
| |
| |
| |
| | |
Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
|
| | |
|
| |
| |
| |
| | |
shader/shader program objects to avoid memory access error.
|
| |
| |
| |
| | |
This reverts commit 3ffd11f71d021f672b9bc15b3c39c155a0e2fecb.
|