mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Moved global functions to the ImageSurfaceStateHelper class, with declarations in the header file and definitions in the base .inl file. This change reduces compilation time by: - removing unnecessary includes from the header file - adding explicit template instantiations, which are faster than implicit template instantiations. Additionally, the image_skl_and_later.inl file has been removed as it is no longer needed, and its implementation has been moved to the base .inl Related-To: NEO-12149 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
32 lines
1.2 KiB
C++
32 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2020-2025 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
namespace NEO {
|
|
|
|
class Gmm;
|
|
struct SurfaceOffsets;
|
|
class GmmHelper;
|
|
struct ImageInfo;
|
|
|
|
template <typename GfxFamily>
|
|
class ImageSurfaceStateHelper {
|
|
public:
|
|
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
|
using SURFACE_TYPE = typename RENDER_SURFACE_STATE::SURFACE_TYPE;
|
|
|
|
static void setImageSurfaceState(RENDER_SURFACE_STATE *surfaceState, const ImageInfo &imageInfo, Gmm *gmm, GmmHelper &gmmHelper, uint32_t cubeFaceIndex, uint64_t gpuAddress, const SurfaceOffsets &surfaceOffsets, bool isNV12Format, uint32_t &minimumArrayElement, uint32_t &renderTargetViewExtent);
|
|
static void setImageSurfaceStateDimensions(RENDER_SURFACE_STATE *surfaceState, const ImageInfo &imageInfo, uint32_t cubeFaceIndex, SURFACE_TYPE surfaceType, uint32_t &depth);
|
|
static void setWidthForMediaBlockSurfaceState(RENDER_SURFACE_STATE *surfaceState, const ImageInfo &imageInfo);
|
|
static void setUnifiedAuxBaseAddress(RENDER_SURFACE_STATE *surfaceState, const Gmm *gmm);
|
|
static void setMipTailStartLOD(RENDER_SURFACE_STATE *surfaceState, Gmm *gmm);
|
|
};
|
|
} // namespace NEO
|