summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: In validate_program(), initialize errMsg for safety.Kenneth Graunke2011-08-051-1/+1
| | | | | | | | | | | | | | | validate_program relies on validate_shader_program to fill in errMsg; empirically, there exist cases where that doesn't happen. While tracking those down may be worthwhile, initializing the string so we don't try to ralloc_strdup random garbage also seems wise. Fixes issues caught by valgrind while running some test case. NOTE: This is a candidate for stable release branches. Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Use the Elements macro for the sampler index assert in ↵Henri Verbeet2011-07-071-1/+1
| | | | | | | | | | | | validate_samplers(). This is probably nicer if the array size ever changes. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow sampling from units >= MAX_TEXTURE_UNITS in shaders.Henri Verbeet2011-07-071-1/+1
| | | | | | | | | | | | The total number of units used by a shader is limited to MAX_TEXTURE_UNITS, but the actual indices are only limited by MAX_COMBINED_TEXTURE_IMAGE_UNITS, since they're shared between vertex and fragment shaders. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add some minor fixes for geometry shadersBrian Paul2011-06-021-0/+6
|
* mesa: UseShaderProgramEXT and Uniform* shouldn't be allowed inside Begin/EndMarek Olšák2011-06-011-0/+2
| | | | | | I couldn't find this being required by the spec. Reviewed-by: Brian Paul <[email protected]>
* mesa: forbid UseProgram to be called inside Begin/EndMarek Olšák2011-05-301-0/+2
| | | | | | | | | The spec doesn't state it should be an error, but. We have this piglit test useprogram-inside-begin that passes with this commit. No idea what's correct. NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* mesa: minor whitespace fixesBrian Paul2011-05-251-4/+4
|
* mesa: remove set-but-unused variable in bind_attrib_locationMarek Olšák2011-05-011-9/+1
|
* mesa: TEXTURE_BUFFER fix-upBrian Paul2011-04-061-0/+1
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=36033
* mesa: move location of some geometry program limitsBrian Paul2011-03-111-1/+1
| | | | | | | The gl_program_constants struct is for limits that are applicable to any/all shader stages. Move the geometry shader-only fields into the gl_constants struct. Remove redundant MaxGeometryUniformComponents field too.
* mesa: call FLUSH_VERTICES() before deleting shaders, buffers, query objectsBrian Paul2011-03-111-0/+3
| | | | | | | | Need to flush rendering (or at least indicate that the rug might be getting pulled out from underneath us) when a shader, buffer object or query object is about to be deleted. Also, this helps to tell the VBO module to unmap its current vertex buffer.
* mesa: add/update VERBOSE_API loggingBrian Paul2011-02-081-0/+11
|
* Convert everything from the talloc API to the ralloc API.Kenneth Graunke2011-01-311-4/+4
|
* mesa: Connect glGetShaderPrecisionFormat into the dispatch tableIan Romanick2011-01-201-0/+1
|
* mesa: implement glGetShaderPrecisionFormat()Brian Paul2011-01-191-5/+44
| | | | | Drivers should override the default range/precision info as needed. No drivers do this yet.
* mesa: Add actual support for glReleaseShaderCompiler from ES2.Eric Anholt2011-01-141-2/+5
| | | | | Fixes no-op dispatch warning in piglit arb_es2_compatibility-releaseshadercompiler.c.
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* mesa: Include mtypes.h in files that use gl_context struct.Vinson Lee2011-01-051-0/+1
| | | | | | Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
* mesa: use gl_shader_type enumBrian Paul2010-11-231-3/+3
|
* mesa: Fix delayed state flagging for EXT_sso-related program changes.Eric Anholt2010-11-061-18/+5
| | | | | | | Flushing the vertices after having already updated the state doesn't do any good. Fixes useshaderprogram-flushverts-1. As a side effect, by moving it to the right place we end up skipping no-op state changes for traditional glUseProgram.
* mesa: Make metaops use program refcounts instead of names.Eric Anholt2010-10-291-44/+53
| | | | | | | Fixes failure on restoring state when the program was active but deleted, and the name no longer exists. Bug #31194
* mesa: plug in stubs for glBindFragDataLocation(), glGetFragDataLocation()Brian Paul2010-10-281-0/+43
|
* Track separate programs for each stageIan Romanick2010-10-271-15/+74
| | | | | The assumption is that all stages are the same program or that varyings are passed between stages using built-in varyings.
* mesa: Track an ActiveProgram distinct from CurrentProgramIan Romanick2010-10-271-13/+27
| | | | | ActiveProgram is the GL_EXT_separate_shader_objects state variable used for glUniform calls. glUseProgram also sets this.
* mesa: Skeletal support for GL_EXT_separate_shader_objectsIan Romanick2010-10-271-0/+101
| | | | | Really just filling in the entry points. None of them do anything other than validate their inputs.
* mesa: Clean up various 'unused parameter' warnings in shaderapiIan Romanick2010-10-131-6/+14
|
* mesa: Clean up two 'comparison between signed and unsigned' warningsIan Romanick2010-10-131-2/+2
|
* mesa: Refactor validation of shader targetsIan Romanick2010-10-131-10/+33
| | | | | | | | | Actually validate that the implementation supports the particular shader target as well. Previously if a driver only supported vertex shaders, for example, glCreateShaderObjectARB would gladly create a fragment shader. NOTE: this is a candidate for the 7.9 branch.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-27/+27
|
* glsl2: Add EmitNoNoise flag, use it to remove noise opcodesIan Romanick2010-09-091-11/+2
|
* glsl: add several EmitNo* options, and MaxUnrollIterationsLuca Barbieri2010-09-081-1/+5
| | | | | | | | | This increases the chance that GLSL programs will actually work. Note that continues and returns are not yet lowered, so linking will just fail if not supported. Signed-off-by: Ian Romanick <[email protected]>
* glsl: make compiler options per-targetLuca Barbieri2010-09-081-11/+20
| | | | | | | This allows us to specify different options, especially useful for chips without unified shaders. Signed-off-by: Ian Romanick <[email protected]>
* Revert "mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH."Eric Anholt2010-08-251-0/+2
| | | | | | | | | | This reverts commit 001a7bfdfc8b3c8930d5ced21982dbdfb8cd35b3. I hadn't found the section of the spec clarifying that the old behavior was right. Reverting fixes the new version of the testcase, and the Humus demos that could no longer find their uniforms. Bug #29782 Bug #29783
* mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH.Eric Anholt2010-08-231-2/+0
| | | | Fixes: glsl-getactiveuniform-length.
* mesa: Remove unnecessary heaaders from shaderapi.c.Vinson Lee2010-08-181-2/+0
|
* Merge remote branch 'origin/master' into glsl2Eric Anholt2010-07-261-4/+6
| | | | | | | | | | | This pulls in multiple i965 driver fixes which will help ensure better testing coverage during development, and also gets past the conflicts of the src/mesa/shader -> src/mesa/program move. Conflicts: src/mesa/Makefile src/mesa/main/shaderapi.c src/mesa/main/shaderobj.h
* mesa: Fix OpenGL ES-only builds.Chia-I Wu2010-07-031-0/+2
| | | | | | | | Check FEATURE_GL in _mesa_init_shader_dispatch and _mesa_init_shader_uniform_dispatch. OpenGL ES can not and does not use _mesa_init_<...>_dispatch. This is supposed to be temporary. Ideally, a more flexible way for initializing dispatch tables should be developed.
* mesa: add geometry shader fields to gl_shader_programBrian Paul2010-07-021-52/+23
| | | | | | | These 3 fields are per shader-program. Copy them into the geometry program at link time for convenient access later. Also, add some missing glGetProgramiv() queries.
* mesa: add missing error checks in _mesa_program_parameteri()Brian Paul2010-07-021-8/+45
|
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-0/+76
| | | | | | laying down the foundation for everything and implementing most of the stuff. linking, gl_VerticesIn and multidimensional inputs are left.
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-3/+3
|
* mesa: move shader/slang/* sources to main/slang/*Brian Paul2010-06-101-2/+2
| | | | Reduce the source tree depth a bit.
* mesa: refactor shader api / object codeBrian Paul2010-06-101-0/+1552
Remove the unneeded ctx->Driver hooks for shader-related functions. Move state and API-related things into main/.