st/nir: Rework fixup_varying_slots
[mesa.git] / src / mesa / program / prog_instruction.c
index 28858f6da0d98a8d30a541cfe21296ec16913a09..3bbb23a41fc2961b88771ef63a776ee1a0254058 100644 (file)
  */
 
 
+#include <stdio.h>
+#include <assert.h>
+
 #include "main/glheader.h"
-#include "main/imports.h"
-#include "main/mtypes.h"
 #include "prog_instruction.h"
+#include "prog_parameter.h"
 
 
 /**
@@ -58,19 +60,6 @@ _mesa_init_instructions(struct prog_instruction *inst, GLuint count)
 }
 
 
-/**
- * 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.
@@ -87,16 +76,6 @@ _mesa_copy_instructions(struct prog_instruction *dest,
 }
 
 
-/**
- * Free an array of instructions
- */
-void
-_mesa_free_instructions(struct prog_instruction *inst, GLuint count)
-{
-   free(inst);
-}
-
-
 /**
  * Basic info about each instruction
  */
@@ -273,7 +252,7 @@ _mesa_opcode_string(enum prog_opcode opcode)
       return InstInfo[opcode].Name;
    else {
       static char s[20];
-      _mesa_snprintf(s, sizeof(s), "OP%u", opcode);
+      snprintf(s, sizeof(s), "OP%u", opcode);
       return s;
    }
 }