summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.h
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-01-28 14:43:03 -0800
committerPaul Berry <stereotype441@gmail.com>2013-02-04 10:36:40 -0800
commitb4db34cc4c047427a21efb9bde03d7e125f70e55 (patch)
treed93762b857d4bea407731e613935f386aae7c825 /src/glsl/linker.h
parentb92900d26a54ef997f2920d6a7371bb7c9caabf8 (diff)
downloadexternal_mesa3d-b4db34cc4c047427a21efb9bde03d7e125f70e55.zip
external_mesa3d-b4db34cc4c047427a21efb9bde03d7e125f70e55.tar.gz
external_mesa3d-b4db34cc4c047427a21efb9bde03d7e125f70e55.tar.bz2
glsl: Rename uniform_field_visitor to program_resource_visitor.
There's actually nothing uniform-specific in uniform_field_visitor. It is potentially useful for all kinds of program resources (in particular, future patches will use it for transform feedback varyings). This patch renames it to program_resource_visitor, and clarifies several comments, to reflect the fact that it is useful for more than just uniforms. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/linker.h')
-rw-r--r--src/glsl/linker.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/glsl/linker.h b/src/glsl/linker.h
index 14eb9c1..f1ce50a 100644
--- a/src/glsl/linker.h
+++ b/src/glsl/linker.h
@@ -61,38 +61,39 @@ link_uniform_blocks(void *mem_ctx,
struct gl_uniform_block **blocks_ret);
/**
- * Class for processing all of the leaf fields of an uniform
+ * Class for processing all of the leaf fields of a variable that corresponds
+ * to a program resource.
*
- * Leaves are, roughly speaking, the parts of the uniform that the application
- * could query with \c glGetUniformLocation (or that could be returned by
- * \c glGetActiveUniforms).
+ * The leaf fields are all the parts of the variable that the application
+ * could query using \c glGetProgramResourceIndex (or that could be returned
+ * by \c glGetProgramResourceName).
*
* Classes my derive from this class to implement specific functionality.
* This class only provides the mechanism to iterate over the leaves. Derived
* classes must implement \c ::visit_field and may override \c ::process.
*/
-class uniform_field_visitor {
+class program_resource_visitor {
public:
/**
- * Begin processing a uniform
+ * Begin processing a variable
*
* Classes that overload this function should call \c ::process from the
- * base class to start the recursive processing of the uniform.
+ * base class to start the recursive processing of the variable.
*
- * \param var The uniform variable that is to be processed
+ * \param var The variable that is to be processed
*
- * Calls \c ::visit_field for each leaf of the uniform.
+ * Calls \c ::visit_field for each leaf of the variable.
*
* \warning
- * This entry should only be used with uniform blocks in cases where the
- * row / column ordering of matrices in the block does not matter. For
- * example, enumerating the names of members of the block, but not for
- * determining the offsets of members.
+ * When processing a uniform block, this entry should only be used in cases
+ * where the row / column ordering of matrices in the block does not
+ * matter. For example, enumerating the names of members of the block, but
+ * not for determining the offsets of members.
*/
void process(ir_variable *var);
/**
- * Begin processing a uniform of a structured type.
+ * Begin processing a variable of a structured type.
*
* This flavor of \c process should be used to handle structured types
* (i.e., structures, interfaces, or arrays there of) that need special
@@ -100,7 +101,7 @@ public:
* (instead of the instance name) is used for an interface block.
*
* \param type Type that is to be processed, associated with \c name
- * \param name Base name of the structured uniform being processed
+ * \param name Base name of the structured variable being processed
*
* \note
* \c type must be \c GLSL_TYPE_RECORD, \c GLSL_TYPE_INTERFACE, or an array
@@ -110,7 +111,7 @@ public:
protected:
/**
- * Method invoked for each leaf of the uniform
+ * Method invoked for each leaf of the variable
*
* \param type Type of the field.
* \param name Fully qualified name of the field.