summaryrefslogtreecommitdiff
path: root/src/r600_exa.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-03-02 12:20:45 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-03-02 12:20:45 -0500
commit6835e22256ba7a74c02504383f63baaba7e87156 (patch)
tree3377d7ed2d1be127513f5203abcafc57f48f76ac /src/r600_exa.c
parent8a8862e4165dc5be779bce5e327a31da4826db3b (diff)
r6xx+: truncate point sampled coordinates
By default the hardware rounds texcoords. However, for point sampled textures, the expected behavior is to truncate. When we have point sampled textures, set the truncate bit in the sampler. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/r600_exa.c')
-rw-r--r--src/r600_exa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c
index ab5e33b7..57e5c0f9 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -467,6 +467,7 @@ R600DoPrepareCopy(ScrnInfoPtr pScrn)
tex_samp.clamp_z = SQ_TEX_WRAP;
tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_POINT;
tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_POINT;
+ tex_samp.mc_coord_truncate = 1;
tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE;
tex_samp.mip_filter = 0; /* no mipmap */
r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp);
@@ -1115,6 +1116,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
case PictFilterNearest:
tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_POINT;
tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_POINT;
+ tex_samp.mc_coord_truncate = 1;
break;
case PictFilterBilinear:
tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR;