r300g: fix anisotropic filtering, fix macrotiling
authorMarek Olšák <maraeo@gmail.com>
Sat, 13 Mar 2010 15:24:50 +0000 (16:24 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 13 Mar 2010 17:23:27 +0000 (18:23 +0100)
Two bug fixes at the same time. :)

src/gallium/drivers/r300/r300_state.c

index ced6c810ec5e94fc20d9de9464d2e0155a917a30..bcd75a4225ea1220fd80a8c226e0897cf5825f42 100644 (file)
@@ -864,6 +864,8 @@ static void*
                                                    state->min_mip_filter,
                                                    state->max_anisotropy > 0);
 
+    sampler->filter0 |= r300_anisotropy(state->max_anisotropy);
+
     /* Unfortunately, r300-r500 don't support floating-point mipmap lods. */
     /* We must pass these to the merge function to clamp them properly. */
     sampler->min_lod = MAX2((unsigned)state->min_lod, 0);
@@ -873,8 +875,6 @@ static void*
 
     sampler->filter1 |= lod_bias << R300_LOD_BIAS_SHIFT;
 
-    sampler->filter1 |= r300_anisotropy(state->max_anisotropy);
-
     util_pack_color(state->border_color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
     sampler->border_color = uc.ui;