aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | 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.
* | | | | | glsl: new MESA_GLSL env var for GLSL debugging featuresBrian Paul2009-02-061-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Revert "mesa: meaningless whitespace change to see if git's working (ignore)"Brian Paul2009-02-061-62/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b2e779988eeb595187933fe2122d86f8ccfe059c. I didn't mean to push this stuff yet. I'm having a bad git day...
* | | | | | mesa: meaningless whitespace change to see if git's working (ignore)Brian Paul2009-02-061-0/+62
| | | | | |
* | | | | | glsl: set shader->CompileStatus in _slang_compile()Brian Paul2009-01-221-1/+4
| |_|_|_|/ |/| | | |
* | | | | mesa: track initialization status of uniform variables. Plus, asst clean-ups.Brian Paul2008-11-101-7/+13
| | | | |
* | | | | mesa: update the shader programs->TexturesUsed array at link timeBrian Paul2008-11-061-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | mesa: add Initialized field to gl_uniform struct, for debugging purposes onlyBrian Paul2008-11-051-7/+14
| |_|_|/ |/| | |
* | | | GLSL: Implement _mesa_get_handleIan Romanick2008-09-291-17/+8
| | | | | | | | | | | | | | | | | | | | Implementing _mesa_get_handle in using glGetIntegerv(GL_CURRENT_PROGRAM, ...) allows glGetHandleARB to work.
* | | | GLSL: AttachShader returns INVALID_OPERATION for repeated attachIan Romanick2008-09-291-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | mesa: glsl: fix glGetUniform for matrix queriesBrian Paul2008-09-231-50/+79
| | | | | | | | | | | | | | | | (cherry picked from commit 7a6eba54d064cadf15f93df2c1748cf5e474ef03)
* | | | mesa: glsl: fix a number of glUniform issuesBrian Paul2008-09-231-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 error check in get_uniformfv()Brian Paul2008-09-231-4/+9
| |_|/ |/| | | | | | | | (cherry picked from commit 18cd9c229a1fc8da8b7669b8d1d100f6bbeca183)
* | | mesa: fix issues causing warnings on WindowsBrian Paul2008-09-211-1/+9
| |/ |/|
* | mesa: prefix a bunch of #include lines with "main/".Brian Paul2008-09-181-9/+9
| | | | | | | | | | This is another step toward removing a whole bunch of -I flags from the cc commands. Still need to address driver code...
* | mesa: rework GLSL vertex attribute bindingBrian Paul2008-09-161-29/+33
| | | | | | | | | | | | | | 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.
* | mesa: glsl: add missing sampler types in sizeof_glsl_type(), bug 17079Brian Paul2008-08-111-2/+13
| |
* | mesa: Silence compiler warnings on Windows.Brian Paul2008-07-291-3/+3
| |
* | mesa: fix issues causing warnings on WindowsBrian Paul2008-07-291-1/+2
| |
* | mesa: glsl: only try to link shaders defining main()Brian Paul2008-07-291-5/+1
| |
* | mesa: remove stray debug assertionBrian Paul2008-07-291-1/+0
| |
* | mesa: fix glUniform error checking for samplersBrian2008-07-291-0/+24
| |
* | mesa: fix some issues in _mesa_validate_program()Brian Paul2008-07-291-5/+11
| |
* | mesa: assorted glsl uniform/attribute fixesBrian Paul2008-07-291-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-291-18/+24
| |
* | 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-88/+123
| |
* | mesa: additional error checking, fix error codesBrian Paul2008-07-031-20/+36
| |
* | 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...
* | s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv()Brian Paul2008-06-281-4/+6
| |
* | Move _mesa_init_glsl_driver_functions() into shader_api.cBrian Paul2008-05-181-28/+65
| | | | | | | | | | | | | | This allows making a bunch of functions static, and removes a state tracker dependency on driverfuncs.c cherry-picked from gallium-0.1
* | bring in fixes/changes from gallium-0.1Brian Paul2008-05-161-80/+32
| |
* | silence warning, new assertionBrian Paul2008-05-161-3/+6
| |
* | 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.
* | Updated GLSL uniform/sampler handling from gallium-0.1 branchBrian Paul2008-05-141-212/+211
| | | | | | | | | | | | | | | | | | | | 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
* | fix some additional program refcounting bugsBrian Paul2008-05-141-4/+2
| |
* | implement full reference counting for vertex/fragment programsBrian2008-05-061-4/+4
| | | | | | | | | | Use _mesa_reference_vert/fragprog() wherever we assign program pointers. Fixes a memory corruption bug found with glean/api2 test.
* | small cleanupsAlan Hourihane2008-04-221-4/+6
| |
* | mesa: Free all shader program data before deleting allXiang, Haihao2008-03-311-0/+2
| | | | | | | | shader/shader program objects to avoid memory access error.
* | Revert "mesa: separate shader program object from shader object." (bug#15244)Xiang, Haihao2008-03-311-4/+4
| | | | | | | | This reverts commit 3ffd11f71d021f672b9bc15b3c39c155a0e2fecb.