aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Add support for glGetActiveUniformsiv on non-UBO pnames.Eric Anholt2012-07-201-0/+7
| | | | | | | We'll need to propagate the UBO fields to the uniform storage records before we can handle the other pnames. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Move the _mesa_uniform_merge_location_offset to glGetUniformLocation().Eric Anholt2012-07-201-2/+2
| | | | | | | With the upcoming GL_ARB_uniform_buffer_object changes, the only other caller that will want the cooked value is state_tracker. Reviewed-by: Ian Romanick <[email protected]>
* linker: Calculate the sampler to texture target mapping during linkingIan Romanick2012-01-111-1/+2
| | | | | | | | | Track the calculated data in gl_shader_program instead of the individual assembly shaders. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Validate sampler settings using uniform storageIan Romanick2012-01-111-0/+3
| | | | | | | | | | | | | Rather than looking at the settings in individual assembly programs, look at the settings in the top-level uniform values. The old code was flawed because examining each shader stage in isolation could allow inconsitent usage across stages (e.g., bind unit 0 to a sampler2D in the vertex shader and sampler1DShadow in the fragment shader). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa,glsl,mapi: Put extern "C" { ... } where appropriate.José Fonseca2011-11-091-0/+11
| | | | | Probably a several places missing, but enough to cover all headers (in)directly included by uniform_query.cpp, and fix the MSVC build.
* mesa: fix signed/unsigned integer comparison warningsBrian Paul2011-11-081-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Rewrite the way uniforms are tracked and handledIan Romanick2011-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | Switch all of the code in ir_to_mesa, st_glsl_to_tgsi, glUniform*, glGetUniform, glGetUniformLocation, and glGetActiveUniforms to use the gl_uniform_storage structures in the gl_shader_program. A couple of notes: * Like most rewrite-the-world patches, this should be reviewed by applying the patch and examining the modified functions. * This leaves a lot of dead code around in linker.cpp and uniform_query.cpp. This will be deleted in the next patches. v2: Update the comment block (previously a FINISHME) in _mesa_uniform about generating GL_INVALID_VALUE when an out-of-range sampler index is specified. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa: Add _mesa_uniform_{attach,detach_all}_driver_storage functionsIan Romanick2011-11-071-0/+11
| | | | | | | | These functions are used to create and destroy the connections between a uniform and the storage used by the driver to hold its value. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa: Add _mesa_propagate_uniforms_to_driver_storageIan Romanick2011-11-071-0/+5
| | | | | | | | This function propagates the values from the backing storage of a gl_uniform_storage structure to the driver supplied data locations. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa: Move {split,merge}_location_offset to uniforms.hIan Romanick2011-11-071-0/+51
| | | | | | | | | | | | | | | | | Prepend _mesa_uniform_ to the names and rework the calling convention. The calling convention was changed for a couple reasons. 1. Having a single variable named 'location' have completely different meanings at different places in the function is confusing. Before calling split_location_offset the location is the encoded value returned by glGetUniformLocation. After calling split_location_offset it's the index of the uniform in the gl_uniform_list::Uniforms array. 2. In a later commit the original value of 'location' is needed after split_location_offset has been called. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa: Make get_uniform available outside compilation unitIan Romanick2011-11-071-0/+4
| | | | | | | Also rename to _mesa_get_uniform. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa: Move _mesa_GetActiveUniformARB to uniform_query.cppIan Romanick2011-10-181-0/+3
| | | | | | | | Fold _mesa_get_active_uniform into its only caller in the process. More changes are coming soon. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Squashed commit of the following:Brian Paul2011-04-261-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 864fe253b04105b7469e5f7b064dc37637b944f8 Author: Brian Paul <[email protected]> Date: Thu Apr 21 20:13:07 2011 -0600 mesa: s/exec/disp/ in _mesa_init_histogram_dispatch() This function isn't normally compiled (FEATURE_histogram). commit f4bf45e2b94b582cacd19cdca873c5be627e4250 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: hook up GL_ARB_robustness dispatch functions ...and advertise the extension. Signed-off-by: Brian Paul <[email protected]> commit 2b89e38e5f572dc40cebc06381ae7c5d04386998 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: regenerated API files for GL_ARB_robustness Signed-off-by: Brian Paul <[email protected]> commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 glapi: add ARB_robustness xml Signed-off-by: Brian Paul <[email protected]> commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: implement GL_ARB_robustness functions Signed-off-by: Brian Paul <[email protected]> commit 938fd71f4c4742f274922d53492a7290ab8d9c9b Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add context fields for GL_ARB_robustness Signed-off-by: Brian Paul <[email protected]> commit 72075137bc79e65be03dac7e97b6dba93c3a86a4 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize more bounds-checking error messages Signed-off-by: Brian Paul <[email protected]> commit 32a3fc23746db49da903fbc08afa0135af3007d2 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize some bounds-checking error messages Signed-off-by: Brian Paul <[email protected]> commit cecbf1f4d164207de373dec0cadee2e84e1f9656 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add more bounds-checking support for client memory buffers Signed-off-by: Brian Paul <[email protected]> commit edc895b52383d5bd274422db56adead1d81daf5f Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add bounds-checking support for client memory buffers Signed-off-by: Brian Paul <[email protected]> commit 3a96ef28a538f158a219b406cd090dee70470c85 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: use is_bufferobj() helper function Signed-off-by: Brian Paul <[email protected]>
* mesa: add glGetUniformuiv(), plug in uint glUniform funcsBrian Paul2010-10-281-0/+3
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-3/+3
|
* mesa: Move the list of builtin uniform info from ir_to_mesa to shared code.Eric Anholt2010-09-281-0/+15
| | | | | | I'm still not pleased with how builtin uniforms are handled, but as long as we're relying on the prog_statevar stuff this seems about as good as it'll get.
* glsl: Set up uniform initializers by walking the shaders after linking.Eric Anholt2010-08-241-1/+14
| | | | | | | | | | | | | Previously, uniform initializers were handled by ir_to_mesa as it made its Parameters list. However, uniform values are global to all shaders, and the value set in one Parameters list wasn't propagated to the other gl_program->Parameters lists. By going back through the general Mesa uniform handling, we make sure that all gl_programs get updated values, and also successfully separate uniform initializer handling from ir_to_mesa gl_program generation. Fixes: glsl-uniform-initializer-5.
* mesa: Add missing header and forward declarations to uniforms.h.Vinson Lee2010-07-291-0/+4
|
* mesa: move uniforms.c to main/Brian Paul2010-06-101-0/+158