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;
};
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;
typedef void (*rc_pair_foreach_src_fn)
(void *, struct rc_pair_instruction_source *);
-typedef enum {
- RC_PAIR_SOURCE_NONE = 0,
- RC_PAIR_SOURCE_RGB,
- RC_PAIR_SOURCE_ALPHA
-} rc_pair_source_type;
-
/**
* General helper functions for dealing with the paired instruction format.
*/
void * data,
rc_pair_foreach_src_fn cb);
-rc_pair_source_type rc_source_type_that_arg_reads(
- unsigned int source,
- unsigned int swizzle,
- unsigned int channels);
+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);
/*@}*/
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_ */