summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-07-27 20:16:17 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-07-27 22:51:40 +0200
commit3ccf89d58479d48b8643b1c67c4b9c34b6b97e4a (patch)
treed1e18461617281c5dfba599eea087e85dcd356d8 /src/mesa
parent59fff53492fb385f8567c163aed014fdd9c0f8fa (diff)
r300/compiler: Make calculate_inputs_outputs available to external users
In the long run, it's probably better to just get rid of InputsRead and OutputsWritten. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.h5
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_nqssadce.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
index 15f8b8fd92..5bdc075447 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
@@ -43,6 +43,9 @@ struct rc_program {
*/
struct rc_instruction Instructions;
+ /* Long term, we should probably remove InputsRead & OutputsWritten,
+ * since updating dependent state can be fragile, and they aren't
+ * actually used very often. */
uint32_t InputsRead;
uint32_t OutputsWritten;
uint32_t ShadowSamplers; /**< Texture units used for shadow sampling. */
@@ -66,6 +69,8 @@ void rc_error(struct radeon_compiler * c, const char * fmt, ...);
void rc_mesa_to_rc_program(struct radeon_compiler * c, struct gl_program * program);
+void rc_calculate_inputs_outputs(struct radeon_compiler * c);
+
void rc_move_input(struct radeon_compiler * c, unsigned input, struct prog_src_register new_input);
void rc_move_output(struct radeon_compiler * c, unsigned output, unsigned new_output, unsigned writemask);
void rc_copy_output(struct radeon_compiler * c, unsigned output, unsigned dup_output);
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_nqssadce.c b/src/mesa/drivers/dri/r300/compiler/radeon_nqssadce.c
index 9d0e265a5d..aaaa50ad1f 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_nqssadce.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_nqssadce.c
@@ -252,7 +252,7 @@ static void process_instruction(struct nqssadce_state* s)
s->IP = s->IP->Prev;
}
-static void calculateInputs(struct radeon_compiler * c)
+void rc_calculate_inputs_outputs(struct radeon_compiler * c)
{
struct rc_instruction *inst;
@@ -290,5 +290,5 @@ void radeonNqssaDce(struct radeon_compiler * c, struct radeon_nqssadce_descr* de
while(s.IP != &c->Program.Instructions && !c->Error)
process_instruction(&s);
- calculateInputs(c);
+ rc_calculate_inputs_outputs(c);
}