aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/uniforms.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-08-11 21:22:25 +0200
committermarha <marha@users.sourceforge.net>2014-08-11 21:22:25 +0200
commit8e27619ab489dece35cc4bec86950ee7729cd309 (patch)
treeab59dbc661e00c12ed4777cf9d0d37393c4163aa /mesalib/src/mesa/main/uniforms.h
parentffc99ce2402fe5c9a6eb8fcf193e8e9472fd993b (diff)
parentfdbedba4d50e1b28b0249c83ba11c029f096e400 (diff)
downloadvcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.gz
vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.bz2
vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.zip
Merge remote-tracking branch 'origin/released'
Conflicts: libxcb/src/c_client.py mesalib/include/GL/glext.h mesalib/include/GL/glxext.h mesalib/src/glsl/.gitignore mesalib/src/mesa/drivers/dri/common/xmlconfig.h mesalib/src/mesa/main/.gitignore xorg-server/Xext/xvmain.c xorg-server/dix/dispatch.c xorg-server/hw/xfree86/common/compiler.h
Diffstat (limited to 'mesalib/src/mesa/main/uniforms.h')
-rw-r--r--mesalib/src/mesa/main/uniforms.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/mesalib/src/mesa/main/uniforms.h b/mesalib/src/mesa/main/uniforms.h
index 10518dcbb..e7a370e84 100644
--- a/mesalib/src/mesa/main/uniforms.h
+++ b/mesalib/src/mesa/main/uniforms.h
@@ -323,69 +323,6 @@ struct gl_builtin_uniform_desc {
unsigned int num_elements;
};
-/**
- * \name GLSL uniform arrays and structs require special handling.
- *
- * The GL_ARB_shader_objects spec says that if you use
- * glGetUniformLocation to get the location of an array, you CANNOT
- * access other elements of the array by adding an offset to the
- * returned location. For example, you must call
- * glGetUniformLocation("foo[16]") if you want to set the 16th element
- * of the array with glUniform().
- *
- * HOWEVER, some other OpenGL drivers allow accessing array elements
- * by adding an offset to the returned array location. And some apps
- * seem to depend on that behaviour.
- *
- * Mesa's gl_uniform_list doesn't directly support this since each
- * entry in the list describes one uniform variable, not one uniform
- * element. We could insert dummy entries in the list for each array
- * element after [0] but that causes complications elsewhere.
- *
- * We solve this problem by creating multiple entries for uniform arrays
- * in the UniformRemapTable so that their elements get sequential locations.
- *
- * Utility functions below offer functionality to split UniformRemapTable
- * location in to location of the uniform in UniformStorage + offset to the
- * array element (0 if not an array) and also merge it back again as the
- * UniformRemapTable location.
- *
- */
-/*@{*/
-/**
- * Combine the uniform's storage index and the array index
- */
-static inline GLint
-_mesa_uniform_merge_location_offset(const struct gl_shader_program *prog,
- unsigned storage_index,
- unsigned uniform_array_index)
-{
- /* location in remap table + array element offset */
- return prog->UniformStorage[storage_index].remap_location +
- uniform_array_index;
-}
-
-/**
- * Separate the uniform storage index and array index
- */
-static inline void
-_mesa_uniform_split_location_offset(const struct gl_shader_program *prog,
- GLint location, unsigned *storage_index,
- unsigned *uniform_array_index)
-{
- *storage_index = prog->UniformRemapTable[location] - prog->UniformStorage;
- *uniform_array_index = location -
- prog->UniformRemapTable[location]->remap_location;
-
- /*gl_uniform_storage in UniformStorage with the calculated base_location
- * must match with the entry in remap table
- */
- assert(&prog->UniformStorage[*storage_index] ==
- prog->UniformRemapTable[location]);
-}
-/*@}*/
-
-
#ifdef __cplusplus
}
#endif