summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
AgeCommit message (Collapse)Author
2011-01-29r300/compiler: Standardize the number of bits used by swizzle fieldsTom Stellard
Swizzles are now defined everywhere as a field with 12 bits that contains 4 channels worth of meaningful information. Any channel that is unused is set to RC_SWIZZLE_UNUSED. This change is necessary because rgb instructions and alpha instructions were initializing channels that would never be used (channel 3 for rgb and channels 1-3 for alpha) with 0 (aka RC_SWIZZLE_X). This made it impossible to use generic helper functions for swizzles, because sometimes a channel value of 0 meant unused and other times it meant RC_SWIZZLE_X. All hacks that tried to guess how many channels were relevant have also been removed.
2011-01-04r300/compiler: Fix black terrain in Civ4Tom Stellard
rc_inst_can_use_presub() wasn't checking for too many RGB sources in Alpha instructions or too many Alpha sources in RGB instructions. Note: This is a candidate for the 7.10 branch.
2010-11-26r300/compiler: move util functions to radeon_compiler_utilMarek Olšák
The compiler seriously needs a cleanup as far as the arrangement of functions is concerned. It's hard to know whether some function was implemented or not because there are so many places to search in and it can be anywhere and named anyhow.
2010-11-21r300/compiler: Use presubtract operations as much as possibleTom Stellard
Previously, presubtract operations where only being used by instructions with less than three source source registers.
2010-10-18r300/compiler: Add a new function for more efficient dataflow analysisTom Stellard
rc_get_readers_normal() supplies a list of readers for a given instruction. This function is now being used by the copy propagate optimization and will eventually be used by most other optimization passes as well.