summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.h
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-12-29 00:16:13 +0200
committerImre Deak <imre.deak@intel.com>2019-12-31 14:43:39 +0200
commitea6858b6283740a64c6c8bb90d7bc8d457368d6e (patch)
treed928fdc338b4493793b572ed71ce60d754125f90 /lib/intel_batchbuffer.h
parent2ead76177f2546d3eec0abbd0d9e47cd36588199 (diff)
lib/igt_buf: Use compression type consistently
Use the igt_buf compression field to determine the compression type for a buffer, instead of the fact that AUX stride is set. We need to look at the former one anyway to distinguish between compression types. Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/intel_batchbuffer.h')
-rw-r--r--lib/intel_batchbuffer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 37e3affe..c3028343 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -249,6 +249,11 @@ struct igt_buf {
unsigned num_tiles;
};
+static inline bool igt_buf_compressed(const struct igt_buf *buf)
+{
+ return buf->compression != I915_COMPRESSION_NONE;
+}
+
unsigned igt_buf_width(const struct igt_buf *buf);
unsigned igt_buf_height(const struct igt_buf *buf);