i965: samplers group in fours in WM_STATE. fix bug#9415
authorXiang, Haihao <haihao.xiang@intel.com>
Wed, 29 Aug 2007 14:13:10 +0000 (10:13 -0400)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 29 Aug 2007 14:13:10 +0000 (10:13 -0400)
src/mesa/drivers/dri/i965/brw_wm_state.c

index ff5cb31bdd148fb749c9b5b14aa2a25525482f18..5b4f2abd0e269740cb07d035d44a0b8ddbff3d22 100644 (file)
@@ -117,7 +117,7 @@ static void upload_wm_unit(struct brw_context *brw )
    wm.thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754;
 
    /* CACHE_NEW_SAMPLER */
-   wm.wm4.sampler_count = brw->wm.sampler_count;
+   wm.wm4.sampler_count = (brw->wm.sampler_count + 1) / 4;
    wm.wm4.sampler_state_pointer = brw->wm.sampler_gs_offset >> 5;
 
    /* BRW_NEW_FRAGMENT_PROGRAM */