projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: Move src/mesa/glapi/dispatch.h to mesa.
[mesa.git]
/
src
/
mesa
/
shader
/
prog_instruction.c
diff --git
a/src/mesa/shader/prog_instruction.c
b/src/mesa/shader/prog_instruction.c
index ae3a003feedc3ad546e201007e1c9e41fd386aed..81099cb99c5d939c6b9cd9faf2c5eb01d13ac55f 100644
(file)
--- a/
src/mesa/shader/prog_instruction.c
+++ b/
src/mesa/shader/prog_instruction.c
@@
-40,7
+40,7
@@
_mesa_init_instructions(struct prog_instruction *inst, GLuint count)
{
GLuint i;
{
GLuint i;
-
_mesa_bzero(inst
, count * sizeof(struct prog_instruction));
+
memset(inst, 0
, count * sizeof(struct prog_instruction));
for (i = 0; i < count; i++) {
inst[i].SrcReg[0].File = PROGRAM_UNDEFINED;
for (i = 0; i < count; i++) {
inst[i].SrcReg[0].File = PROGRAM_UNDEFINED;
@@
-70,7
+70,7
@@
struct prog_instruction *
_mesa_alloc_instructions(GLuint numInst)
{
return (struct prog_instruction *)
_mesa_alloc_instructions(GLuint numInst)
{
return (struct prog_instruction *)
-
_mesa_calloc(
numInst * sizeof(struct prog_instruction));
+
calloc(1,
numInst * sizeof(struct prog_instruction));
}
}
@@
-110,7
+110,7
@@
_mesa_copy_instructions(struct prog_instruction *dest,
const struct prog_instruction *src, GLuint n)
{
GLuint i;
const struct prog_instruction *src, GLuint n)
{
GLuint i;
-
_mesa_
memcpy(dest, src, n * sizeof(struct prog_instruction));
+ memcpy(dest, src, n * sizeof(struct prog_instruction));
for (i = 0; i < n; i++) {
if (src[i].Comment)
dest[i].Comment = _mesa_strdup(src[i].Comment);
for (i = 0; i < n; i++) {
if (src[i].Comment)
dest[i].Comment = _mesa_strdup(src[i].Comment);
@@
-128,11
+128,11
@@
_mesa_free_instructions(struct prog_instruction *inst, GLuint count)
GLuint i;
for (i = 0; i < count; i++) {
if (inst[i].Data)
GLuint i;
for (i = 0; i < count; i++) {
if (inst[i].Data)
-
_mesa_
free(inst[i].Data);
+ free(inst[i].Data);
if (inst[i].Comment)
if (inst[i].Comment)
-
_mesa_
free((char *) inst[i].Comment);
+ free((char *) inst[i].Comment);
}
}
-
_mesa_
free(inst);
+ free(inst);
}
}
@@
-343,7
+343,10
@@
_mesa_opcode_string(gl_inst_opcode opcode)
{
if (opcode < MAX_OPCODE)
return InstInfo[opcode].Name;
{
if (opcode < MAX_OPCODE)
return InstInfo[opcode].Name;
- else
- return "OP?";
+ else {
+ static char s[20];
+ _mesa_snprintf(s, sizeof(s), "OP%u", opcode);
+ return s;
+ }
}
}