Mesa (master): radeonsi: add new depth_needs_decompression() helper
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Mon Apr 10 21:08:52 UTC 2017
Module: Mesa
Branch: master
Commit: 6646212de0b1a1b8161c46f6191a21b1540f2dd4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6646212de0b1a1b8161c46f6191a21b1540f2dd4
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Apr 6 00:07:33 2017 +0200
radeonsi: add new depth_needs_decompression() helper
v2: - rename to depth_needs_decompression() instead
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_descriptors.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 703a7cb1fa..47e455f9bc 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -559,6 +559,13 @@ static bool is_compressed_colortex(struct r600_texture *rtex)
(rtex->dcc_offset && rtex->dirty_level_mask);
}
+static bool depth_needs_decompression(struct r600_texture *rtex,
+ struct si_sampler_view *sview)
+{
+ return rtex->db_compatible &&
+ (!rtex->tc_compatible_htile || sview->is_stencil_sampler);
+}
+
static void si_update_compressed_tex_shader_mask(struct si_context *sctx,
unsigned shader)
{
@@ -602,8 +609,7 @@ static void si_set_sampler_views(struct pipe_context *ctx,
(struct r600_texture*)views[i]->texture;
struct si_sampler_view *rview = (struct si_sampler_view *)views[i];
- if (rtex->db_compatible &&
- (!rtex->tc_compatible_htile || rview->is_stencil_sampler)) {
+ if (depth_needs_decompression(rtex, rview)) {
samplers->depth_texture_mask |= 1u << slot;
} else {
samplers->depth_texture_mask &= ~(1u << slot);
More information about the mesa-commit
mailing list