i965: Add helper for converting isl tiling to bufmgr tiling
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 12 May 2017 11:36:46 +0000 (14:36 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 19 Jun 2017 19:41:45 +0000 (22:41 +0300)
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_blit.h

index 2604417e2d5f47560835de1a368c66abe756363c..5e4d1f5eb4acba62ef36962bb9adab407de7fe8f 100644 (file)
 
 #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,