Files
compute-runtime/opencl/source/mem_obj/image_xe2_and_later.inl
Maciej Plewka 46c345789d refactor: move depth limitation from release helper to image_hw
Related-To: NEO-8390, HSD-16021488507
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2024-11-21 11:24:06 +01:00

18 lines
541 B
C++

/*
* Copyright (C) 2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/mem_obj/image.h"
namespace NEO {
template <>
void ImageHw<Family>::adjustDepthLimitations(RENDER_SURFACE_STATE *surfaceState, uint32_t minArrayElement, uint32_t renderTargetViewExtent, uint32_t depth, uint32_t mipCount, bool is3DUavOrRtv) {
if (is3DUavOrRtv) {
auto newDepth = std::min(depth, (renderTargetViewExtent + minArrayElement) << mipCount);
surfaceState->setDepth(newDepth);
}
}
} // namespace NEO