mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
refactor: correct naming of enum class constants 10/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a6458433dc
commit
de93bc6928
@@ -35,7 +35,7 @@ BufferObjectHandleWrapper BufferObjectHandleWrapper::acquireSharedOwnership() {
|
||||
std::lock_guard lock{controlBlock->blockMutex};
|
||||
controlBlock->refCount++;
|
||||
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::Strong, controlBlock};
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::strong, controlBlock};
|
||||
}
|
||||
|
||||
BufferObjectHandleWrapper BufferObjectHandleWrapper::acquireWeakOwnership() {
|
||||
@@ -46,7 +46,7 @@ BufferObjectHandleWrapper BufferObjectHandleWrapper::acquireWeakOwnership() {
|
||||
std::lock_guard lock{controlBlock->blockMutex};
|
||||
controlBlock->weakRefCount++;
|
||||
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::Weak, controlBlock};
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::weak, controlBlock};
|
||||
}
|
||||
|
||||
BufferObjectHandleWrapper::~BufferObjectHandleWrapper() {
|
||||
@@ -56,7 +56,7 @@ BufferObjectHandleWrapper::~BufferObjectHandleWrapper() {
|
||||
|
||||
std::unique_lock lock{controlBlock->blockMutex};
|
||||
|
||||
if (ownership == Ownership::Strong) {
|
||||
if (ownership == Ownership::strong) {
|
||||
controlBlock->refCount--;
|
||||
} else {
|
||||
controlBlock->weakRefCount--;
|
||||
|
||||
@@ -40,8 +40,8 @@ class BufferObjectHandleWrapper {
|
||||
};
|
||||
|
||||
enum class Ownership : std::uint8_t {
|
||||
Weak = 0,
|
||||
Strong = 1,
|
||||
weak = 0,
|
||||
strong = 1,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -75,7 +75,7 @@ class BufferObjectHandleWrapper {
|
||||
: boHandle{boHandle}, ownership{ownership}, controlBlock{controlBlock} {}
|
||||
|
||||
int boHandle{};
|
||||
Ownership ownership{Ownership::Strong};
|
||||
Ownership ownership{Ownership::strong};
|
||||
ControlBlock *controlBlock{};
|
||||
};
|
||||
|
||||
|
||||
@@ -269,15 +269,15 @@ bool ProductHelperHw<gfxProduct>::allowCompression(const HardwareInfo &hwInfo) c
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
return LocalMemoryAccessMode::Default;
|
||||
return LocalMemoryAccessMode::defaultMode;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
switch (static_cast<LocalMemoryAccessMode>(debugManager.flags.ForceLocalMemoryAccessMode.get())) {
|
||||
case LocalMemoryAccessMode::Default:
|
||||
case LocalMemoryAccessMode::CpuAccessAllowed:
|
||||
case LocalMemoryAccessMode::CpuAccessDisallowed:
|
||||
case LocalMemoryAccessMode::defaultMode:
|
||||
case LocalMemoryAccessMode::cpuAccessAllowed:
|
||||
case LocalMemoryAccessMode::cpuAccessDisallowed:
|
||||
return static_cast<LocalMemoryAccessMode>(debugManager.flags.ForceLocalMemoryAccessMode.get());
|
||||
}
|
||||
return getDefaultLocalMemoryAccessMode(hwInfo);
|
||||
@@ -509,7 +509,7 @@ bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const RootDev
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
return allocation.isAllocatedInLocalMemoryPool() &&
|
||||
(productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed ||
|
||||
(productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::cpuAccessDisallowed ||
|
||||
!allocation.isAllocationLockable());
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ bool OsContextWin::isDirectSubmissionSupported() const {
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto isWSL = rootDeviceEnvironment.isWddmOnLinux();
|
||||
|
||||
return !isWSL && wddm.getWddmVersion() == WddmVersion::WDDM_2_0 && productHelper.isDirectSubmissionSupported(rootDeviceEnvironment.getReleaseHelper());
|
||||
return !isWSL && wddm.getWddmVersion() == WddmVersion::wddm20 && productHelper.isDirectSubmissionSupported(rootDeviceEnvironment.getReleaseHelper());
|
||||
}
|
||||
|
||||
OsContextWin::~OsContextWin() {
|
||||
|
||||
@@ -133,7 +133,7 @@ bool Wddm::init() {
|
||||
rootDeviceEnvironment.initGmm();
|
||||
this->rootDeviceEnvironment.getGmmClientContext()->setHandleAllocator(this->hwDeviceId->getUmKmDataTranslator()->createGmmHandleAllocator());
|
||||
|
||||
if (WddmVersion::WDDM_2_3 == getWddmVersion()) {
|
||||
if (WddmVersion::wddm23 == getWddmVersion()) {
|
||||
wddmInterface = std::make_unique<WddmInterface23>(*this);
|
||||
} else {
|
||||
wddmInterface = std::make_unique<WddmInterface20>(*this);
|
||||
@@ -1310,9 +1310,9 @@ void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
|
||||
|
||||
WddmVersion Wddm::getWddmVersion() {
|
||||
if (featureTable->flags.ftrWddmHwQueues) {
|
||||
return WddmVersion::WDDM_2_3;
|
||||
return WddmVersion::wddm23;
|
||||
} else {
|
||||
return WddmVersion::WDDM_2_0;
|
||||
return WddmVersion::wddm20;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -19,7 +19,7 @@ struct WddmSubmitArguments {
|
||||
};
|
||||
|
||||
enum class WddmVersion : uint32_t {
|
||||
WDDM_2_0 = 0,
|
||||
WDDM_2_3
|
||||
wddm20 = 0,
|
||||
wddm23
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user