Files
compute-runtime/runtime/os_interface/linux/tiling_mode_helper.h
Mateusz Hoppe b13bd16665 Add support for tiling mode selection to VA sharing
Change-Id: I459c472a4b8d74dba70df54c9da29865672114eb
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-04-03 10:06:42 +02:00

30 lines
569 B
C++

/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/helpers/surface_formats.h"
#include "drm/i915_drm.h"
namespace NEO {
struct TilingModeHelper {
static TilingMode convert(uint32_t i915TilingMode) {
switch (i915TilingMode) {
case I915_TILING_X:
return TilingMode::TILE_X;
case I915_TILING_Y:
return TilingMode::TILE_Y;
case I915_TILING_NONE:
default:
return TilingMode::NON_TILED;
}
}
};
} // namespace NEO