mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Gmm utils separation
Change-Id: I9f2bdf249aa04b2ada216eee92771880202f5576
This commit is contained in:
@@ -336,8 +336,8 @@ set (RUNTIME_SRCS_INDIRECT_HEAP
|
||||
)
|
||||
|
||||
set (RUNTIME_SRCS_INSTRUMENTATION
|
||||
instrumentation${SKU_INFO_SRCS_DIR_SUFFIX}/instrumentation.cpp
|
||||
instrumentation${SKU_INFO_SRCS_DIR_SUFFIX}/instrumentation.h
|
||||
instrumentation${BRANCH_DIR_SUFFIX}/instrumentation.cpp
|
||||
instrumentation${BRANCH_DIR_SUFFIX}/instrumentation.h
|
||||
)
|
||||
|
||||
set (RUNTIME_SRCS_KERNEL
|
||||
@@ -374,6 +374,7 @@ set (RUNTIME_SRCS_GMM_HELPER
|
||||
gmm_helper/gmm_helper.h
|
||||
gmm_helper/gmm_lib.h
|
||||
gmm_helper/resource_info.h
|
||||
gmm_helper${BRANCH_DIR_SUFFIX}/gmm_utils.cpp
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
@@ -461,14 +462,14 @@ list (APPEND RUNTIME_SRCS_SCHEDULER
|
||||
set (RUNTIME_SRCS_SKU_INFO
|
||||
sku_info/sku_info_base.h
|
||||
sku_info/operations/sku_info_transfer.h
|
||||
sku_info/definitions${SKU_INFO_SRCS_DIR_SUFFIX}/sku_info.h
|
||||
sku_info/operations${SKU_INFO_SRCS_DIR_SUFFIX}/sku_info_transfer.cpp
|
||||
sku_info/definitions${BRANCH_DIR_SUFFIX}/sku_info.h
|
||||
sku_info/operations${BRANCH_DIR_SUFFIX}/sku_info_transfer.cpp
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND RUNTIME_SRCS_SKU_INFO
|
||||
sku_info/operations/sku_info_receiver.h
|
||||
sku_info/operations${SKU_INFO_SRCS_DIR_SUFFIX}/sku_info_receiver.cpp
|
||||
sku_info/operations${BRANCH_DIR_SUFFIX}/sku_info_receiver.cpp
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
@@ -176,14 +176,7 @@ void Gmm::queryImageParams(ImageInfo &imgInfo, const HardwareInfo &hwInfo) {
|
||||
this->resourceParams.Flags.Info.AllowVirtualPadding = true;
|
||||
}
|
||||
|
||||
if (hwInfo.capabilityTable.ftrCompression && imgInfo.preferRenderCompression && auxFormatSupported(this->resourceParams.Format)) {
|
||||
this->resourceParams.Flags.Info.Linear = 0;
|
||||
this->resourceParams.Flags.Info.TiledY = 1;
|
||||
this->resourceParams.Flags.Info.RenderCompressed = 1;
|
||||
this->resourceParams.Flags.Gpu.CCS = 1;
|
||||
this->resourceParams.Flags.Gpu.UnifiedAuxSurface = 1;
|
||||
this->isRenderCompressed = true;
|
||||
}
|
||||
applyAuxFlags(imgInfo, hwInfo);
|
||||
|
||||
this->gmmResourceInfo.reset(GmmResourceInfo::create(&this->resourceParams));
|
||||
|
||||
@@ -392,9 +385,4 @@ uint8_t Gmm::resourceCopyBlt(void *sys, void *gpu, uint32_t pitch, uint32_t heig
|
||||
|
||||
return this->gmmResourceInfo->cpuBlt(&gmmResourceCopyBLT);
|
||||
}
|
||||
|
||||
bool Gmm::auxFormatSupported(GMM_RESOURCE_FORMAT &gmmFormat) {
|
||||
const auto &formatInfo = pGmmGlobalContext->GetPlatformInfo().FormatTable[gmmFormat];
|
||||
return !!formatInfo.AuxL1eFormat;
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
@@ -82,7 +82,7 @@ class Gmm {
|
||||
uint32_t getRenderHAlignment();
|
||||
uint32_t getRenderVAlignment();
|
||||
static uint32_t getRenderAlignment(uint32_t alignment);
|
||||
bool auxFormatSupported(GMM_RESOURCE_FORMAT &gmmFormat);
|
||||
void applyAuxFlags(ImageInfo &imgInfo, const HardwareInfo &hwInfo);
|
||||
|
||||
uint32_t queryQPitch(GFXCORE_FAMILY gfxFamily, GMM_RESOURCE_TYPE resType);
|
||||
|
||||
|
||||
28
runtime/gmm_helper/gmm_utils.cpp
Normal file
28
runtime/gmm_helper/gmm_utils.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "runtime/gmm_helper/gmm_helper.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/helpers/surface_formats.h"
|
||||
|
||||
void OCLRT::Gmm::applyAuxFlags(ImageInfo &imgInfo, const HardwareInfo &hwInfo) {
|
||||
}
|
||||
Reference in New Issue
Block a user