freedreno/a3xx: add per-texture seamless cubemap control
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 8 Aug 2015 03:11:45 +0000 (23:11 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 16 Aug 2015 07:01:53 +0000 (03:01 -0400)
The default is to enable seamless cubemap filtering, but there's a bit
to turn it off.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a3xx/fd3_texture.c
src/gallium/drivers/freedreno/freedreno_screen.c

index c30658d0e7b363ee4549fbc4b3df3ac24935f640..3f36ebe62d15f10dbcb64a336bd31a82243ef6d7 100644 (file)
@@ -115,6 +115,7 @@ fd3_sampler_state_create(struct pipe_context *pctx,
 
        so->texsamp0 =
                        COND(!cso->normalized_coords, A3XX_TEX_SAMP_0_UNNORM_COORDS) |
+                       COND(!cso->seamless_cube_map, A3XX_TEX_SAMP_0_CUBEMAPSEAMLESSFILTOFF) |
                        COND(miplinear, A3XX_TEX_SAMP_0_MIPFILTER_LINEAR) |
                        A3XX_TEX_SAMP_0_XY_MAG(tex_filter(cso->mag_img_filter, aniso)) |
                        A3XX_TEX_SAMP_0_XY_MIN(tex_filter(cso->min_img_filter, aniso)) |
index ef1a2e7f9d3a4d0c84697cf0bd70afa3772eb6a8..86e9a21da2ff45ef2488d21321c180b976b7b5f5 100644 (file)
@@ -191,6 +191,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                return 16383;
 
        case PIPE_CAP_DEPTH_CLIP_DISABLE:
+       case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
                return is_a3xx(screen);
 
        case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
@@ -206,7 +207,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                return is_ir3(screen) ? 130 : 120;
 
        /* Unsupported features. */
-       case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
        case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
        case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: