summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-10-14 16:43:15 -0700
committerKenneth Graunke <[email protected]>2012-10-16 11:35:24 -0700
commit8d418d16165624a59b2049d4097b4ab0dc82ffa9 (patch)
tree25cb5e695d63066b16eaf08cb0d7810f55534e94 /src/mesa/program
parentd67e52b0271a0abf44a68cfd5968f75334f6a06d (diff)
mesa: Remove support for named parameters.
These were only part of NV_fragment_program, so we can kill them. The fact that PROGRAM_NAMED_PARAM appears in r200_vertprog.c is rather comedic, but also demonstrates that people just spam the various types of parameters everywhere because they're confusing. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_execute.c2
-rw-r--r--src/mesa/program/prog_parameter.c14
-rw-r--r--src/mesa/program/prog_parameter.h6
-rw-r--r--src/mesa/program/prog_print.c2
-rw-r--r--src/mesa/program/program.c3
5 files changed, 1 insertions, 26 deletions
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index f57027c0756..5b6a5c14927 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -136,8 +136,6 @@ get_src_register_pointer(const struct prog_src_register *source,
case PROGRAM_CONSTANT:
/* Fallthrough */
case PROGRAM_UNIFORM:
- /* Fallthrough */
- case PROGRAM_NAMED_PARAM:
if (reg >= (GLint) prog->Parameters->NumParameters)
return ZeroVec;
return (GLfloat *) prog->Parameters->ParameterValues[reg];
diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c
index b9f4d9d572a..ed421b5a15f 100644
--- a/src/mesa/program/prog_parameter.c
+++ b/src/mesa/program/prog_parameter.c
@@ -180,20 +180,6 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
/**
- * Add a new named program parameter (Ex: NV_fragment_program DEFINE statement)
- * \return index of the new entry in the parameter list
- */
-GLint
-_mesa_add_named_parameter(struct gl_program_parameter_list *paramList,
- const char *name, const gl_constant_value values[4])
-{
- return _mesa_add_parameter(paramList, PROGRAM_NAMED_PARAM, name,
- 4, GL_NONE, values, NULL, 0x0);
-
-}
-
-
-/**
* Add a new named constant to the parameter list.
* This will be used when the program contains something like this:
* PARAM myVals = { 0, 1, 2, 3 };
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index 3c6dc8cf996..d17069090ef 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -71,7 +71,7 @@ typedef union gl_constant_value
struct gl_program_parameter
{
const char *Name; /**< Null-terminated string */
- gl_register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */
+ gl_register_file Type; /**< PROGRAM_CONSTANT or STATE_VAR */
GLenum DataType; /**< GL_FLOAT, GL_FLOAT_VEC2, etc */
/**
* Number of components (1..4), or more.
@@ -134,10 +134,6 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
GLbitfield flags);
extern GLint
-_mesa_add_named_parameter(struct gl_program_parameter_list *paramList,
- const char *name, const gl_constant_value values[4]);
-
-extern GLint
_mesa_add_named_constant(struct gl_program_parameter_list *paramList,
const char *name, const gl_constant_value values[4],
GLuint size);
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 99623c1f152..26191baa6e5 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -60,8 +60,6 @@ _mesa_register_file_name(gl_register_file f)
return "INPUT";
case PROGRAM_OUTPUT:
return "OUTPUT";
- case PROGRAM_NAMED_PARAM:
- return "NAMED";
case PROGRAM_CONSTANT:
return "CONST";
case PROGRAM_UNIFORM:
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 4c533a9035d..993803dd5ff 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -916,9 +916,6 @@ _mesa_valid_register_index(const struct gl_context *ctx,
case PROGRAM_LOCAL_PARAM:
return index >= 0 && index < c->MaxLocalParams;
- case PROGRAM_NAMED_PARAM:
- return index >= 0 && index < c->MaxParameters;
-
case PROGRAM_UNIFORM:
case PROGRAM_STATE_VAR:
/* aka constant buffer */