summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2017-05-12 14:36:46 +0300
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2017-05-13 10:34:36 +0300
commite574aec0a3656390f298b9bba31dfa3c631e1eb9 (patch)
treefb59933bbc41066779e28641b44dbc6c5cd4d94a
parentec80d69277e073b44ef53db372a0bf003fbbdf0b (diff)
i965: Add helper for converting isl tiling to bufmgr tiling
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.h b/src/mesa/drivers/dri/i965/intel_blit.h
index 2604417e2d..5e4d1f5eb4 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.h
+++ b/src/mesa/drivers/dri/i965/intel_blit.h
@@ -28,6 +28,19 @@
#include "brw_context.h"
+static inline unsigned
+isl_tiling_to_bufmgr_tiling(enum isl_tiling tiling)
+{
+ if (tiling == ISL_TILING_X)
+ return I915_TILING_X;
+
+ if (tiling == ISL_TILING_Y0)
+ return I915_TILING_Y;
+
+ /* All other are unknown to buffer allocator. */
+ return I915_TILING_NONE;
+}
+
bool
intelEmitCopyBlit(struct brw_context *brw,
GLuint cpp,