diff options
author | Tom Stellard <tstellar@gmail.com> | 2010-09-23 21:15:06 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@gmail.com> | 2010-09-27 23:17:11 -0700 |
commit | 798355d429f3cd6e76bb1d01549c203e443348b6 (patch) | |
tree | e54818f3124e75e10b906e8d8ca92e593d28590b /src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h | |
parent | 34dba5f05aa36baecdc655f7f94fed871006d590 (diff) |
r300/compiler: Add more helper functions for iterating through sources
rc_for_all_reads_src() and rc_pair_for_all_reads_arg() pass references to
instruction sources to the callback so they can be modified directly.
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h index 795d9cc2b6..d10ae3c7b7 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h @@ -33,6 +33,8 @@ struct radeon_compiler; struct rc_instruction; struct rc_swizzle_caps; +struct rc_src_register; +struct rc_pair_instruction_arg; /** @@ -49,6 +51,16 @@ typedef void (*rc_read_write_mask_fn)(void * userdata, struct rc_instruction * i void rc_for_all_reads_mask(struct rc_instruction * inst, rc_read_write_mask_fn cb, void * userdata); void rc_for_all_writes_mask(struct rc_instruction * inst, rc_read_write_mask_fn cb, void * userdata); +typedef void (*rc_read_src_fn)(void * userdata, struct rc_instruction * inst, + struct rc_src_register * src); +void rc_for_all_reads_src(struct rc_instruction * inst, rc_read_src_fn cb, + void * userdata); + +typedef void (*rc_pair_read_arg_fn)(void * userdata, + struct rc_instruction * inst, struct rc_pair_instruction_arg * arg); +void rc_pair_for_all_reads_arg(struct rc_instruction * inst, + rc_pair_read_arg_fn cb, void * userdata); + typedef void (*rc_remap_register_fn)(void * userdata, struct rc_instruction * inst, rc_register_file * pfile, unsigned int * pindex); void rc_remap_registers(struct rc_instruction * inst, rc_remap_register_fn cb, void * userdata); |