~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/mesa/program/prog_instruction.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
 
62
62
 
63
63
/**
64
 
 * Copy an array of program instructions.
65
 
 * \param dest  pointer to destination.
66
 
 * \param src  pointer to source.
67
 
 * \param n  number of instructions to copy.
68
 
 * \return pointer to destination.
69
 
 */
70
 
struct prog_instruction *
71
 
_mesa_copy_instructions(struct prog_instruction *dest,
72
 
                        const struct prog_instruction *src, GLuint n)
73
 
{
74
 
   memcpy(dest, src, n * sizeof(struct prog_instruction));
75
 
   return dest;
76
 
}
77
 
 
78
 
 
79
 
/**
80
64
 * Basic info about each instruction
81
65
 */
82
66
struct instruction_info
96
80
   { OPCODE_ABS,    "ABS",     1, 1 },
97
81
   { OPCODE_ADD,    "ADD",     2, 1 },
98
82
   { OPCODE_ARL,    "ARL",     1, 1 },
99
 
   { OPCODE_BGNLOOP,"BGNLOOP", 0, 0 },
100
 
   { OPCODE_BGNSUB, "BGNSUB",  0, 0 },
101
 
   { OPCODE_BRK,    "BRK",     0, 0 },
102
 
   { OPCODE_CAL,    "CAL",     0, 0 },
103
83
   { OPCODE_CMP,    "CMP",     3, 1 },
104
 
   { OPCODE_CONT,   "CONT",    0, 0 },
105
84
   { OPCODE_COS,    "COS",     1, 1 },
106
85
   { OPCODE_DDX,    "DDX",     1, 1 },
107
86
   { OPCODE_DDY,    "DDY",     1, 1 },
110
89
   { OPCODE_DP4,    "DP4",     2, 1 },
111
90
   { OPCODE_DPH,    "DPH",     2, 1 },
112
91
   { OPCODE_DST,    "DST",     2, 1 },
113
 
   { OPCODE_ELSE,   "ELSE",    0, 0 },
114
92
   { OPCODE_END,    "END",     0, 0 },
115
 
   { OPCODE_ENDIF,  "ENDIF",   0, 0 },
116
 
   { OPCODE_ENDLOOP,"ENDLOOP", 0, 0 },
117
 
   { OPCODE_ENDSUB, "ENDSUB",  0, 0 },
118
93
   { OPCODE_EX2,    "EX2",     1, 1 },
119
94
   { OPCODE_EXP,    "EXP",     1, 1 },
120
95
   { OPCODE_FLR,    "FLR",     1, 1 },
121
96
   { OPCODE_FRC,    "FRC",     1, 1 },
122
 
   { OPCODE_IF,     "IF",      1, 0 },
123
97
   { OPCODE_KIL,    "KIL",     1, 0 },
124
98
   { OPCODE_LG2,    "LG2",     1, 1 },
125
99
   { OPCODE_LIT,    "LIT",     1, 1 },
130
104
   { OPCODE_MIN,    "MIN",     2, 1 },
131
105
   { OPCODE_MOV,    "MOV",     1, 1 },
132
106
   { OPCODE_MUL,    "MUL",     2, 1 },
133
 
   { OPCODE_NOISE1, "NOISE1",  1, 1 },
134
 
   { OPCODE_NOISE2, "NOISE2",  1, 1 },
135
 
   { OPCODE_NOISE3, "NOISE3",  1, 1 },
136
 
   { OPCODE_NOISE4, "NOISE4",  1, 1 },
137
107
   { OPCODE_POW,    "POW",     2, 1 },
138
108
   { OPCODE_RCP,    "RCP",     1, 1 },
139
 
   { OPCODE_RET,    "RET",     0, 0 },
140
109
   { OPCODE_RSQ,    "RSQ",     1, 1 },
141
110
   { OPCODE_SCS,    "SCS",     1, 1 },
142
111
   { OPCODE_SGE,    "SGE",     2, 1 },
150
119
   { OPCODE_TXD,    "TXD",     3, 1 },
151
120
   { OPCODE_TXL,    "TXL",     1, 1 },
152
121
   { OPCODE_TXP,    "TXP",     1, 1 },
153
 
   { OPCODE_TRUNC,  "TRUNC",   1, 1 },
154
122
   { OPCODE_XPD,    "XPD",     2, 1 }
155
123
};
156
124