r500: cleanup warnings and include files
authorDave Airlie <airlied@redhat.com>
Wed, 28 May 2008 00:03:10 +0000 (10:03 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 28 May 2008 00:03:10 +0000 (10:03 +1000)
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r500_fragprog.c
src/mesa/drivers/dri/r300/r500_fragprog.h

index 4cca4a80936fb955e957c4226f2fe85368e78088..53e5d181a4c04fdd19ee96df271937f353bb14d7 100644 (file)
@@ -74,6 +74,7 @@ typedef struct r300_context *r300ContextPtr;
 
 #include "r300_vertprog.h"
 #include "r300_fragprog.h"
+#include "r500_fragprog.h"
 
 /**
  * This function takes a float and packs it into a uint32_t
index df63f32d1da8900b5e24577b568bd91b20912119..c0896acc236fd42765541012f931998c69956b45 100644 (file)
@@ -60,7 +60,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_state.h"
 #include "r300_reg.h"
 #include "r300_emit.h"
-#include "r300_fragprog.h"
 #include "r300_tex.h"
 
 #include "drirenderbuffer.h"
@@ -1369,7 +1368,6 @@ static void r300SetupFragmentShaderTextures(GLcontext *ctx, int *tmu_mappings)
 
 static void r500SetupFragmentShaderTextures(GLcontext *ctx, int *tmu_mappings)
 {
-       r300ContextPtr r300 = R300_CONTEXT(ctx);
        int i;
        struct r500_fragment_program *fp = (struct r500_fragment_program *)
            (char *)ctx->FragmentProgram._Current;
@@ -1898,9 +1896,6 @@ static inline void r300SetupVertexProgramFragment(r300ContextPtr r300, int dest,
 static void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, GLuint output_count, GLuint temp_count)
 {
     int vtx_mem_size;
-    int cmd_reserved = 0;
-    int cmd_written = 0;
-    drm_radeon_cmd_header_t *cmd = NULL;
     int pvs_num_slots;
     int pvs_num_cntrls;
 
index c7ece029c014151e7789c09be05e46709c161952..cdbec35da59df19415ac07a51ac96a9084802f7d 100644 (file)
@@ -1495,7 +1495,7 @@ static char *toswiz(int swiz_val) {
 
 static char *toop(int op_val)
 {
-  char *str;
+  char *str = NULL;
   switch (op_val) {
   case 0: str = "MAD"; break;
   case 1: str = "DP3"; break;
@@ -1578,7 +1578,6 @@ static char *to_texop(int val)
 
 static void dump_program(struct r500_fragment_program *fp)
 {
-  int pc = 0;
   int n;
   uint32_t inst;
   uint32_t inst0;
index 404dbf3b7c53ab28d40a47aef3f5095e64f0d756..5dd2def1c40a78ef7514f27f35e3692b7d7db4db 100644 (file)
@@ -30,8 +30,8 @@
  *   Ben Skeggs <darktama@iinet.net.au>
  *   Jerome Glisse <j.glisse@gmail.com>
  */
-#ifndef __R300_FRAGPROG_H_
-#define __R300_FRAGPROG_H_
+#ifndef __R500_FRAGPROG_H_
+#define __R500_FRAGPROG_H_
 
 #include "glheader.h"
 #include "macros.h"
 
 #include "r300_context.h"
 
-typedef struct r300_fragment_program_swizzle {
-       GLuint length;
-       GLuint src[4];
-       GLuint inst[8];
-} r300_fragment_program_swizzle_t;
-
 /* supported hw opcodes */
 #define PFS_OP_MAD 0
 #define PFS_OP_DP3 1
@@ -74,25 +68,6 @@ typedef struct r300_fragment_program_swizzle {
 #define SRC_MASK               (63 << 0)
 #define SRC_STRIDE             6
 
-#define NOP_INST0 (                                             \
-               (R300_FPI0_OUTC_MAD) |                           \
-               (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG0C_SHIFT) | \
-               (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG1C_SHIFT) | \
-               (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT))
-#define NOP_INST1 (                                         \
-               ((0 | SRC_CONST) << R300_FPI1_SRC0C_SHIFT) | \
-               ((0 | SRC_CONST) << R300_FPI1_SRC1C_SHIFT) | \
-               ((0 | SRC_CONST) << R300_FPI1_SRC2C_SHIFT))
-#define NOP_INST2 ( \
-               (R300_FPI2_OUTA_MAD) |                           \
-               (R300_FPI2_ARGA_ZERO << R300_FPI2_ARG0A_SHIFT) | \
-               (R300_FPI2_ARGA_ZERO << R300_FPI2_ARG1A_SHIFT) | \
-               (R300_FPI2_ARGA_ZERO << R300_FPI2_ARG2A_SHIFT))
-#define NOP_INST3 (                                         \
-               ((0 | SRC_CONST) << R300_FPI3_SRC0A_SHIFT) | \
-               ((0 | SRC_CONST) << R300_FPI3_SRC1A_SHIFT) | \
-               ((0 | SRC_CONST) << R300_FPI3_SRC2A_SHIFT))
-
 #define DRI_CONF_FP_OPTIMIZATION_SPEED   0
 #define DRI_CONF_FP_OPTIMIZATION_QUALITY 1
 
@@ -101,7 +76,4 @@ struct r500_fragment_program;
 extern void r500TranslateFragmentShader(r300ContextPtr r300,
                                        struct r500_fragment_program *fp);
 
-extern void r300TranslateFragmentShader(r300ContextPtr r300,
-                                       struct r300_fragment_program *fp);
-
 #endif