inst[i].DstReg.File = PROGRAM_UNDEFINED;
inst[i].DstReg.WriteMask = WRITEMASK_XYZW;
- inst[i].DstReg.CondMask = COND_TR;
- inst[i].DstReg.CondSwizzle = SWIZZLE_NOOP;
inst[i].Saturate = GL_FALSE;
- inst[i].Precision = FLOAT32;
}
}
-/**
- * Allocate an array of program instructions.
- * \param numInst number of instructions
- * \return pointer to instruction memory
- */
-struct prog_instruction *
-_mesa_alloc_instructions(GLuint numInst)
-{
- return
- calloc(numInst, sizeof(struct prog_instruction));
-}
-
-
/**
* Copy an array of program instructions.
* \param dest pointer to destination.
_mesa_copy_instructions(struct prog_instruction *dest,
const struct prog_instruction *src, GLuint n)
{
- GLuint i;
memcpy(dest, src, n * sizeof(struct prog_instruction));
- for (i = 0; i < n; i++) {
- if (src[i].Comment)
- dest[i].Comment = strdup(src[i].Comment);
- }
return dest;
}
-/**
- * Free an array of instructions
- */
-void
-_mesa_free_instructions(struct prog_instruction *inst, GLuint count)
-{
- GLuint i;
- for (i = 0; i < count; i++) {
- free((char *)inst[i].Comment);
- }
- free(inst);
-}
-
-
/**
* Basic info about each instruction
*/
{ OPCODE_RET, "RET", 0, 0 },
{ OPCODE_RSQ, "RSQ", 1, 1 },
{ OPCODE_SCS, "SCS", 1, 1 },
- { OPCODE_SEQ, "SEQ", 2, 1 },
{ OPCODE_SGE, "SGE", 2, 1 },
- { OPCODE_SGT, "SGT", 2, 1 },
{ OPCODE_SIN, "SIN", 1, 1 },
- { OPCODE_SLE, "SLE", 2, 1 },
{ OPCODE_SLT, "SLT", 2, 1 },
- { OPCODE_SNE, "SNE", 2, 1 },
{ OPCODE_SSG, "SSG", 1, 1 },
{ OPCODE_SUB, "SUB", 2, 1 },
{ OPCODE_SWZ, "SWZ", 1, 1 },
{ OPCODE_TXD, "TXD", 3, 1 },
{ OPCODE_TXL, "TXL", 1, 1 },
{ OPCODE_TXP, "TXP", 1, 1 },
- { OPCODE_TXP_NV, "TXP_NV", 1, 1 },
{ OPCODE_TRUNC, "TRUNC", 1, 1 },
{ OPCODE_XPD, "XPD", 2, 1 }
};