summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
AgeCommit message (Collapse)Author
2009-02-06glsl: new MESA_GLSL env var for GLSL debugging featuresBrian Paul
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.
2009-02-06Revert "mesa: meaningless whitespace change to see if git's working (ignore)"Brian Paul
This reverts commit b2e779988eeb595187933fe2122d86f8ccfe059c. I didn't mean to push this stuff yet. I'm having a bad git day...
2009-02-06mesa: meaningless whitespace change to see if git's working (ignore)Brian Paul
2009-01-22glsl: set shader->CompileStatus in _slang_compile()Brian Paul
2008-11-10mesa: track initialization status of uniform variables. Plus, asst clean-ups.Brian Paul
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-29GLSL: Implement _mesa_get_handleIan Romanick
Implementing _mesa_get_handle in using glGetIntegerv(GL_CURRENT_PROGRAM, ...) allows glGetHandleARB to work.
2008-09-29GLSL: AttachShader returns INVALID_OPERATION for repeated attachIan Romanick
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.
2008-09-23mesa: glsl: fix glGetUniform for matrix queriesBrian Paul
(cherry picked from commit 7a6eba54d064cadf15f93df2c1748cf5e474ef03)
2008-09-23mesa: 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-09-23mesa: glsl: fix error check in get_uniformfv()Brian Paul
(cherry picked from commit 18cd9c229a1fc8da8b7669b8d1d100f6bbeca183)
2008-09-21mesa: fix issues causing warnings on WindowsBrian Paul
2008-09-18mesa: prefix a bunch of #include lines with "main/".Brian Paul
This is another step toward removing a whole bunch of -I flags from the cc commands. Still need to address driver code...
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-08-11mesa: glsl: add missing sampler types in sizeof_glsl_type(), bug 17079Brian Paul
2008-07-29mesa: Silence compiler warnings on Windows.Brian Paul
2008-07-29mesa: fix issues causing warnings on WindowsBrian Paul
2008-07-29mesa: glsl: only try to link shaders defining main()Brian Paul
2008-07-29mesa: remove stray debug assertionBrian Paul
2008-07-29mesa: fix glUniform error checking for samplersBrian
2008-07-29mesa: fix some issues in _mesa_validate_program()Brian Paul
2008-07-29mesa: 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-29mesa: fix set_program_uniform_matrix(): need to loop over matrix countBrian Paul
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-03mesa: additional error checking, fix 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...
2008-06-28s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv()Brian Paul
2008-05-18Move _mesa_init_glsl_driver_functions() into shader_api.cBrian Paul
This allows making a bunch of functions static, and removes a state tracker dependency on driverfuncs.c cherry-picked from gallium-0.1
2008-05-16bring in fixes/changes from gallium-0.1Brian Paul
2008-05-16silence warning, new assertionBrian 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-14Updated GLSL uniform/sampler handling from gallium-0.1 branchBrian Paul
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
2008-05-14fix some additional program refcounting bugsBrian Paul
2008-05-06implement 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.
2008-04-22small cleanupsAlan Hourihane
2008-03-31mesa: Free all shader program data before deleting allXiang, Haihao
shader/shader program objects to avoid memory access error.
2008-03-31Revert "mesa: separate shader program object from shader object." (bug#15244)Xiang, Haihao
This reverts commit 3ffd11f71d021f672b9bc15b3c39c155a0e2fecb.
2008-03-22use ctx->Driver.DeleteProgram() in a few more placesBrian
2008-02-28mesa: separate shader program object from shader object.Xiang, Haihao
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.
2008-01-01Convert to 0/1 when setting boolean uniformsBruce Merry
Also add some extra tests to the shader_api regression tests
2008-01-01Make use of count in _mesa_uniform_matrixBruce Merry
2008-01-01More fixes to shader_apiBruce Merry
- 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
2008-01-01Fix several bugs relating to uniforms and attributes in GLSL APIBruce Merry
- 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
2007-12-20return correct size from glGetActiveUniform (bug 13751)Brian
2007-08-07fix potential NULL dereference (bug 11880)Brian
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.