/* Various paramters and env values. All emitted to
* hardware as program constants.
*/
-
- case PROGRAM_ENV_PARAM:
- src =
- i915_emit_param4fv(p,
- p->ctx->FragmentProgram.Parameters[source->
- Index]);
- break;
-
case PROGRAM_CONSTANT:
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
case PROGRAM_INPUT:
return VSF_IN_CLASS_ATTR;
- case PROGRAM_ENV_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_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.
+ * NOTE: 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.
*/
typedef enum
{
PROGRAM_ARRAY, /**< Arrays & Matrixes */
PROGRAM_INPUT, /**< machine->Inputs[] */
PROGRAM_OUTPUT, /**< machine->Outputs[] */
- PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */
PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */
PROGRAM_CONSTANT, /**< gl_program->Parameters[] */
PROGRAM_UNIFORM, /**< gl_program->Parameters[] */
return ZeroVec;
return machine->Outputs[reg];
- case PROGRAM_ENV_PARAM:
- if (reg >= MAX_PROGRAM_ENV_PARAMS)
- return ZeroVec;
- return machine->EnvParams[reg];
-
case PROGRAM_STATE_VAR:
/* Fallthrough */
case PROGRAM_CONSTANT:
switch (f) {
case PROGRAM_TEMPORARY:
return "TEMP";
- case PROGRAM_ENV_PARAM:
- return "ENV";
case PROGRAM_STATE_VAR:
return "STATE";
case PROGRAM_INPUT:
case PROGRAM_TEMPORARY:
sprintf(str, "temp%d", index);
break;
- case PROGRAM_ENV_PARAM:
- sprintf(str, "program.env[%s%d]", addr, index);
- break;
case PROGRAM_CONSTANT: /* extension */
sprintf(str, "constant[%s%d]", addr, index);
break;
case PROGRAM_TEMPORARY:
return index >= 0 && index < (GLint) c->MaxTemps;
- case PROGRAM_ENV_PARAM:
- return index >= 0 && index < (GLint) c->MaxEnvParams;
-
case PROGRAM_UNIFORM:
case PROGRAM_STATE_VAR:
/* aka constant buffer */
}
#define PROGRAM_IMMEDIATE PROGRAM_FILE_MAX
-#define PROGRAM_ANY_CONST ((1 << PROGRAM_ENV_PARAM) | \
- (1 << PROGRAM_STATE_VAR) | \
+#define PROGRAM_ANY_CONST ((1 << PROGRAM_STATE_VAR) | \
(1 << PROGRAM_CONSTANT) | \
(1 << PROGRAM_UNIFORM))
/* Update indirect addressing status used by TGSI */
if (dst.reladdr) {
switch(dst.file) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
for (i=0; i<3; i++) {
if(inst->src[i].reladdr) {
switch(inst->src[i].file) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
case PROGRAM_ARRAY:
return ureg_src(dst_register(t, file, index));
- case PROGRAM_ENV_PARAM:
case PROGRAM_UNIFORM:
assert(index >= 0);
return t->constants[index];
for (i = 0; i < proginfo->Parameters->NumParameters; i++) {
switch (proginfo->Parameters->Parameters[i].Type) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
t->constants[i] = ureg_DECL_constant(ureg, i);
#include "util/u_memory.h"
-#define PROGRAM_ANY_CONST ((1 << PROGRAM_ENV_PARAM) | \
- (1 << PROGRAM_STATE_VAR) | \
+#define PROGRAM_ANY_CONST ((1 << PROGRAM_STATE_VAR) | \
(1 << PROGRAM_CONSTANT) | \
(1 << PROGRAM_UNIFORM))
t->temps[index] = ureg_DECL_temporary( t->ureg );
return ureg_src(t->temps[index]);
- case PROGRAM_ENV_PARAM:
case PROGRAM_UNIFORM:
assert(index >= 0);
return t->constants[index];
for (i = 0; i < program->Parameters->NumParameters; i++) {
switch (program->Parameters->Parameters[i].Type) {
- case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
case PROGRAM_UNIFORM:
t->constants[i] = ureg_DECL_constant( ureg, i );