summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-07-21 18:28:30 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-07-27 20:32:04 +0200
commitd6275ccf79667094de496d06aba35222be9935fc (patch)
tree7c0a46a89e142ea61b7ffc90bd496cb1d51de55c /src
parentf70d3ee3710a3453289aabf637f6818e198c67a5 (diff)
r300: Further reduce dependency between compiler and classic driver
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog.h4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c10
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog.h4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c8
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c7
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h3
9 files changed, 23 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
index 00ef964571..932f9d9771 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
@@ -25,11 +25,11 @@
*
*/
-#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)
{
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog.h b/src/mesa/drivers/dri/r300/compiler/r300_fragprog.h
index 186fad6490..21507bd8e0 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog.h
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog.h
@@ -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);
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
index d6784d1c22..520d81d3b4 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
@@ -38,12 +38,12 @@
* \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))
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
index fc9d855bce..9e88d14ad5 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
@@ -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))
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
index fdc18caacb..4545982bf1 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
@@ -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)
{
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.h b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.h
index 232993f581..a1ffde1e83 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.h
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.h
@@ -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);
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
index 3d5ddbb981..5640ed0bca 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
@@ -43,11 +43,11 @@
*
*/
-#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) {
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
index 4be948b0c1..254431731b 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
@@ -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)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
index 9f47976633..86e3ec4537 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
@@ -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);