summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
AgeCommit message (Collapse)Author
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.
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
2007-03-26fix mem leak, add commentsBrian
2007-03-24Free shader-related context state: _mesa_free_shader_state()Brian
2007-03-23Add the ability to generate programs that doesn't use condition codes.Brian
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.
2007-03-13more bug fixing, error checkingBrian
2007-03-13fix a number of issues in _mesa_uniform()Brian
2007-03-09fix _mesa_uniform_matrix() transpose bugBrian
2007-03-07check for null program ptrs in _mesa_uniform()Brian
2007-02-26Add EmitHighLevelInstructions, EmitComments booleans to gl_shader_state.Brian
These control code generation options. May be overridden by drivers, debuggers, etc.
2007-02-24Remove unneeded _Fragment/VertexShaderPresent fields, update comments.Brian
2007-02-16s/_slang_link2/_slang_link/Brian
2007-02-03added FLUSH_VERTICES() in _mesa_use_program()Brian
2007-02-02Only glUniform1i() can be used to set sampler uniforms. Generate error ↵Brian
otherwise.
2007-01-30fix _mesa_get_uniform_location() so it uses the given program handleBrian
2007-01-23fix g++ warnings/errorsBrian
2007-01-10checkpoint: codegen for global vars w/ initializersBrian
2007-01-10assorted code clean-upsBrian
2007-01-09get rid of STATE_USER_ATTRIB/STATE_AUTO_ATTRIBBrian
2007-01-09clean up a bunch of program parameter stuffBrian
2007-01-09Implement vertex attribute binding.Brian
Users can set explicit binding with glBindAttribLocation(), otherwise the linker will allocate generic attribute slots.
2007-01-05Checkpoint glsl compiler work: sampler uniforms now implemented, linked ↵Brian
properly.
2007-01-04finish some loose ends in _mesa_uniform()Brian
2007-01-04Fix some incorrect GL error values. Reorganize _mesa_compile_shader() code.Brian
2006-12-21comment about uniformsBrian
2006-12-20Uniform matrix support.Brian
Implement _mesa_uniform_matrix() Support for program parameters/uniforms with more than 4 elements. Store 4x4 matrices in column-major order in registers. Update mat mul built-in functions accordingly.
2006-12-20code re-orgBrian
2006-12-20Fix shader object reference counting and hash table deallocation.Brian