freedreno/a4xx: allow seamless cubemap filtering to be enabled per-texture
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 19 Nov 2015 05:06:46 +0000 (00:06 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 20 Nov 2015 00:00:18 +0000 (19:00 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a4xx/a4xx.xml.h
src/gallium/drivers/freedreno/a4xx/fd4_texture.c
src/gallium/drivers/freedreno/freedreno_screen.c

index 07d0db16cdeed9861225d8d43d751bdaa1094bc6..ec002f679800e22aa866b8549f28582f10f95d1a 100644 (file)
@@ -2755,6 +2755,7 @@ static inline uint32_t A4XX_TEX_SAMP_1_COMPARE_FUNC(enum adreno_compare_func val
 {
        return ((val) << A4XX_TEX_SAMP_1_COMPARE_FUNC__SHIFT) & A4XX_TEX_SAMP_1_COMPARE_FUNC__MASK;
 }
+#define A4XX_TEX_SAMP_1_CUBEMAPSEAMLESSFILTOFF                 0x00000010
 #define A4XX_TEX_SAMP_1_UNNORM_COORDS                          0x00000020
 #define A4XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR                   0x00000040
 #define A4XX_TEX_SAMP_1_MAX_LOD__MASK                          0x000fff00
index 886b4547929c441c13d693e7137ff056e7940ba5..00c257b78e593d4975ceeea6394d55d37fa959cc 100644 (file)
@@ -124,6 +124,7 @@ fd4_sampler_state_create(struct pipe_context *pctx,
 
        so->texsamp1 =
 //             COND(miplinear, A4XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR) |
+               COND(!cso->seamless_cube_map, A4XX_TEX_SAMP_1_CUBEMAPSEAMLESSFILTOFF) |
                COND(!cso->normalized_coords, A4XX_TEX_SAMP_1_UNNORM_COORDS);
 
        if (cso->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) {
index 456917730d60914bd870f4275a62065599c2150a..8ab78d8187cae8b23e0f5d9535f388ef1d39c5ef 100644 (file)
@@ -178,6 +178,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
        case PIPE_CAP_CONDITIONAL_RENDER:
        case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
        case PIPE_CAP_FAKE_SW_MSAA:
+       case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
                return is_a3xx(screen) || is_a4xx(screen);
 
        case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
@@ -193,7 +194,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 
        case PIPE_CAP_DEPTH_CLIP_DISABLE:
        case PIPE_CAP_CLIP_HALFZ:
-       case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
                return is_a3xx(screen);
 
        case PIPE_CAP_TEXTURE_FLOAT_LINEAR: