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 <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
case PROGRAM_CONSTANT:
case PROGRAM_STATE_VAR:
- case PROGRAM_NAMED_PARAM:
case PROGRAM_UNIFORM:
src = i915_emit_param4fv(p,
&program->Base.Parameters->ParameterValues[source->Index][0].f);
for (int i = 0; i < num_temp; i++)
fp_temp_regs[i] = fs_reg(this, glsl_type::vec4_type);
- /* PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM, etc. */
+ /* PROGRAM_STATE_VAR etc. */
if (c->dispatch_width == 8) {
for (unsigned p = 0;
p < c->fp->program.Base.Parameters->NumParameters; p++) {
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
case PROGRAM_CONSTANT:
- case PROGRAM_NAMED_PARAM:
/* We actually want to look at the type in the Parameters list for this,
* because this lets us upload constant builtin uniforms, as actual
* constants.
*/
switch (plist->Parameters[src->Index].Type) {
- case PROGRAM_NAMED_PARAM:
case PROGRAM_CONSTANT: {
result = fs_reg(this, glsl_type::vec4_type);
for(pi = 0; pi < paramList->NumParameters; pi++) {
switch(paramList->Parameters[pi].Type) {
case PROGRAM_STATE_VAR:
- case PROGRAM_NAMED_PARAM:
//fprintf(stderr, "%s", vp->Parameters->Parameters[pi].Name);
case PROGRAM_CONSTANT:
*fcmd++ = paramList->ParameterValues[pi][0].f;
case PROGRAM_LOCAL_PARAM:
case PROGRAM_ENV_PARAM:
- case PROGRAM_NAMED_PARAM:
case PROGRAM_CONSTANT:
case PROGRAM_STATE_VAR:
return VSF_IN_CLASS_PARAM;
* NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
* All values should fit in a 4-bit field.
*
- * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM,
+ * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR,
* PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to
* be "uniform" variables since they can only be set outside glBegin/End.
* They're also all stored in the same Parameters array.
PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */
PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */
PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */
- PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */
PROGRAM_CONSTANT, /**< gl_program->Parameters[] */
PROGRAM_UNIFORM, /**< gl_program->Parameters[] */
PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */
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];
}
-/**
- * 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:
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.
const gl_state_index state[STATE_LENGTH],
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],
return "INPUT";
case PROGRAM_OUTPUT:
return "OUTPUT";
- case PROGRAM_NAMED_PARAM:
- return "NAMED";
case PROGRAM_CONSTANT:
return "CONST";
case PROGRAM_UNIFORM:
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 */
#define PROGRAM_ANY_CONST ((1 << PROGRAM_LOCAL_PARAM) | \
(1 << PROGRAM_ENV_PARAM) | \
(1 << PROGRAM_STATE_VAR) | \
- (1 << PROGRAM_NAMED_PARAM) | \
(1 << PROGRAM_CONSTANT) | \
(1 << PROGRAM_UNIFORM))
case PROGRAM_LOCAL_PARAM:
case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
- case PROGRAM_NAMED_PARAM:
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
this->indirect_addr_consts = true;
case PROGRAM_LOCAL_PARAM:
case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
- case PROGRAM_NAMED_PARAM:
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
this->indirect_addr_consts = true;
t->temps[index] = ureg_DECL_local_temporary(t->ureg);
return ureg_src(t->temps[index]);
- case PROGRAM_NAMED_PARAM:
case PROGRAM_ENV_PARAM:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_UNIFORM:
case PROGRAM_ENV_PARAM:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_STATE_VAR:
- case PROGRAM_NAMED_PARAM:
case PROGRAM_UNIFORM:
t->constants[i] = ureg_DECL_constant(ureg, i);
break;
#define PROGRAM_ANY_CONST ((1 << PROGRAM_LOCAL_PARAM) | \
(1 << PROGRAM_ENV_PARAM) | \
(1 << PROGRAM_STATE_VAR) | \
- (1 << PROGRAM_NAMED_PARAM) | \
(1 << PROGRAM_CONSTANT) | \
(1 << PROGRAM_UNIFORM))
t->temps[index] = ureg_DECL_temporary( t->ureg );
return ureg_src(t->temps[index]);
- case PROGRAM_NAMED_PARAM:
case PROGRAM_ENV_PARAM:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_UNIFORM:
case PROGRAM_ENV_PARAM:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_STATE_VAR:
- case PROGRAM_NAMED_PARAM:
case PROGRAM_UNIFORM:
t->constants[i] = ureg_DECL_constant( ureg, i );
break;