[PATCH 1/3] Remove dead code flagged by gcc -Wunused-but-set-variable.
Michel Dänzer
michel at daenzer.net
Tue Dec 11 03:10:59 PST 2012
From: Michel Dänzer <michel.daenzer at amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/drmmode_display.c | 2 --
src/evergreen_textured_videofuncs.c | 12 ------------
src/r600_textured_videofuncs.c | 12 ------------
src/radeon_textured_videofuncs.c | 12 ------------
4 files changed, 38 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d00e60d..db106ea 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1535,11 +1535,9 @@ drm_wakeup_handler(pointer data, int err, pointer p)
Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
{
- xf86CrtcConfigPtr xf86_config;
int i, num_dvi = 0, num_hdmi = 0;
xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
- xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
drmmode->scrn = pScrn;
drmmode->cpp = cpp;
diff --git a/src/evergreen_textured_videofuncs.c b/src/evergreen_textured_videofuncs.c
index 6daf30e..a1956e7 100644
--- a/src/evergreen_textured_videofuncs.c
+++ b/src/evergreen_textured_videofuncs.c
@@ -106,7 +106,6 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
float uco[3], vco[3], off[3];
float bright, cont, gamma;
int ref = pPriv->transform_index;
- Bool needgamma = FALSE;
float *ps_alu_consts;
const_config_t ps_const_conf;
float *vs_alu_consts;
@@ -133,17 +132,6 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
// XXX
gamma = 1.0;
- if (gamma != 1.0) {
- needgamma = TRUE;
- /* note: gamma correction is out = in ^ gamma;
- gpu can only do LG2/EX2 therefore we transform into
- in ^ gamma = 2 ^ (log2(in) * gamma).
- Lots of scalar ops, unfortunately (better solution?) -
- without gamma that's 3 inst, with gamma it's 10...
- could use different gamma factors per channel,
- if that's of any use. */
- }
-
CLEAR (cb_conf);
CLEAR (tex_res);
CLEAR (tex_samp);
diff --git a/src/r600_textured_videofuncs.c b/src/r600_textured_videofuncs.c
index 970ab8e..19cf82d 100644
--- a/src/r600_textured_videofuncs.c
+++ b/src/r600_textured_videofuncs.c
@@ -106,7 +106,6 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
float uco[3], vco[3], off[3];
float bright, cont, gamma;
int ref = pPriv->transform_index;
- Bool needgamma = FALSE;
float ps_alu_consts[12];
float vs_alu_consts[4];
@@ -131,17 +130,6 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
// XXX
gamma = 1.0;
- if (gamma != 1.0) {
- needgamma = TRUE;
- /* note: gamma correction is out = in ^ gamma;
- gpu can only do LG2/EX2 therefore we transform into
- in ^ gamma = 2 ^ (log2(in) * gamma).
- Lots of scalar ops, unfortunately (better solution?) -
- without gamma that's 3 inst, with gamma it's 10...
- could use different gamma factors per channel,
- if that's of any use. */
- }
-
/* setup the ps consts */
ps_alu_consts[0] = off[0];
ps_alu_consts[1] = off[1];
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index c1bdc65..02eb0b7 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -3248,7 +3248,6 @@ R500PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
float uco[3], vco[3], off[3];
float bright, cont, gamma;
int ref = pPriv->transform_index;
- Bool needgamma = FALSE;
cont = RTFContrast(pPriv->contrast);
bright = RTFBrightness(pPriv->brightness);
@@ -3270,17 +3269,6 @@ R500PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
//XXX gamma
- if (gamma != 1.0) {
- needgamma = TRUE;
- /* note: gamma correction is out = in ^ gamma;
- gpu can only do LG2/EX2 therefore we transform into
- in ^ gamma = 2 ^ (log2(in) * gamma).
- Lots of scalar ops, unfortunately (better solution?) -
- without gamma that's 3 inst, with gamma it's 10...
- could use different gamma factors per channel,
- if that's of any use. */
- }
-
if (pPriv->is_planar) {
BEGIN_RING(2*56);
/* 2 components: 2 for tex0 */
--
1.7.10.4
More information about the xorg-driver-ati
mailing list