Mesa (master): gallium/u_blitter: use TEX_LZ if it's supported

Marek Olšák mareko at kemper.freedesktop.org
Wed Jun 7 16:11:28 UTC 2017


Module: Mesa
Branch: master
Commit: 06045685272afbbe46d76ee16c7ad486c9972447
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=06045685272afbbe46d76ee16c7ad486c9972447

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue May 30 17:07:47 2017 +0200

gallium/u_blitter: use TEX_LZ if it's supported

The sampler views always have first_level == last_level.
Now radeonsi doesn't have to use the WQM. (a few SALU removed)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/gallium/auxiliary/util/u_blitter.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 1aef01376e..21f0686175 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -132,6 +132,7 @@ struct blitter_context_priv
    boolean has_stream_out;
    boolean has_stencil_export;
    boolean has_texture_multisample;
+   boolean has_tex_lz;
    boolean cached_all_shaders;
 
    /* The Draw module overrides these functions.
@@ -197,6 +198,9 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
    ctx->has_texture_multisample =
       pipe->screen->get_param(pipe->screen, PIPE_CAP_TEXTURE_MULTISAMPLE);
 
+   ctx->has_tex_lz = pipe->screen->get_param(pipe->screen,
+                                             PIPE_CAP_TGSI_TEX_TXF_LZ);
+
    /* blend state objects */
    memset(&blend, 0, sizeof(blend));
 
@@ -953,7 +957,7 @@ static void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx,
          *shader = util_make_fragment_tex_shader(pipe, tgsi_tex,
                                                  TGSI_INTERPOLATE_LINEAR,
                                                  stype, dtype,
-                                                 false, false);
+                                                 ctx->has_tex_lz, false);
       }
 
       return *shader;
@@ -992,7 +996,7 @@ void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
          *shader =
             util_make_fragment_tex_shader_writedepth(pipe, tgsi_tex,
                                                      TGSI_INTERPOLATE_LINEAR,
-                                                     false, false);
+                                                     ctx->has_tex_lz, false);
       }
 
       return *shader;
@@ -1031,7 +1035,7 @@ void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
          *shader =
             util_make_fragment_tex_shader_writedepthstencil(pipe, tgsi_tex,
                                                             TGSI_INTERPOLATE_LINEAR,
-                                                            false,
+                                                            ctx->has_tex_lz,
                                                             false);
       }
 
@@ -1071,7 +1075,7 @@ void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
          *shader =
             util_make_fragment_tex_shader_writestencil(pipe, tgsi_tex,
                                                        TGSI_INTERPOLATE_LINEAR,
-                                                       false, false);
+                                                       ctx->has_tex_lz, false);
       }
 
       return *shader;




More information about the mesa-commit mailing list