r300: Further reduce dependency between compiler and classic driver
authorNicolai Hähnle <nhaehnle@gmail.com>
Tue, 21 Jul 2009 16:28:30 +0000 (18:28 +0200)
committerNicolai Hähnle <nhaehnle@gmail.com>
Mon, 27 Jul 2009 18:32:04 +0000 (20:32 +0200)
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
src/mesa/drivers/dri/r300/compiler/r300_fragprog.h
src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
src/mesa/drivers/dri/r300/compiler/r500_fragprog.h
src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h

index 00ef9645711b5b66ad28436ca5ac99f8fb1043ed..932f9d9771698e90c62429be9cd22b6c60aa6adb 100644 (file)
  *
  */
 
-#include "compiler/r300_fragprog.h"
+#include "r300_fragprog.h"
 
 #include "shader/prog_parameter.h"
 
-#include "r300_reg.h"
+#include "../r300_reg.h"
 
 static void reset_srcreg(struct prog_src_register* reg)
 {
index 186fad6490f44daec693c24be0eaf4e8f28f5e8a..21507bd8e06ce264be1d083148f8951fae8464dc 100644 (file)
@@ -36,8 +36,8 @@
 #include "shader/program.h"
 #include "shader/prog_instruction.h"
 
-#include "compiler/radeon_compiler.h"
-#include "compiler/radeon_program.h"
+#include "radeon_compiler.h"
+#include "radeon_program.h"
 
 
 extern GLboolean r300BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *compiler);
index d6784d1c22a1b241953a25e2d48e0fa6110d1efe..520d81d3b4f385ab63044cb516362a3359cc2379 100644 (file)
  * \todo FogOption
  */
 
-#include "compiler/r300_fragprog.h"
+#include "r300_fragprog.h"
 
-#include "r300_reg.h"
+#include "../r300_reg.h"
 
-#include "compiler/radeon_program_pair.h"
-#include "compiler/r300_fragprog_swizzle.h"
+#include "radeon_program_pair.h"
+#include "r300_fragprog_swizzle.h"
 
 
 #define PROG_CODE \
@@ -334,7 +334,7 @@ GLboolean r300BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *
        code->node[0].alu_end = -1;
        code->node[0].tex_end = -1;
 
-       if (!radeonPairProgram(compiler->program, &pair_handler, compiler))
+       if (!radeonPairProgram(compiler->program, &pair_handler, compiler, compiler->debug))
                return GL_FALSE;
 
        if (!finish_node(compiler))
index fc9d855bce6ab7e2f4c7faa0b0bb47eb13fed93f..9e88d14ad54a3b582bd9aca89cc892115ac52fe0 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "r300_fragprog_swizzle.h"
 
-#include "r300_reg.h"
+#include "../r300_reg.h"
 #include "radeon_nqssadce.h"
 
 #define MAKE_SWZ3(x, y, z) (MAKE_SWIZZLE4(SWIZZLE_##x, SWIZZLE_##y, SWIZZLE_##z, SWIZZLE_ZERO))
index fdc18caacb75fdc707ab669af2b7cad5da8f6ba5..4545982bf16585df53f889a26bd332b50a4bea83 100644 (file)
@@ -25,9 +25,9 @@
  *
  */
 
-#include "compiler/r500_fragprog.h"
+#include "r500_fragprog.h"
 
-#include "r300_reg.h"
+#include "../r300_reg.h"
 
 static void reset_srcreg(struct prog_src_register* reg)
 {
index 232993f5816d6a450b6b5ce70f1f26a2cd0268ad..a1ffde1e8382c4b1b971093639cd1d79e7cb0778 100644 (file)
@@ -36,8 +36,8 @@
 #include "shader/prog_parameter.h"
 #include "shader/prog_instruction.h"
 
-#include "compiler/radeon_compiler.h"
-#include "compiler/radeon_nqssadce.h"
+#include "radeon_compiler.h"
+#include "radeon_nqssadce.h"
 
 extern GLboolean r500BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *compiler);
 
index 3d5ddbb981b3eba8fad9d308679d1af5167a4a61..5640ed0bcaad88304bf20ea610e94b25cce86b63 100644 (file)
  *
  */
 
-#include "compiler/r500_fragprog.h"
+#include "r500_fragprog.h"
 
-#include "r300_reg.h"
+#include "../r300_reg.h"
 
-#include "compiler/radeon_program_pair.h"
+#include "radeon_program_pair.h"
 
 
 #define PROG_CODE \
@@ -310,7 +310,7 @@ GLboolean r500BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *
        code->inst_offset = 0;
        code->inst_end = -1;
 
-       if (!radeonPairProgram(compiler->program, &pair_handler, compiler))
+       if (!radeonPairProgram(compiler->program, &pair_handler, compiler, compiler->debug))
                return GL_FALSE;
 
        if ((code->inst[code->inst_end].inst0 & R500_INST_TYPE_MASK) != R500_INST_TYPE_OUT) {
index 4be948b0c112c0c029ecb4fc763a7ff4dad71835..254431731b32d4d8b9e0a0e286f45020ae9228ab 100644 (file)
@@ -35,8 +35,6 @@
 
 #include "radeon_program_pair.h"
 
-#include "radeon_common.h"
-
 #include "memory_pool.h"
 #include "shader/prog_print.h"
 
@@ -877,7 +875,8 @@ static void emit_alu(struct pair_state *s)
 
 
 GLboolean radeonPairProgram(struct gl_program *program,
-       const struct radeon_pair_handler* handler, void *userdata)
+       const struct radeon_pair_handler* handler, void *userdata,
+       GLboolean debug)
 {
        struct pair_state s;
 
@@ -886,7 +885,7 @@ GLboolean radeonPairProgram(struct gl_program *program,
        s.Program = program;
        s.Handler = handler;
        s.UserData = userdata;
-       s.Debug = (RADEON_DEBUG & DEBUG_PIXEL) ? GL_TRUE : GL_FALSE;
+       s.Debug = debug;
        s.Verbose = GL_FALSE && s.Debug;
 
        if (s.Debug)
index 9f4797663329597a0e295b6b7e839f9cebd9332a..86e3ec4537d0fb9bb5758f83a1ee1ac597414310 100644 (file)
@@ -140,7 +140,8 @@ struct radeon_pair_handler {
 };
 
 GLboolean radeonPairProgram(struct gl_program *program,
-       const struct radeon_pair_handler*, void *userdata);
+       const struct radeon_pair_handler*, void *userdata,
+       GLboolean debug);
 
 void radeonPrintPairInstruction(struct radeon_pair_instruction *inst);