summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-08-19 15:28:14 +0200
committerMarek Olšák <[email protected]>2017-08-22 13:29:47 +0200
commite96259fabec0d9f8d20d21bca5b01f1ea41d3965 (patch)
treea80c95cfd3d2d69b04e17a922048e3bae9349128 /src/gallium/drivers/radeon
parent7dec48b81e88dc933a23d12d3a71a4c6b9f216e4 (diff)
gallium/radeon: add helpers for whether HTILE is enabled
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 813ea067f16..59886ecccc6 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -1006,6 +1006,19 @@ vi_dcc_enabled(struct r600_texture *tex, unsigned level)
return tex->dcc_offset && level < tex->surface.num_dcc_levels;
}
+static inline bool
+r600_htile_enabled(struct r600_texture *tex, unsigned level)
+{
+ return tex->htile_offset && level == 0;
+}
+
+static inline bool
+vi_tc_compat_htile_enabled(struct r600_texture *tex, unsigned level)
+{
+ assert(!tex->tc_compatible_htile || tex->htile_offset);
+ return tex->tc_compatible_htile && level == 0;
+}
+
#define COMPUTE_DBG(rscreen, fmt, args...) \
do { \
if ((rscreen->b.debug_flags & DBG_COMPUTE)) fprintf(stderr, fmt, ##args); \