Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
Currently a callback delete_shader_cb is used for deleting shader
and shader program objects. Mesa detaches all attached shaders in
_mesa_free_shader_program_data when deleting shader program objects. However
it is likely that these shaders have been freed in _mesa_free_shader,
which will result in unexpected behaviour. This fix uses a single callback for
shader program objects and deletes shader program objects before shader objects.
|
|
Also add some extra tests to the shader_api regression tests
|
|
|
|
- return GL_INVALID_OPERATION instead of GL_INVALID_VALUE if location is bad
- correct the type-checking of uniforms from my previous commit
- accept location of -1 in _mesa_uniform_matrix
|
|
- fix sizes for GL_FLOAT_MAT2x3 and GL_FLOAT_MAT4x3 in sizeof_glsl_type
- fix size returns in _mesa_get_active_attrib
- fix out-of-bounds array access to vec_types in _mesa_get_active_attrib
- fix queries of matrix uniforms in _mesa_get_uniformfv
- fix _mesa_get_uniformfv to only return one base, even from an array
- allow location == -1 in _mesa_uniform
- validate types in _mesa_uniform
- allow array overruns in _mesa_uniform
|
|
|
|
|
|
|
|
of -I flags.
|
|
|
|
|
|
|