r300/compiler: Rewrite register allocator
[mesa.git] / src / mesa / drivers / dri / r300 / compiler / radeon_program_pair.h
index ccf7a0070cdae07ebd7e6f845216e5c257c9a49f..a957ea9f7a0b81b34577aaccc20928a2bb06a8c0 100644 (file)
@@ -63,7 +63,7 @@ struct rc_pair_instruction_source {
 
 struct rc_pair_instruction_arg {
        unsigned int Source:2;
-       unsigned int Swizzle:9;
+       unsigned int Swizzle:12;
        unsigned int Abs:1;
        unsigned int Negate:1;
 };
@@ -71,7 +71,7 @@ struct rc_pair_instruction_arg {
 struct rc_pair_sub_instruction {
        unsigned int Opcode:8;
        unsigned int DestIndex:RC_REGISTER_INDEX_BITS;
-       unsigned int WriteMask:3;
+       unsigned int WriteMask:4;
        unsigned int Target:2;
        unsigned int OutputWriteMask:3;
        unsigned int DepthWriteMask:1;
@@ -114,6 +114,10 @@ void rc_pair_foreach_source_that_rgb_reads(
 struct rc_pair_instruction_source * rc_pair_get_src(
        struct rc_pair_instruction * pair_inst,
        struct rc_pair_instruction_arg * arg);
+
+int rc_pair_get_src_index(
+       struct rc_pair_instruction * pair_inst,
+       struct rc_pair_instruction_source * src);
 /*@}*/
 
 
@@ -127,6 +131,7 @@ void rc_pair_translate(struct radeon_compiler *cc, void *user);
 void rc_pair_schedule(struct radeon_compiler *cc, void *user);
 void rc_pair_regalloc(struct radeon_compiler *cc, void *user);
 void rc_pair_regalloc_inputs_only(struct radeon_compiler *cc, void *user);
+void rc_pair_remove_dead_sources(struct radeon_compiler *c, void *user);
 /*@}*/
 
 #endif /* __RADEON_PROGRAM_PAIR_H_ */