diff options
author | Tom Stellard <tstellar@gmail.com> | 2010-11-08 18:49:44 -0800 |
---|---|---|
committer | Tom Stellard <tstellar@gmail.com> | 2010-11-21 18:48:31 -0800 |
commit | bbe49bc585c4fed46f55d184b463d13bddd97f1b (patch) | |
tree | 55597798857bcf9d1ed8f8d0c53fbb160d5fabd8 /src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h | |
parent | ddceededf850c942c1bb8185ec7dc0c203d3bad6 (diff) |
r300/compiler: Use presubtract operations as much as possible
Previously, presubtract operations where only being used by instructions
with less than three source source registers.
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h index 1a14e7cb0e..e50dfbd4fb 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h @@ -3,6 +3,9 @@ #ifndef RADEON_PROGRAM_UTIL_H #define RADEON_PROGRAM_UTIL_H +struct rc_instruction; +struct rc_src_register; + unsigned int rc_swizzle_to_writemask(unsigned int swz); unsigned int rc_src_reads_dst_mask( @@ -13,4 +16,16 @@ unsigned int rc_src_reads_dst_mask( unsigned int dst_idx, unsigned int dst_mask); +unsigned int rc_source_type_swz(unsigned int swizzle, unsigned int channels); + +unsigned int rc_source_type_mask(unsigned int mask); + +unsigned int rc_inst_can_use_presub( + struct rc_instruction * inst, + rc_presubtract_op presub_op, + unsigned int presub_writemask, + struct rc_src_register replace_reg, + struct rc_src_register presub_src0, + struct rc_src_register presub_src1); + #endif /* RADEON_PROGRAM_UTIL_H */ |