summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
AgeCommit message (Collapse)Author
2008-11-06mesa: update the shader programs->TexturesUsed array at link timeBrian Paul
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.
2008-11-05mesa: add Initialized field to gl_uniform struct, for debugging purposes onlyBrian Paul
2008-09-16mesa: rework GLSL vertex attribute bindingBrian Paul
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.
2008-09-16mesa: fix bug in get_uniform_rows_cols(): sometimes returned too many rowsBrian Paul
2008-08-11mesa: glsl: add missing sampler types in sizeof_glsl_type(), bug 17079Brian Paul
2008-08-07mesa: Silence compiler warnings on Windows.Michal Krol
2008-08-06mesa: glsl: fix a number of glUniform issuesBrian Paul
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.
2008-08-06mesa: glsl: fix glGetUniform for matrix queriesBrian Paul
2008-08-06mesa: glsl: fix error check in get_uniformfv()Brian Paul
2008-07-25mesa: fix issues causing warnings on WindowsBrian Paul
2008-07-25mesa: Mark as XXX unresolved warnings on windows.Michal Krol
2008-07-24mesa: glsl: only try to link shaders defining main()Brian Paul
2008-07-24mesa: Prefix main includes with dir to avoid conflicts.José Fonseca
Some of the headers in src/mesa/main have pretty common names which easily conflict with third-party code, e.g. config.h
2008-07-22mesa: remove stray debug assertionBrian Paul
2008-07-21mesa: fix glUniform error checking for samplersBrian
2008-07-21mesa: fix some issues in _mesa_validate_program()Brian Paul
2008-07-21mesa: assorted glsl uniform/attribute fixesBrian Paul
Fix incorrect uniform/attribute size query results. Add missing error checking for glUniform, glUniformMatrix params Fix an array size/allocation error.
2008-07-18mesa: fix set_program_uniform_matrix(): need to loop over matrix countBrian Paul
2008-07-15mesa: Silence compiler warnings on Windows.Michal Krol
2008-07-08mesa: implement glGetUniformiv() with new ctx->Driver functionBrian Paul
The old implementation could overwrite the caller's param buffer.
2008-07-04mesa: generate GL_INVALID_OPERATION in _mesa_get_uniform_location() if ↵Brian Paul
program isn't linked
2008-07-03mesa: fix various error codesBrian Paul
2008-07-02mesa: fix error codes in _mesa_shader_source(), _mesa_get_shader_source()Brian Paul
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... cherry-picked from master
2008-06-28s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv()Brian Paul
2008-06-24mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca
2008-05-31mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca
2008-05-16bring in fixes/changes from masterBrian Paul
2008-05-16Fix a program refcounting error, don't share program parameter lists.Brian Paul
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.
2008-05-14mesa: fix InfoLog memleak, misc sync with masterBrian Paul
2008-05-14mesa: glUniform(location==-1) is not an errorBrian Paul
2008-05-14fix some additional program refcounting bugsBrian Paul
cherry-picked from master
2008-05-06gallium: implement full reference counting for vertex/fragment programsBrian
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...
2008-04-04mesa: no longer combine vertex/fragment shader parameters/uniformsBrian
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.
2008-03-22use ctx->Driver.DeleteProgram() in a few more placesBrian
2007-12-07Move _mesa_init_glsl_driver_functions() into shader_api.cBrian
This allows making a bunch of functions static, and removes a state tracker dependency on driverfuncs.c
2007-10-26Re-implement GLSL texture sampler variables.Brian
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.
2007-08-07Naive implementation of IF/ELSE/ENDIF.michal
Handle TGSI labels correctly. Enhance MESA opcode info queries.
2007-07-13fix shader/info string length queries (bug 11588)Jan Dvorak
2007-07-04Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian
of -I flags.
2007-05-09Check that texture units/samplers specified with glUniform1i() are legal.Brian
2007-04-21free shProg->Attributes in _mesa_free_shader_program_data()Brian
2007-04-18Start fixing some issues with uniform variables and their types.Brian
2007-04-18Fix some bugs related to querying active uniforms.Brian
2007-04-18fix error strings, add a sanity checkBrian
2007-04-18Remove bad assertions, decrement NumShaders in _mesa_detach_shader().Brian
Fixes crashes w/ Brad King's depth peeling test.
2007-04-18s/GL_SHADER_PROGRAM/GL_SHADER_PROGRAM_MESA/ (a Mesa-specific token)Brian
2007-04-18Replace _mesa_parameter_longest_name() with _mesa_longest_parameter_name().Brian
The later takes a type parameter so we can match uniforms or attributes/inputs. Used by the GL_ACTIVE_ATTRIBUTE_MAX_LENGTH and GL_ACTIVE_UNIFORM_MAX_LENGTH queries. Fixes problem reported by Brad King in VTK.
2007-04-12disable debug printfsBrian
2007-04-12New _mesa_reference_shader/program() function to consolidate refcounting.Brian
Note that (unlike texture objects), shader handles remain valid (in the hash table) after glDeleteShader/Program() if the refcount isn't zero.
2007-04-11fix invalid error detection problem in _mesa_bind_attrib_location(), bug 10602Brian