freedreno/a4xx: rect textures
authorRob Clark <robclark@freedesktop.org>
Tue, 2 Dec 2014 22:17:02 +0000 (17:17 -0500)
committerRob Clark <robclark@freedesktop.org>
Wed, 3 Dec 2014 14:22:05 +0000 (09:22 -0500)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a4xx/fd4_texture.c

index 874e0014d937ce14985aa91060c0bf9d75330edd..6523c71e4c18cc84e4824e9b5cca75918998c05c 100644 (file)
@@ -99,12 +99,13 @@ fd4_sampler_state_create(struct pipe_context *pctx,
                A4XX_TEX_SAMP_0_WRAP_T(tex_clamp(cso->wrap_t)) |
                A4XX_TEX_SAMP_0_WRAP_R(tex_clamp(cso->wrap_r));
 
+       so->texsamp1 =
+               COND(!cso->normalized_coords, A4XX_TEX_SAMP_1_UNNORM_COORDS);
+
        if (cso->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) {
-               so->texsamp1 =
+               so->texsamp1 |=
                        A4XX_TEX_SAMP_1_MIN_LOD(cso->min_lod) |
                        A4XX_TEX_SAMP_1_MAX_LOD(cso->max_lod);
-       } else {
-               so->texsamp1 = 0x00000000;
        }
 
        if (cso->compare_mode)