mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
18 lines
541 B
Plaintext
18 lines
541 B
Plaintext
|
|
/*
|
||
|
|
* 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
|