summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: glsl: add missing sampler types in sizeof_glsl_type(), bug 17079Brian Paul2008-08-111-2/+13
|
* mesa: Silence compiler warnings on Windows.Michal Krol2008-08-071-2/+2
|
* mesa: glsl: fix a number of glUniform issuesBrian Paul2008-08-061-31/+199
| | | | | | | | | 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.
* mesa: glsl: fix glGetUniform for matrix queriesBrian Paul2008-08-061-50/+79
|
* mesa: glsl: fix error check in get_uniformfv()Brian Paul2008-08-061-4/+9
|
* mesa: fix issues causing warnings on WindowsBrian Paul2008-07-251-5/+2
|
* mesa: Mark as XXX unresolved warnings on windows.Michal Krol2008-07-251-0/+4
|
* mesa: glsl: only try to link shaders defining main()Brian Paul2008-07-241-5/+1
|
* mesa: Prefix main includes with dir to avoid conflicts.José Fonseca2008-07-241-4/+4
| | | | | Some of the headers in src/mesa/main have pretty common names which easily conflict with third-party code, e.g. config.h
* mesa: remove stray debug assertionBrian Paul2008-07-221-1/+0
|
* mesa: fix glUniform error checking for samplersBrian2008-07-211-0/+24
|
* mesa: fix some issues in _mesa_validate_program()Brian Paul2008-07-211-5/+11
|
* mesa: assorted glsl uniform/attribute fixesBrian Paul2008-07-211-12/+140
| | | | | | Fix incorrect uniform/attribute size query results. Add missing error checking for glUniform, glUniformMatrix params Fix an array size/allocation error.
* mesa: fix set_program_uniform_matrix(): need to loop over matrix countBrian Paul2008-07-181-18/+24
|
* mesa: Silence compiler warnings on Windows.Michal Krol2008-07-151-3/+3
|
* mesa: implement glGetUniformiv() with new ctx->Driver functionBrian Paul2008-07-081-4/+41
| | | | The old implementation could overwrite the caller's param buffer.
* mesa: generate GL_INVALID_OPERATION in _mesa_get_uniform_location() if ↵Brian Paul2008-07-041-0/+5
| | | | program isn't linked
* mesa: fix various error codesBrian Paul2008-07-031-94/+144
|
* mesa: fix error codes in _mesa_shader_source(), _mesa_get_shader_source()Brian Paul2008-07-021-2/+12
| | | | | | | | | 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
* s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv()Brian Paul2008-06-281-4/+6
|
* mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca2008-06-241-2/+2
|
* mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca2008-05-311-3/+3
|
* bring in fixes/changes from masterBrian Paul2008-05-161-5/+14
|
* Fix a program refcounting error, don't share program parameter lists.Brian Paul2008-05-161-19/+10
| | | | | | 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.
* mesa: fix InfoLog memleak, misc sync with masterBrian Paul2008-05-141-4/+8
|
* mesa: glUniform(location==-1) is not an errorBrian Paul2008-05-141-0/+9
|
* fix some additional program refcounting bugsBrian Paul2008-05-141-4/+2
| | | | cherry-picked from master
* gallium: implement full reference counting for vertex/fragment programsBrian2008-05-061-4/+2
| | | | | | 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...
* mesa: no longer combine vertex/fragment shader parameters/uniformsBrian2008-04-041-127/+181
| | | | | | | 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.
* use ctx->Driver.DeleteProgram() in a few more placesBrian2008-03-221-3/+3
|
* Move _mesa_init_glsl_driver_functions() into shader_api.cBrian2007-12-071-58/+95
| | | | | This allows making a bunch of functions static, and removes a state tracker dependency on driverfuncs.c
* Re-implement GLSL texture sampler variables.Brian2007-10-261-41/+72
| | | | | | | | | | 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.
* Naive implementation of IF/ELSE/ENDIF.michal2007-08-071-1/+1
| | | | | Handle TGSI labels correctly. Enhance MESA opcode info queries.
* fix shader/info string length queries (bug 11588)Jan Dvorak2007-07-131-3/+3
|
* Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian2007-07-041-4/+3
| | | | of -I flags.
* Check that texture units/samplers specified with glUniform1i() are legal.Brian2007-05-091-1/+9
|
* free shProg->Attributes in _mesa_free_shader_program_data()Brian2007-04-211-0/+5
|
* Start fixing some issues with uniform variables and their types.Brian2007-04-181-7/+2
|
* Fix some bugs related to querying active uniforms.Brian2007-04-181-10/+32
|
* fix error strings, add a sanity checkBrian2007-04-181-2/+14
|
* Remove bad assertions, decrement NumShaders in _mesa_detach_shader().Brian2007-04-181-2/+1
| | | | Fixes crashes w/ Brad King's depth peeling test.
* s/GL_SHADER_PROGRAM/GL_SHADER_PROGRAM_MESA/ (a Mesa-specific token)Brian2007-04-181-4/+4
|
* Replace _mesa_parameter_longest_name() with _mesa_longest_parameter_name().Brian2007-04-181-2/+2
| | | | | | 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.
* disable debug printfsBrian2007-04-121-8/+6
|
* New _mesa_reference_shader/program() function to consolidate refcounting.Brian2007-04-121-49/+153
| | | | | Note that (unlike texture objects), shader handles remain valid (in the hash table) after glDeleteShader/Program() if the refcount isn't zero.
* fix invalid error detection problem in _mesa_bind_attrib_location(), bug 10602Brian2007-04-111-7/+11
|
* fix mem leak, add commentsBrian2007-03-261-3/+15
|
* Free shader-related context state: _mesa_free_shader_state()Brian2007-03-241-0/+16
|
* Add the ability to generate programs that doesn't use condition codes.Brian2007-03-231-0/+1
| | | | | | | ctx->Shader.EmitCondCodes determines if we use condition codes. If not, IF statement uses first operand's X component as the condition. Added OPCODE_BRK0, OPCODE_BRK1, OPCODE_CONT0, OPCODE_CONT1 to handle the common cases of conditional break/continue.
* more bug fixing, error checkingBrian2007-03-131-2/+7
|