summaryrefslogtreecommitdiff
path: root/src/radeon_accelfuncs.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2009-04-13 15:36:07 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-17 10:24:58 -0400
commita30737b337edb31528174b483c9094941a5d41bb (patch)
tree32d75dbdfee5ec44567e5e7a7e8c0370cd263a6b /src/radeon_accelfuncs.c
parent9dd33cc8346073300312cd5f68de72d9bea1dd6b (diff)
r200/r300: implement brightness/contrast/hue/saturation/gamma controls for textured video
This implements contrast/brightness/hue/saturation controls for r200/r300 plus gamma (same gamma value for all channels used though separate values would be trivial) control for r300. Some issues left: - only r200/r300 - still can't be combined with bicubic - controls will silently cease to work if the format used is packed and not planar (except for rv250) - gamma range is from 100 to 10000 corresponding to 0.1 and 10.0 like used in overlay. However, usable range is far smaller. Over 2.0 picture gets dark pretty quickly, and below 0.6 or so black seems to turn into purple (I've verified that even with gamma 1.0 black actually often seems to be RGB 1/0/1 so this explains this since that gets amplified by low gamma values - not sure if this is a rounding problem somewhere, bogus reference values or is somehow expected). - gamma adds a bit too many instructions for my taste (7) though the alternative (3 texture lookups + some swizzling instructions) doesn't seem any better.
Diffstat (limited to 'src/radeon_accelfuncs.c')
-rw-r--r--src/radeon_accelfuncs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/radeon_accelfuncs.c b/src/radeon_accelfuncs.c
index 45eb6d55..2d6fe01d 100644
--- a/src/radeon_accelfuncs.c
+++ b/src/radeon_accelfuncs.c
@@ -1345,10 +1345,7 @@ FUNC_NAME(RADEONAccelInit)(ScreenPtr pScreen, XAAInfoRecPtr a)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "XAA Render acceleration "
"unsupported on Radeon 9500/9700 and newer. "
"Please use EXA instead.\n");
- } else if ((info->ChipFamily == CHIP_FAMILY_RV250) ||
- (info->ChipFamily == CHIP_FAMILY_RV280) ||
- (info->ChipFamily == CHIP_FAMILY_RS300) ||
- (info->ChipFamily == CHIP_FAMILY_R200)) {
+ } else if (IS_R200_3D) {
a->SetupForCPUToScreenAlphaTexture2 =
FUNC_NAME(R200SetupForCPUToScreenAlphaTexture);
a->SubsequentCPUToScreenAlphaTexture =