mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Move AllocationType enum out of GraphicsAllocation class
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fd27098194
commit
4b0d986876
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,10 +11,10 @@
|
||||
namespace NEO {
|
||||
bool CompressionSelector::preferCompressedAllocation(const AllocationProperties &properties, const HardwareInfo &hwInfo) {
|
||||
switch (properties.allocationType) {
|
||||
case GraphicsAllocation::AllocationType::GLOBAL_SURFACE:
|
||||
case GraphicsAllocation::AllocationType::CONSTANT_SURFACE:
|
||||
case GraphicsAllocation::AllocationType::SVM_GPU:
|
||||
case GraphicsAllocation::AllocationType::PRINTF_SURFACE: {
|
||||
case AllocationType::GLOBAL_SURFACE:
|
||||
case AllocationType::CONSTANT_SURFACE:
|
||||
case AllocationType::SVM_GPU:
|
||||
case AllocationType::PRINTF_SURFACE: {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
return hwInfoConfig.allowStatelessCompression(hwInfo);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -55,7 +55,7 @@ void MigrationController::migrateMemory(Context &context, MemoryManager &memoryM
|
||||
} else {
|
||||
|
||||
auto srcCmdQ = context.getSpecialQueue(sourceRootDeviceIndex);
|
||||
if (srcMemory->getAllocationType() == GraphicsAllocation::AllocationType::IMAGE) {
|
||||
if (srcMemory->getAllocationType() == AllocationType::IMAGE) {
|
||||
auto pImage = static_cast<Image *>(memObj);
|
||||
size_t origin[3] = {};
|
||||
size_t region[3] = {};
|
||||
@@ -76,7 +76,7 @@ void MigrationController::migrateMemory(Context &context, MemoryManager &memoryM
|
||||
} else {
|
||||
|
||||
auto dstCmdQ = context.getSpecialQueue(targetRootDeviceIndex);
|
||||
if (dstMemory->getAllocationType() == GraphicsAllocation::AllocationType::IMAGE) {
|
||||
if (dstMemory->getAllocationType() == AllocationType::IMAGE) {
|
||||
auto pImage = static_cast<Image *>(memObj);
|
||||
size_t origin[3] = {};
|
||||
size_t region[3] = {};
|
||||
|
||||
Reference in New Issue
Block a user