From 3996e493693d5aa048fed1c2fd6db4027cb47df4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 13 Mar 2010 17:38:43 +0100 Subject: r300g: add high quality anisotropic filtering for R5xx (disabled by default) Oh look, an undocumented feature. It's a nice tool for benchmarking texturing. --- src/gallium/drivers/r300/r300_state.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/drivers/r300/r300_state.c') diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index bcd75a4225..3098145dfb 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -849,6 +849,7 @@ static void* { struct r300_context* r300 = r300_context(pipe); struct r300_sampler_state* sampler = CALLOC_STRUCT(r300_sampler_state); + boolean is_r500 = r300_screen(pipe->screen)->caps->is_r500; int lod_bias; union util_color uc; @@ -875,6 +876,14 @@ static void* sampler->filter1 |= lod_bias << R300_LOD_BIAS_SHIFT; + /* This is very high quality anisotropic filtering for R5xx. + * It's good for benchmarking the performance of texturing but + * in practice we don't want to slow down the driver because it's + * a pretty good performance killer. Feel free to play with it. */ + if (DBG_ON(r300, DBG_ANISOHQ) && is_r500) { + sampler->filter1 |= r500_anisotropy(state->max_anisotropy); + } + util_pack_color(state->border_color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc); sampler->border_color = uc.ui; -- cgit v1.2.3