Mesa (master): mesa: Remove now-unused _mesa_add_sampler().
Eric Anholt
anholt at kemper.freedesktop.org
Wed Aug 25 19:40:11 UTC 2010
Module: Mesa
Branch: master
Commit: b5c07b9226d8e7de78f6367b5799b39caf820ef3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5c07b9226d8e7de78f6367b5799b39caf820ef3
Author: Eric Anholt <eric at anholt.net>
Date: Tue Aug 24 21:45:40 2010 -0700
mesa: Remove now-unused _mesa_add_sampler().
We do the generation of "what sampler number within Parameters are we"
right in ir_to_mesa.cpp, instead of repeatedly walking the existing
list to find out.
---
src/mesa/program/prog_parameter.c | 37 -------------------------------------
src/mesa/program/prog_parameter.h | 4 ----
2 files changed, 0 insertions(+), 41 deletions(-)
diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c
index b3770f8..40dc92c 100644
--- a/src/mesa/program/prog_parameter.c
+++ b/src/mesa/program/prog_parameter.c
@@ -285,43 +285,6 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
}
/**
- * Add a sampler to the parameter list.
- * \param name uniform's name
- * \param datatype GL_SAMPLER_2D, GL_SAMPLER_2D_RECT_ARB, etc.
- * \param index the sampler number (as seen in TEX instructions)
- * \return sampler index (starting at zero) or -1 if error
- */
-GLint
-_mesa_add_sampler(struct gl_program_parameter_list *paramList,
- const char *name, GLenum datatype, int array_length)
-{
- GLint i = _mesa_lookup_parameter_index(paramList, -1, name);
- if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_SAMPLER) {
- ASSERT(paramList->Parameters[i].Size == 4 * array_length);
- ASSERT(paramList->Parameters[i].DataType == datatype);
- /* already in list */
- return (GLint) paramList->ParameterValues[i][0];
- }
- else {
- GLuint i;
- /* One integer texture unit number goes in each parameter location. */
- const GLint size = 4 * array_length;
- GLfloat value[4];
- GLint numSamplers = 0;
- for (i = 0; i < paramList->NumParameters; i++) {
- if (paramList->Parameters[i].Type == PROGRAM_SAMPLER)
- numSamplers++;
- }
- value[0] = (GLfloat) numSamplers;
- value[1] = value[2] = value[3] = 0.0F;
- (void) _mesa_add_parameter(paramList, PROGRAM_SAMPLER, name,
- size, datatype, value, NULL, 0x0);
- return numSamplers;
- }
-}
-
-
-/**
* Add parameter representing a varying variable.
*/
GLint
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index b3b11a9..10cbbe5 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -131,10 +131,6 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
GLuint *swizzleOut);
extern GLint
-_mesa_add_sampler(struct gl_program_parameter_list *paramList,
- const char *name, GLenum datatype, int array_length);
-
-extern GLint
_mesa_add_varying(struct gl_program_parameter_list *paramList,
const char *name, GLuint size, GLenum datatype,
GLbitfield flags);
More information about the mesa-commit
mailing list