Files
compute-runtime/shared/source/image/image_tgllp_plus.inl
kamdiedrich e072275ae6 Reorganization directory structure [3/n]
Change-Id: If3dfa3f6007f8810a6a1ae1a4f0c7da38544648d
2020-02-23 23:48:28 +01:00

29 lines
1.2 KiB
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
template <>
void setClearColorParams<Family>(typename Family::RENDER_SURFACE_STATE *surfaceState, const Gmm *gmm) {
if (gmm->gmmResourceInfo->getResourceFlags()->Gpu.IndirectClearColor) {
surfaceState->setClearValueAddressEnable(true);
uint64_t clearColorAddress = GmmHelper::decanonize(surfaceState->getSurfaceBaseAddress() +
gmm->gmmResourceInfo->getUnifiedAuxSurfaceOffset(GMM_UNIFIED_AUX_TYPE::GMM_AUX_CC));
surfaceState->setClearColorAddress(static_cast<uint32_t>(clearColorAddress & 0xFFFFFFFFULL));
surfaceState->setClearColorAddressHigh(static_cast<uint32_t>(clearColorAddress >> 32));
}
}
template <>
void setFlagsForMediaCompression<Family>(typename Family::RENDER_SURFACE_STATE *surfaceState, Gmm *gmm) {
if (gmm->gmmResourceInfo->getResourceFlags()->Info.MediaCompressed) {
surfaceState->setAuxiliarySurfaceMode(Family::RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE);
surfaceState->setMemoryCompressionEnable(true);
} else {
surfaceState->setMemoryCompressionEnable(false);
}
}