diff --git a/level_zero/core/source/event/event.cpp b/level_zero/core/source/event/event.cpp index 389f2807b9..715a1f9ed0 100644 --- a/level_zero/core/source/event/event.cpp +++ b/level_zero/core/source/event/event.cpp @@ -355,8 +355,8 @@ ze_result_t Event::destroy() { } void Event::enableCounterBasedMode(bool apiRequest) { - if (counterBasedMode == CounterBasedMode::InitiallyDisabled) { - counterBasedMode = apiRequest ? CounterBasedMode::ExplicitlyEnabled : CounterBasedMode::ImplicitlyEnabled; + if (counterBasedMode == CounterBasedMode::initiallyDisabled) { + counterBasedMode = apiRequest ? CounterBasedMode::explicitlyEnabled : CounterBasedMode::implicitlyEnabled; } } @@ -365,8 +365,8 @@ void Event::disableImplicitCounterBasedMode() { return; } - if (counterBasedMode == CounterBasedMode::ImplicitlyEnabled || counterBasedMode == CounterBasedMode::InitiallyDisabled) { - counterBasedMode = CounterBasedMode::ImplicitlyDisabled; + if (counterBasedMode == CounterBasedMode::implicitlyEnabled || counterBasedMode == CounterBasedMode::initiallyDisabled) { + counterBasedMode = CounterBasedMode::implicitlyDisabled; unsetInOrderExecInfo(); } } diff --git a/level_zero/core/source/event/event.h b/level_zero/core/source/event/event.h index 27cc0b19f0..86ab53ece1 100644 --- a/level_zero/core/source/event/event.h +++ b/level_zero/core/source/event/event.h @@ -85,11 +85,11 @@ struct Event : _ze_event_handle_t { enum class CounterBasedMode : uint32_t { // For default flow (API) - InitiallyDisabled, - ExplicitlyEnabled, + initiallyDisabled, + explicitlyEnabled, // For internal convertion (Immediate CL) - ImplicitlyEnabled, - ImplicitlyDisabled + implicitlyEnabled, + implicitlyDisabled }; template @@ -239,8 +239,8 @@ struct Event : _ze_event_handle_t { this->metricNotification = metricNotification; } void updateInOrderExecState(std::shared_ptr &newInOrderExecInfo, uint64_t signalValue, uint32_t allocationOffset); - bool isCounterBased() const { return ((counterBasedMode == CounterBasedMode::ExplicitlyEnabled) || (counterBasedMode == CounterBasedMode::ImplicitlyEnabled)); } - bool isCounterBasedExplicitlyEnabled() const { return (counterBasedMode == CounterBasedMode::ExplicitlyEnabled); } + bool isCounterBased() const { return ((counterBasedMode == CounterBasedMode::explicitlyEnabled) || (counterBasedMode == CounterBasedMode::implicitlyEnabled)); } + bool isCounterBasedExplicitlyEnabled() const { return (counterBasedMode == CounterBasedMode::explicitlyEnabled); } void enableCounterBasedMode(bool apiRequest); void disableImplicitCounterBasedMode(); NEO::GraphicsAllocation *getInOrderExecDataAllocation() const; @@ -305,7 +305,7 @@ struct Event : _ze_event_handle_t { uint32_t kernelCount = 1u; uint32_t maxPacketCount = 0; uint32_t totalEventSize = 0; - CounterBasedMode counterBasedMode = CounterBasedMode::InitiallyDisabled; + CounterBasedMode counterBasedMode = CounterBasedMode::initiallyDisabled; ze_event_scope_flags_t signalScope = 0u; ze_event_scope_flags_t waitScope = 0u; diff --git a/level_zero/core/source/event/event_impl.inl b/level_zero/core/source/event/event_impl.inl index 85cea7749e..4cf5b7752c 100644 --- a/level_zero/core/source/event/event_impl.inl +++ b/level_zero/core/source/event/event_impl.inl @@ -540,7 +540,7 @@ ze_result_t EventImp::hostSynchronize(uint64_t timeout) { template ze_result_t EventImp::reset() { - if (this->counterBasedMode == CounterBasedMode::ExplicitlyEnabled) { + if (this->counterBasedMode == CounterBasedMode::explicitlyEnabled) { return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE; } diff --git a/level_zero/core/source/image/image_hw.inl b/level_zero/core/source/image/image_hw.inl index 4f840081c9..f5943b67e5 100644 --- a/level_zero/core/source/image/image_hw.inl +++ b/level_zero/core/source/image/image_hw.inl @@ -108,11 +108,11 @@ ze_result_t ImageCoreFamily::initialize(Device *device, const ze_ auto gmmHelper = static_cast(device->getNEODevice()->getRootDeviceEnvironment()).getGmmHelper(); if (gmm != nullptr) { - NEO::ImagePlane yuvPlaneType = NEO::ImagePlane::NO_PLANE; + NEO::ImagePlane yuvPlaneType = NEO::ImagePlane::noPlane; if (isImageView() && (sourceImageFormatDesc->format.layout == ZE_IMAGE_FORMAT_LAYOUT_NV12)) { - yuvPlaneType = NEO::ImagePlane::PLANE_Y; + yuvPlaneType = NEO::ImagePlane::planeY; if (imgInfo.plane == GMM_PLANE_U) { - yuvPlaneType = NEO::ImagePlane::PLANE_UV; + yuvPlaneType = NEO::ImagePlane::planeUV; } } gmm->updateImgInfoAndDesc(imgInfo, 0u, yuvPlaneType); diff --git a/level_zero/core/source/kernel/kernel_imp.h b/level_zero/core/source/kernel/kernel_imp.h index c481b555d5..12aa399215 100644 --- a/level_zero/core/source/kernel/kernel_imp.h +++ b/level_zero/core/source/kernel/kernel_imp.h @@ -139,11 +139,11 @@ struct KernelImp : Kernel { NEO::SlmPolicy getSlmPolicy() const override { if (cacheConfigFlags & ZE_CACHE_CONFIG_FLAG_LARGE_SLM) { - return NEO::SlmPolicy::SlmPolicyLargeSlm; + return NEO::SlmPolicy::slmPolicyLargeSlm; } else if (cacheConfigFlags & ZE_CACHE_CONFIG_FLAG_LARGE_DATA) { - return NEO::SlmPolicy::SlmPolicyLargeData; + return NEO::SlmPolicy::slmPolicyLargeData; } else { - return NEO::SlmPolicy::SlmPolicyNone; + return NEO::SlmPolicy::slmPolicyNone; } } diff --git a/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h b/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h index 190e91e159..0ea7697e29 100644 --- a/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/in_order_cmd_list_fixture.h @@ -32,11 +32,11 @@ struct InOrderCmdListFixture : public ::Test { using EventImp::signalScope; void makeCounterBasedInitiallyDisabled() { - counterBasedMode = CounterBasedMode::InitiallyDisabled; + counterBasedMode = CounterBasedMode::initiallyDisabled; } void makeCounterBasedImplicitlyDisabled() { - counterBasedMode = CounterBasedMode::ImplicitlyDisabled; + counterBasedMode = CounterBasedMode::implicitlyDisabled; } }; @@ -76,7 +76,7 @@ struct InOrderCmdListFixture : public ::Test { for (uint32_t i = 0; i < numEvents; i++) { eventDesc.index = i; events.emplace_back(DestroyableZeUniquePtr(static_cast(Event::create(eventPool.get(), &eventDesc, device)))); - EXPECT_EQ(Event::CounterBasedMode::ExplicitlyEnabled, events.back()->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::explicitlyEnabled, events.back()->counterBasedMode); EXPECT_TRUE(events.back()->isCounterBased()); } diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp index eb960fd4f6..3879a86a25 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp @@ -836,10 +836,10 @@ HWTEST2_F(InOrderCmdListTests, givenIpcPoolEventWhenTryingToImplicitlyConverToCo eventDesc.signal = ZE_EVENT_SCOPE_FLAG_HOST; DestroyableZeUniquePtr event0(static_cast(Event::create(eventPoolForExport.get(), &eventDesc, device))); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, event0->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, event0->counterBasedMode); DestroyableZeUniquePtr event1(static_cast(Event::create(eventPoolImported.get(), &eventDesc, device))); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, event1->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, event1->counterBasedMode); } HWTEST2_F(InOrderCmdListTests, givenNotSignaledInOrderWhenWhenCallingQueryStatusThenReturnNotReady, IsAtLeastSkl) { @@ -1409,47 +1409,47 @@ HWTEST2_F(InOrderCmdListTests, givenImplicitEventConvertionEnabledWhenUsingImmed events[2]->makeCounterBasedInitiallyDisabled(); immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::InitiallyDisabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::initiallyDisabled, events[0]->counterBasedMode); EXPECT_FALSE(events[0]->isCounterBased()); regularCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[1]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::InitiallyDisabled, events[1]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::initiallyDisabled, events[1]->counterBasedMode); EXPECT_FALSE(events[1]->isCounterBased()); debugManager.flags.EnableImplicitConvertionToCounterBasedEvents.set(-1); immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); EXPECT_TRUE(events[0]->isCounterBased()); regularCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[1]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, events[1]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, events[1]->counterBasedMode); EXPECT_FALSE(events[1]->isCounterBased()); outOfOrderImmCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[2]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, events[2]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, events[2]->counterBasedMode); EXPECT_FALSE(events[2]->isCounterBased()); // Reuse on Regular = disable regularCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, events[0]->counterBasedMode); EXPECT_FALSE(events[0]->isCounterBased()); // Reuse on non-inOrder = disable - events[0]->counterBasedMode = Event::CounterBasedMode::ImplicitlyEnabled; + events[0]->counterBasedMode = Event::CounterBasedMode::implicitlyEnabled; regularCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, events[0]->counterBasedMode); EXPECT_FALSE(events[0]->isCounterBased()); // Reuse on already disabled immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, events[0]->counterBasedMode); EXPECT_FALSE(events[0]->isCounterBased()); // On explicitly enabled - events[0]->counterBasedMode = Event::CounterBasedMode::ExplicitlyEnabled; + events[0]->counterBasedMode = Event::CounterBasedMode::explicitlyEnabled; immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ExplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::explicitlyEnabled, events[0]->counterBasedMode); EXPECT_TRUE(events[0]->isCounterBased()); } @@ -1461,7 +1461,7 @@ HWTEST2_F(InOrderCmdListTests, givenImplicitEventConvertionEnabledWhenUsingAppen events[0]->enableCounterBasedMode(false); immCmdList->appendEventReset(events[0]->toHandle()); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyDisabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyDisabled, events[0]->counterBasedMode); } HWTEST2_F(InOrderCmdListTests, givenImplicitEventConvertionEnabledWhenCallingAppendThenHandleInOrderExecInfo, IsAtLeastSkl) { @@ -1593,55 +1593,55 @@ HWTEST2_F(InOrderCmdListTests, givenImmediateCmdListWhenDispatchingWithRegularEv events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, eventHandle, 0, nullptr, launchParams, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendLaunchCooperativeKernel(kernel->toHandle(), groupCount, eventHandle, 0, nullptr, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendLaunchKernelIndirect(kernel->toHandle(), *static_cast(alloc), eventHandle, 0, nullptr, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); size_t rangeSizes = 1; const void **ranges = reinterpret_cast(©Data[0]); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendMemoryRangesBarrier(1, &rangeSizes, ranges, eventHandle, 0, nullptr); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); copyOnlyCmdList->appendMemoryCopyBlitRegion(&allocationData, &allocationData, region, region, {0, 0, 0}, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}, events[0].get(), 0, nullptr, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendMemoryCopy(©Data, ©Data, 1, eventHandle, 0, nullptr, false, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendMemoryFill(alloc, ©Data, 1, 16, eventHandle, 0, nullptr, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); copyOnlyCmdList->appendBlitFill(alloc, ©Data, 1, 16, events[0].get(), 0, nullptr, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendSignalEvent(eventHandle); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendWriteGlobalTimestamp(reinterpret_cast(copyData), eventHandle, 0, nullptr); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendBarrier(eventHandle, 0, nullptr, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); zex_wait_on_mem_desc_t desc; desc.actionFlag = ZEX_WAIT_ON_MEMORY_FLAG_NOT_EQUAL; events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendWaitOnMemory(reinterpret_cast(&desc), copyData, 1, eventHandle, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); auto hostAddress = static_cast(immCmdList->inOrderExecInfo->getDeviceCounterAllocation().getUnderlyingBuffer()); *hostAddress = immCmdList->inOrderExecInfo->getCounterValue(); @@ -1649,7 +1649,7 @@ HWTEST2_F(InOrderCmdListTests, givenImmediateCmdListWhenDispatchingWithRegularEv immCmdList->copyThroughLockedPtrEnabled = true; events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendMemoryCopy(alloc, ©Data, 1, eventHandle, 0, nullptr, false, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); context->freeMem(alloc); } @@ -5094,7 +5094,7 @@ HWTEST2_F(BcsSplitInOrderCmdListTests, givenImmediateCmdListWhenDispatchingWithR events[0]->makeCounterBasedInitiallyDisabled(); immCmdList->appendMemoryCopy(©Data, ©Data, copySize, eventHandle, 0, nullptr, false, false); - EXPECT_EQ(Event::CounterBasedMode::ImplicitlyEnabled, events[0]->counterBasedMode); + EXPECT_EQ(Event::CounterBasedMode::implicitlyEnabled, events[0]->counterBasedMode); EXPECT_TRUE(verifySplit(1)); } diff --git a/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp b/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp index 4f136fab07..564938ae3f 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/linux/test_l0_debugger_linux.cpp @@ -294,12 +294,12 @@ TEST_F(L0DebuggerLinuxTest, givenAllocationsWhenAttachingZebinModuleThenAllAlloc kernelAllocs.push_back(&isaAllocation2); drmMock->registeredDataSize = 0; - drmMock->registeredClass = NEO::DrmResourceClass::MaxSize; + drmMock->registeredClass = NEO::DrmResourceClass::maxSize; EXPECT_TRUE(device->getL0Debugger()->attachZebinModuleToSegmentAllocations(kernelAllocs, handle, elfHandle)); EXPECT_EQ(sizeof(uint32_t), drmMock->registeredDataSize); - EXPECT_EQ(NEO::DrmResourceClass::L0ZebinModule, drmMock->registeredClass); + EXPECT_EQ(NEO::DrmResourceClass::l0ZebinModule, drmMock->registeredClass); const auto containsModuleHandle = [handle](const auto &bufferObject) { const auto &bindExtHandles = bufferObject.getBindExtHandles(); @@ -334,7 +334,7 @@ TEST_F(L0DebuggerLinuxTest, givenModuleAllocationsWhenAttachingZebinModuleThenBo kernelAllocs.push_back(&isaAllocation2); drmMock->registeredDataSize = 0; - drmMock->registeredClass = NEO::DrmResourceClass::MaxSize; + drmMock->registeredClass = NEO::DrmResourceClass::maxSize; EXPECT_TRUE(device->getL0Debugger()->attachZebinModuleToSegmentAllocations(kernelAllocs, handle, elfHandle)); diff --git a/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp b/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp index 7cb6c87889..872a033b3b 100644 --- a/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp +++ b/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp @@ -1878,17 +1878,17 @@ TEST_F(KernelPropertiesTests, givenValidKernelAndNollocateStatelessPrivateSurfac } TEST_F(KernelPropertiesTests, givenValidKernelAndLargeSlmIsSetThenForceLargeSlmIsTrue) { - EXPECT_EQ(NEO::SlmPolicy::SlmPolicyNone, kernel->getSlmPolicy()); + EXPECT_EQ(NEO::SlmPolicy::slmPolicyNone, kernel->getSlmPolicy()); ze_result_t res = kernel->setCacheConfig(ZE_CACHE_CONFIG_FLAG_LARGE_SLM); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_EQ(NEO::SlmPolicy::SlmPolicyLargeSlm, kernel->getSlmPolicy()); + EXPECT_EQ(NEO::SlmPolicy::slmPolicyLargeSlm, kernel->getSlmPolicy()); } TEST_F(KernelPropertiesTests, givenValidKernelAndLargeDataIsSetThenForceLargeDataIsTrue) { - EXPECT_EQ(NEO::SlmPolicy::SlmPolicyNone, kernel->getSlmPolicy()); + EXPECT_EQ(NEO::SlmPolicy::slmPolicyNone, kernel->getSlmPolicy()); ze_result_t res = kernel->setCacheConfig(ZE_CACHE_CONFIG_FLAG_LARGE_DATA); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - EXPECT_EQ(NEO::SlmPolicy::SlmPolicyLargeData, kernel->getSlmPolicy()); + EXPECT_EQ(NEO::SlmPolicy::slmPolicyLargeData, kernel->getSlmPolicy()); } TEST_F(KernelPropertiesTests, WhenGetExtensionIsCalledWithUnknownExtensionTypeThenReturnNullptr) { diff --git a/level_zero/tools/source/debug/linux/prelim/debug_session.cpp b/level_zero/tools/source/debug/linux/prelim/debug_session.cpp index 24a134cdc2..73aa0fa708 100644 --- a/level_zero/tools/source/debug/linux/prelim/debug_session.cpp +++ b/level_zero/tools/source/debug/linux/prelim/debug_session.cpp @@ -466,7 +466,7 @@ void DebugSessionLinuxi915::handleEvent(prelim_drm_i915_debug_event *event) { bool destroy = event->flags & PRELIM_DRM_I915_DEBUG_EVENT_DESTROY; bool create = event->flags & PRELIM_DRM_I915_DEBUG_EVENT_CREATE; - if (destroy && clientHandleToConnection[uuid->client_handle]->uuidMap[uuid->handle].classIndex == NEO::DrmResourceClass::L0ZebinModule) { + if (destroy && clientHandleToConnection[uuid->client_handle]->uuidMap[uuid->handle].classIndex == NEO::DrmResourceClass::l0ZebinModule) { DEBUG_BREAK_IF(clientHandleToConnection[uuid->client_handle]->uuidToModule[uuid->handle].segmentVmBindCounter[0] != 0 || clientHandleToConnection[uuid->client_handle]->uuidToModule[uuid->handle].loadAddresses[0].size() > 0); @@ -510,7 +510,7 @@ void DebugSessionLinuxi915::handleEvent(prelim_drm_i915_debug_event *event) { if (ret == 0) { std::string uuidString = std::string(readUuid.uuid, 36); - uint32_t classIndex = static_cast(NEO::DrmResourceClass::MaxSize); + uint32_t classIndex = static_cast(NEO::DrmResourceClass::maxSize); auto validClassUuid = NEO::DrmUuid::getClassUuidIndex(uuidString, classIndex); if (uuidString == NEO::uuidL0CommandQueueHash) { @@ -551,19 +551,19 @@ void DebugSessionLinuxi915::handleEvent(prelim_drm_i915_debug_event *event) { uuidData.handle = uuid->handle; uuidData.data = std::move(payload); uuidData.dataSize = uuid->payload_size; - uuidData.classIndex = NEO::DrmResourceClass::MaxSize; + uuidData.classIndex = NEO::DrmResourceClass::maxSize; const auto indexIt = connection->classHandleToIndex.find(uuid->class_handle); if (indexIt != connection->classHandleToIndex.end()) { uuidData.classIndex = static_cast(indexIt->second.second); } - if (uuidData.classIndex == NEO::DrmResourceClass::Elf) { + if (uuidData.classIndex == NEO::DrmResourceClass::elf) { auto cpuVa = extractVaFromUuidString(uuidString); uuidData.ptr = cpuVa; } - if (uuidData.classIndex == NEO::DrmResourceClass::L0ZebinModule) { + if (uuidData.classIndex == NEO::DrmResourceClass::l0ZebinModule) { uint64_t handle = uuid->handle; auto &newModule = connection->uuidToModule[handle]; @@ -772,7 +772,7 @@ bool DebugSessionLinuxi915::handleVmBindEvent(prelim_drm_i915_debug_event_vm_bin if (connection->vmToTile.find(vmHandle) == connection->vmToTile.end()) { DEBUG_BREAK_IF(connection->vmToTile.find(vmHandle) == connection->vmToTile.end() && (vmBind->base.flags & PRELIM_DRM_I915_DEBUG_EVENT_NEED_ACK) && - (connection->uuidMap[uuid].classIndex == NEO::DrmResourceClass::Isa || connection->uuidMap[uuid].classIndex == NEO::DrmResourceClass::ModuleHeapDebugArea)); + (connection->uuidMap[uuid].classIndex == NEO::DrmResourceClass::isa || connection->uuidMap[uuid].classIndex == NEO::DrmResourceClass::moduleHeapDebugArea)); return false; } @@ -787,24 +787,24 @@ bool DebugSessionLinuxi915::handleVmBindEvent(prelim_drm_i915_debug_event_vm_bin std::lock_guard lock(asyncThreadMutex); if (connection->classHandleToIndex[classUuid].second == - static_cast(NEO::DrmResourceClass::SbaTrackingBuffer)) { + static_cast(NEO::DrmResourceClass::sbaTrackingBuffer)) { connection->vmToStateBaseAreaBindInfo[vmHandle] = {vmBind->va_start, vmBind->va_length}; } if (connection->classHandleToIndex[classUuid].second == - static_cast(NEO::DrmResourceClass::ModuleHeapDebugArea)) { + static_cast(NEO::DrmResourceClass::moduleHeapDebugArea)) { connection->vmToModuleDebugAreaBindInfo[vmHandle] = {vmBind->va_start, vmBind->va_length}; } if (connection->classHandleToIndex[classUuid].second == - static_cast(NEO::DrmResourceClass::ContextSaveArea)) { + static_cast(NEO::DrmResourceClass::contextSaveArea)) { connection->vmToContextStateSaveAreaBindInfo[vmHandle] = {vmBind->va_start, vmBind->va_length}; } } bool handleEvent = isTileWithinDeviceBitfield(tileIndex); - if (handleEvent && connection->uuidMap[uuid].classIndex == NEO::DrmResourceClass::Isa) { + if (handleEvent && connection->uuidMap[uuid].classIndex == NEO::DrmResourceClass::isa) { uint32_t deviceBitfield = 0; memcpy_s(&deviceBitfield, sizeof(uint32_t), connection->uuidMap[uuid].data.get(), connection->uuidMap[uuid].dataSize); @@ -819,7 +819,7 @@ bool DebugSessionLinuxi915::handleVmBindEvent(prelim_drm_i915_debug_event_vm_bin bool allInstancesEventsReceived = true; for (uint32_t uuidIter = 1; uuidIter < vmBind->num_uuids; uuidIter++) { - if (connection->uuidMap[vmBind->uuids[uuidIter]].classIndex == NEO::DrmResourceClass::L0ZebinModule) { + if (connection->uuidMap[vmBind->uuids[uuidIter]].classIndex == NEO::DrmResourceClass::l0ZebinModule) { perKernelModules = false; moduleUUIDindex = static_cast(uuidIter); PRINT_DEBUGGER_INFO_LOG("Zebin module uuid = %ull", (uint64_t)vmBind->uuids[uuidIter]); @@ -846,7 +846,7 @@ bool DebugSessionLinuxi915::handleVmBindEvent(prelim_drm_i915_debug_event_vm_bin isa->deviceBitfield = devices; for (index = 1; index < vmBind->num_uuids; index++) { - if (connection->uuidMap[vmBind->uuids[index]].classIndex == NEO::DrmResourceClass::Elf) { + if (connection->uuidMap[vmBind->uuids[index]].classIndex == NEO::DrmResourceClass::elf) { isa->elfUuidHandle = vmBind->uuids[index]; if (!perKernelModules) { @@ -980,7 +980,7 @@ bool DebugSessionLinuxi915::handleVmBindEvent(prelim_drm_i915_debug_event_vm_bin if (handleEvent) { for (uint32_t uuidIter = 0; uuidIter < vmBind->num_uuids; uuidIter++) { - if (connection->uuidMap[vmBind->uuids[uuidIter]].classIndex == NEO::DrmResourceClass::L0ZebinModule) { + if (connection->uuidMap[vmBind->uuids[uuidIter]].classIndex == NEO::DrmResourceClass::l0ZebinModule) { uint64_t loadAddress = 0; auto &module = connection->uuidToModule[vmBind->uuids[uuidIter]]; auto moduleUsedOnTile = module.deviceBitfield.test(tileIndex) || module.deviceBitfield.count() == 0; @@ -1398,27 +1398,27 @@ void DebugSessionLinuxi915::handleEnginesEvent(prelim_drm_i915_debug_event_engin } void DebugSessionLinuxi915::extractUuidData(uint64_t client, const UuidData &uuidData) { - if (uuidData.classIndex == NEO::DrmResourceClass::SbaTrackingBuffer || - uuidData.classIndex == NEO::DrmResourceClass::ModuleHeapDebugArea || - uuidData.classIndex == NEO::DrmResourceClass::ContextSaveArea) { + if (uuidData.classIndex == NEO::DrmResourceClass::sbaTrackingBuffer || + uuidData.classIndex == NEO::DrmResourceClass::moduleHeapDebugArea || + uuidData.classIndex == NEO::DrmResourceClass::contextSaveArea) { UNRECOVERABLE_IF(uuidData.dataSize != 8); uint64_t *data = (uint64_t *)uuidData.data.get(); - if (uuidData.classIndex == NEO::DrmResourceClass::SbaTrackingBuffer) { + if (uuidData.classIndex == NEO::DrmResourceClass::sbaTrackingBuffer) { clientHandleToConnection[client]->stateBaseAreaGpuVa = *data; PRINT_DEBUGGER_INFO_LOG("SbaTrackingBuffer GPU VA = %p", (void *)clientHandleToConnection[clientHandle]->stateBaseAreaGpuVa); } - if (uuidData.classIndex == NEO::DrmResourceClass::ModuleHeapDebugArea) { + if (uuidData.classIndex == NEO::DrmResourceClass::moduleHeapDebugArea) { clientHandleToConnection[client]->moduleDebugAreaGpuVa = *data; PRINT_DEBUGGER_INFO_LOG("ModuleHeapDebugArea GPU VA = %p", (void *)clientHandleToConnection[clientHandle]->moduleDebugAreaGpuVa); } - if (uuidData.classIndex == NEO::DrmResourceClass::ContextSaveArea) { + if (uuidData.classIndex == NEO::DrmResourceClass::contextSaveArea) { clientHandleToConnection[client]->contextStateSaveAreaGpuVa = *data; PRINT_DEBUGGER_INFO_LOG("ContextSaveArea GPU VA = %p", (void *)clientHandleToConnection[clientHandle]->contextStateSaveAreaGpuVa); } } - if (uuidData.classIndex == NEO::DrmResourceClass::L0ZebinModule) { + if (uuidData.classIndex == NEO::DrmResourceClass::l0ZebinModule) { uint32_t segmentCount = 0; memcpy_s(&segmentCount, sizeof(uint32_t), uuidData.data.get(), uuidData.dataSize); clientHandleToConnection[client]->uuidToModule[uuidData.handle].segmentCount = segmentCount; diff --git a/level_zero/tools/source/debug/linux/prelim/debug_session.h b/level_zero/tools/source/debug/linux/prelim/debug_session.h index 7d801e1eb1..fcb39a628f 100644 --- a/level_zero/tools/source/debug/linux/prelim/debug_session.h +++ b/level_zero/tools/source/debug/linux/prelim/debug_session.h @@ -81,7 +81,7 @@ struct DebugSessionLinuxi915 : DebugSessionLinux { struct UuidData { uint64_t handle = 0; uint64_t classHandle = 0; - NEO::DrmResourceClass classIndex = NEO::DrmResourceClass::MaxSize; + NEO::DrmResourceClass classIndex = NEO::DrmResourceClass::maxSize; std::unique_ptr data; size_t dataSize = 0; diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h index 62ccd96a3e..fa12b44e6a 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h @@ -698,16 +698,16 @@ struct DebugApiLinuxMultiDeviceFixture : public MultipleDevicesWithCustomHwInfo struct MockDebugSessionLinuxi915Helper { void setupSessionClassHandlesAndUuidMap(MockDebugSessionLinuxi915 *session) { - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[sbaClassHandle] = {"SBA AREA", static_cast(NEO::DrmResourceClass::SbaTrackingBuffer)}; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[moduleDebugClassHandle] = {"DEBUG AREA", static_cast(NEO::DrmResourceClass::ModuleHeapDebugArea)}; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[contextSaveClassHandle] = {"CONTEXT SAVE AREA", static_cast(NEO::DrmResourceClass::ContextSaveArea)}; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[isaClassHandle] = {"ISA", static_cast(NEO::DrmResourceClass::Isa)}; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[elfClassHandle] = {"ELF", static_cast(NEO::DrmResourceClass::Elf)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[sbaClassHandle] = {"SBA AREA", static_cast(NEO::DrmResourceClass::sbaTrackingBuffer)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[moduleDebugClassHandle] = {"DEBUG AREA", static_cast(NEO::DrmResourceClass::moduleHeapDebugArea)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[contextSaveClassHandle] = {"CONTEXT SAVE AREA", static_cast(NEO::DrmResourceClass::contextSaveArea)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[isaClassHandle] = {"ISA", static_cast(NEO::DrmResourceClass::isa)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[elfClassHandle] = {"ELF", static_cast(NEO::DrmResourceClass::elf)}; DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(4), .dataSize = 4}; DeviceBitfield bitfield; @@ -717,7 +717,7 @@ struct MockDebugSessionLinuxi915Helper { DebugSessionLinuxi915::UuidData elfUuidData = { .handle = elfUUID, .classHandle = elfClassHandle, - .classIndex = NEO::DrmResourceClass::Elf, + .classIndex = NEO::DrmResourceClass::elf, .data = std::make_unique(elfSize), .dataSize = elfSize}; memcpy(elfUuidData.data.get(), "ELF", sizeof("ELF")); @@ -725,26 +725,26 @@ struct MockDebugSessionLinuxi915Helper { DebugSessionLinuxi915::UuidData cookieUuidData = { .handle = cookieUUID, .classHandle = isaUUID, - .classIndex = NEO::DrmResourceClass::MaxSize, + .classIndex = NEO::DrmResourceClass::maxSize, }; DebugSessionLinuxi915::UuidData sbaUuidData = { .handle = sbaUUID, .classHandle = sbaClassHandle, - .classIndex = NEO::DrmResourceClass::SbaTrackingBuffer, + .classIndex = NEO::DrmResourceClass::sbaTrackingBuffer, .data = nullptr, .dataSize = 0}; DebugSessionLinuxi915::UuidData debugAreaUuidData = { .handle = debugAreaUUID, .classHandle = moduleDebugClassHandle, - .classIndex = NEO::DrmResourceClass::ModuleHeapDebugArea, + .classIndex = NEO::DrmResourceClass::moduleHeapDebugArea, .data = nullptr, .dataSize = 0}; DebugSessionLinuxi915::UuidData stateSaveUuidData = { .handle = stateSaveUUID, .classHandle = contextSaveClassHandle, - .classIndex = NEO::DrmResourceClass::ContextSaveArea, + .classIndex = NEO::DrmResourceClass::contextSaveArea, .data = nullptr, .dataSize = 0}; @@ -758,12 +758,12 @@ struct MockDebugSessionLinuxi915Helper { DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(kernelCount)), .dataSize = sizeof(kernelCount)}; memcpy(zebinModuleUuidData.data.get(), &kernelCount, sizeof(kernelCount)); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(zebinModuleUUID, std::move(zebinModuleUuidData)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidToModule[zebinModuleUUID].segmentCount = 2; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[elfUUID].ptr = elfVa; @@ -834,7 +834,7 @@ struct MockDebugSessionLinuxi915Helper { DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID1, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(kernelCount)), .dataSize = sizeof(kernelCount)}; diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp index ad28c0dc70..904fbc7da4 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp @@ -3255,7 +3255,7 @@ TEST_F(DebugApiLinuxTest, GivenUuidEventWithPayloadWhenHandlingEventThenReadEven handler->returnUuid = &readUuidElf; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[2] = {"ELF", static_cast(NEO::DrmResourceClass::Elf)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[2] = {"ELF", static_cast(NEO::DrmResourceClass::elf)}; session->handleEvent(&uuidElf.base); @@ -3334,7 +3334,7 @@ TEST_F(DebugApiLinuxTest, GivenUuidEventForL0ZebinModuleWhenHandlingEventThenKer handler->returnUuid = &readUuidElf; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[2] = {"L0_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[2] = {"L0_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->handleEvent(&l0ModuleUuid.base); @@ -3418,7 +3418,7 @@ TEST_F(DebugApiLinuxTest, GivenVmBindEventWithUnknownUUIDWhenHandlingEventThenEv DebugSessionLinuxi915::UuidData sbaUuidData = { .handle = sbaHandle, .classHandle = sbaClassHandle, - .classIndex = NEO::DrmResourceClass::SbaTrackingBuffer}; + .classIndex = NEO::DrmResourceClass::sbaTrackingBuffer}; uint64_t vmBindSbaData[sizeof(prelim_drm_i915_debug_event_vm_bind) / sizeof(uint64_t) + sizeof(typeOfUUID)]; prelim_drm_i915_debug_event_vm_bind *vmBindSba = reinterpret_cast(&vmBindSbaData); @@ -3461,7 +3461,7 @@ TEST_F(DebugApiLinuxTest, GivenVmBindEventWithUuidOfUnknownClassWhenHandlingEven DebugSessionLinuxi915::UuidData sbaUuidData = { .handle = sbaHandle, .classHandle = sbaClassHandle, - .classIndex = NEO::DrmResourceClass::SbaTrackingBuffer}; + .classIndex = NEO::DrmResourceClass::sbaTrackingBuffer}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(sbaHandle, std::move(sbaUuidData)); @@ -3506,9 +3506,9 @@ TEST_F(DebugApiLinuxTest, GivenUuidEventOfKnownClassWhenHandlingEventThenGpuAddr uint64_t sbaAddress = 0x1234000; uint64_t moduleDebugAddress = 0x34567000; uint64_t contextSaveAddress = 0x56789000; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[sbaClassHandle] = {"SBA AREA", static_cast(NEO::DrmResourceClass::SbaTrackingBuffer)}; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[moduleDebugClassHandle] = {"DEBUG AREA", static_cast(NEO::DrmResourceClass::ModuleHeapDebugArea)}; - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[contextSaveClassHandle] = {"CONTEXT SAVE AREA", static_cast(NEO::DrmResourceClass::ContextSaveArea)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[sbaClassHandle] = {"SBA AREA", static_cast(NEO::DrmResourceClass::sbaTrackingBuffer)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[moduleDebugClassHandle] = {"DEBUG AREA", static_cast(NEO::DrmResourceClass::moduleHeapDebugArea)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[contextSaveClassHandle] = {"CONTEXT SAVE AREA", static_cast(NEO::DrmResourceClass::contextSaveArea)}; prelim_drm_i915_debug_event_uuid uuidSba = {}; uuidSba.base.type = PRELIM_DRM_I915_DEBUG_EVENT_UUID; @@ -3969,7 +3969,7 @@ TEST_F(DebugApiLinuxVmBindTest, GivenNoIsaUUIDAndZebinModuleForDataSegmentWhenHa DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(1)), .dataSize = sizeof(1)}; @@ -4482,13 +4482,13 @@ TEST_F(DebugApiLinuxVmBindTest, GivenEventWithL0ZebinModuleWhenHandlingEventThen DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(kernelCount)), .dataSize = sizeof(kernelCount)}; memcpy(zebinModuleUuidData.data.get(), &kernelCount, sizeof(kernelCount)); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(zebinModuleUUID, std::move(zebinModuleUuidData)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidToModule[zebinModuleUUID].segmentCount = 2; @@ -4605,13 +4605,13 @@ TEST_F(DebugApiLinuxVmBindTest, GivenAttachAfterModuleCreateWhenHandlingEventWit DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(kernelCount)), .dataSize = sizeof(kernelCount)}; memcpy(zebinModuleUuidData.data.get(), &kernelCount, sizeof(kernelCount)); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(zebinModuleUUID, std::move(zebinModuleUuidData)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidToModule[zebinModuleUUID].segmentCount = 2; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[elfUUID].ptr = 0x1000; @@ -4721,13 +4721,13 @@ TEST_F(DebugApiLinuxVmBindTest, GivenMultipleSegmentsInL0ZebinModuleWhenLoadAddr DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(segmentCount)), .dataSize = sizeof(segmentCount)}; memcpy(zebinModuleUuidData.data.get(), &segmentCount, sizeof(segmentCount)); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(zebinModuleUUID, std::move(zebinModuleUuidData)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidToModule[zebinModuleUUID].segmentCount = segmentCount; @@ -4776,13 +4776,13 @@ TEST_F(DebugApiLinuxVmBindTest, GivenMultipleSegmentsInL0ZebinModuleWhenLoadAddr DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(segmentCount)), .dataSize = sizeof(segmentCount)}; memcpy(zebinModuleUuidData.data.get(), &segmentCount, sizeof(segmentCount)); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(zebinModuleUUID, std::move(zebinModuleUuidData)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidToModule[zebinModuleUUID].segmentCount = segmentCount; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[elfUUID].ptr = 0x1000; @@ -4829,13 +4829,13 @@ TEST_F(DebugApiLinuxVmBindTest, GivenMultipleBindEventsWithZebinModuleWhenHandli DebugSessionLinuxi915::UuidData zebinModuleUuidData = { .handle = zebinModuleUUID, .classHandle = zebinModuleClassHandle, - .classIndex = NEO::DrmResourceClass::L0ZebinModule, + .classIndex = NEO::DrmResourceClass::l0ZebinModule, .data = std::make_unique(sizeof(kernelCount)), .dataSize = sizeof(kernelCount)}; memcpy(zebinModuleUuidData.data.get(), &kernelCount, sizeof(kernelCount)); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::L0ZebinModule)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[zebinModuleClassHandle] = {"L0_ZEBIN_MODULE", static_cast(NEO::DrmResourceClass::l0ZebinModule)}; session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap.emplace(zebinModuleUUID, std::move(zebinModuleUuidData)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidToModule[zebinModuleUUID].segmentCount = 1; @@ -6861,13 +6861,13 @@ TEST_F(DebugApiLinuxAsyncThreadTest, GivenOutOfOrderEventsForIsaWithoutAckNeeded DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; memcpy_s(isaUuidData.data.get(), sizeof(devices), &devices, sizeof(devices)); session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->uuidMap[isaUUID] = std::move(isaUuidData); - session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[isaClassHandle] = {"ISA", static_cast(NEO::DrmResourceClass::Isa)}; + session->clientHandleToConnection[MockDebugSessionLinuxi915::mockClientHandle]->classHandleToIndex[isaClassHandle] = {"ISA", static_cast(NEO::DrmResourceClass::isa)}; uint64_t vmBindIsaData[sizeof(prelim_drm_i915_debug_event_vm_bind) / sizeof(uint64_t) + 3 * sizeof(typeOfUUID)]; prelim_drm_i915_debug_event_vm_bind *vmBindIsa = reinterpret_cast(&vmBindIsaData); @@ -7939,7 +7939,7 @@ struct DebugApiLinuxMultiDeviceVmBindFixture : public DebugApiLinuxMultiDeviceFi DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8002,7 +8002,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaWhenHandlingVmBi DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8038,7 +8038,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaWhenHandlingVmBi DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8084,7 +8084,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaAndZebinModuleWh DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8137,7 +8137,7 @@ TEST_F(DebugLinuxMultiDeviceVmBindBlockOnFenceTest, givenTileInstancedIsaAndZebi DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8184,7 +8184,7 @@ TEST_F(DebugLinuxMultiDeviceVmBindBlockOnFenceTest, givenTileInstancedIsaAndZebi DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8228,7 +8228,7 @@ TEST_F(DebugLinuxMultiDeviceVmBindBlockOnFenceTest, givenTileInstancedIsaAndZebi DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8269,7 +8269,7 @@ TEST_F(DebugLinuxMultiDeviceVmBindBlockOnFenceTest, givenZebinModuleForTileWitho DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8304,7 +8304,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaWhenWritingAndRe DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8345,7 +8345,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaWhenWritingMemor DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8377,7 +8377,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenSingleIsaWithInvalidVmWhenReadin DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8432,7 +8432,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaAndSingleInstanc DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8479,7 +8479,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenIsaWhenGettingIsaInfoForWrongAdd DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8516,7 +8516,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenTileInstancedIsaWhenWritingAndRe DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8554,7 +8554,7 @@ TEST_F(DebugApiLinuxMultiDeviceVmBindTest, givenSingleMemoryIsaWhenWritingAndRea DebugSessionLinuxi915::UuidData isaUuidData = { .handle = isaUUID, .classHandle = isaClassHandle, - .classIndex = NEO::DrmResourceClass::Isa, + .classIndex = NEO::DrmResourceClass::isa, .data = std::make_unique(sizeof(devices)), .dataSize = sizeof(devices)}; @@ -8646,7 +8646,7 @@ TEST_F(AffinityMaskMultipleSubdevicesTestLinux, GivenEventWithAckFlagAndTileNotW typeOfUUID uuidsTemp[1]; uuidsTemp[0] = static_cast(6); - debugSession->clientHandleToConnection[debugSession->clientHandle]->uuidMap[6].classIndex = NEO::DrmResourceClass::Isa; + debugSession->clientHandleToConnection[debugSession->clientHandle]->uuidMap[6].classIndex = NEO::DrmResourceClass::isa; debugSession->clientHandleToConnection[debugSession->clientHandle]->vmToTile[vmBindIsa->vm_handle] = 2; memcpy(uuids, uuidsTemp, sizeof(uuidsTemp)); diff --git a/opencl/source/helpers/gmm_types_converter.cpp b/opencl/source/helpers/gmm_types_converter.cpp index 34a7c82dae..c738c3655d 100644 --- a/opencl/source/helpers/gmm_types_converter.cpp +++ b/opencl/source/helpers/gmm_types_converter.cpp @@ -42,11 +42,11 @@ uint32_t GmmTypesConverter::getRenderMultisamplesCount(uint32_t numSamples) { } GMM_YUV_PLANE GmmTypesConverter::convertPlane(ImagePlane imagePlane) { - if (imagePlane == ImagePlane::PLANE_Y) { + if (imagePlane == ImagePlane::planeY) { return GMM_PLANE_Y; - } else if (imagePlane == ImagePlane::PLANE_U || imagePlane == ImagePlane::PLANE_UV) { + } else if (imagePlane == ImagePlane::planeU || imagePlane == ImagePlane::planeUV) { return GMM_PLANE_U; - } else if (imagePlane == ImagePlane::PLANE_V) { + } else if (imagePlane == ImagePlane::planeV) { return GMM_PLANE_V; } diff --git a/opencl/source/helpers/hardware_commands_helper_base.inl b/opencl/source/helpers/hardware_commands_helper_base.inl index 078985e62c..91695a7232 100644 --- a/opencl/source/helpers/hardware_commands_helper_base.inl +++ b/opencl/source/helpers/hardware_commands_helper_base.inl @@ -163,7 +163,7 @@ size_t HardwareCommandsHelper::sendInterfaceDescriptorData( sizeCrossThreadData, sizePerThreadData, device.getRootDeviceEnvironment()); EncodeDispatchKernel::appendAdditionalIDDFields(&interfaceDescriptor, device.getRootDeviceEnvironment(), - threadsPerThreadGroup, slmTotalSize, SlmPolicy::SlmPolicyNone); + threadsPerThreadGroup, slmTotalSize, SlmPolicy::slmPolicyNone); if constexpr (heaplessModeEnabled == false) { interfaceDescriptor.setBindingTablePointer(static_cast(bindingTablePointer)); diff --git a/opencl/source/program/build.cpp b/opencl/source/program/build.cpp index 01c24ef906..c8eac8ff60 100644 --- a/opencl/source/program/build.cpp +++ b/opencl/source/program/build.cpp @@ -41,7 +41,7 @@ cl_int Program::build( std::unordered_map phaseReached; for (const auto &clDevice : deviceVector) { - phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::Init; + phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::init; } do { // check to see if a previous build request is in progress @@ -58,7 +58,7 @@ cl_int Program::build( if (false == requiresRebuild) { if (nullptr != buildOptions) { options = buildOptions; - } else if (this->createdFrom != CreatedFrom::BINARY) { + } else if (this->createdFrom != CreatedFrom::binary) { options = ""; } } @@ -77,7 +77,7 @@ cl_int Program::build( disableZebinIfVmeEnabled(options, internalOptions, sourceCode); TranslationInput inputArgs = {IGC::CodeType::oclC, IGC::CodeType::oclGenBin}; - if (createdFrom != CreatedFrom::SOURCE) { + if (createdFrom != CreatedFrom::source) { inputArgs.srcType = isSpirV ? IGC::CodeType::spirV : IGC::CodeType::llvmBc; inputArgs.src = ArrayRef(irBinary.get(), irBinarySize); } else { @@ -133,11 +133,11 @@ cl_int Program::build( } this->buildInfos[clDevice->getRootDeviceIndex()].debugData = std::move(compilerOuput.debugData.mem); this->buildInfos[clDevice->getRootDeviceIndex()].debugDataSize = compilerOuput.debugData.size; - if (BuildPhase::BinaryCreation == phaseReached[clDevice->getRootDeviceIndex()]) { + if (BuildPhase::binaryCreation == phaseReached[clDevice->getRootDeviceIndex()]) { continue; } this->replaceDeviceBinary(std::move(compilerOuput.deviceBinary.mem), compilerOuput.deviceBinary.size, clDevice->getRootDeviceIndex()); - phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::BinaryCreation; + phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::binaryCreation; } if (retVal != CL_SUCCESS) { break; @@ -220,11 +220,11 @@ void Program::extractInternalOptions(const std::string &options, std::string &in void Program::debugNotify(const ClDeviceVector &deviceVector, std::unordered_map &phasesReached) { for (auto &clDevice : deviceVector) { auto rootDeviceIndex = clDevice->getRootDeviceIndex(); - if (BuildPhase::DebugDataNotification == phasesReached[rootDeviceIndex]) { + if (BuildPhase::debugDataNotification == phasesReached[rootDeviceIndex]) { continue; } createDebugData(clDevice); - phasesReached[rootDeviceIndex] = BuildPhase::DebugDataNotification; + phasesReached[rootDeviceIndex] = BuildPhase::debugDataNotification; } } diff --git a/opencl/source/program/compile.cpp b/opencl/source/program/compile.cpp index 4a03676449..32d4244b46 100644 --- a/opencl/source/program/compile.cpp +++ b/opencl/source/program/compile.cpp @@ -59,7 +59,7 @@ cl_int Program::compile( break; } - if ((createdFrom == CreatedFrom::IL) || std::all_of(deviceVector.begin(), deviceVector.end(), [&](auto device) { return CL_PROGRAM_BINARY_TYPE_INTERMEDIATE == deviceBuildInfos[device].programBinaryType; })) { + if ((createdFrom == CreatedFrom::il) || std::all_of(deviceVector.begin(), deviceVector.end(), [&](auto device) { return CL_PROGRAM_BINARY_TYPE_INTERMEDIATE == deviceBuildInfos[device].programBinaryType; })) { retVal = CL_SUCCESS; break; } diff --git a/opencl/source/program/create.inl b/opencl/source/program/create.inl index df5321af1b..ced6f8e209 100644 --- a/opencl/source/program/create.inl +++ b/opencl/source/program/create.inl @@ -36,7 +36,7 @@ T *Program::create( break; } } - program->createdFrom = CreatedFrom::BINARY; + program->createdFrom = CreatedFrom::binary; if (binaryStatus) { DEBUG_BREAK_IF(retVal != CL_SUCCESS); @@ -84,7 +84,7 @@ T *Program::create( } } program->sourceCode.swap(combinedString); - program->createdFrom = CreatedFrom::SOURCE; + program->createdFrom = CreatedFrom::source; } errcodeRet = retVal; @@ -107,7 +107,7 @@ T *Program::createBuiltInFromSource( if (retVal == CL_SUCCESS) { program = new T(context, true, deviceVector); program->sourceCode = nullTerminatedString; - program->createdFrom = CreatedFrom::SOURCE; + program->createdFrom = CreatedFrom::source; } if (errcodeRet) { @@ -141,7 +141,7 @@ T *Program::createBuiltInFromGenBinary( } program->setBuildStatusSuccess(deviceVector, CL_PROGRAM_BINARY_TYPE_EXECUTABLE); program->isCreatedFromBinary = true; - program->createdFrom = CreatedFrom::BINARY; + program->createdFrom = CreatedFrom::binary; } if (errcodeRet) { @@ -171,7 +171,7 @@ T *Program::createFromIL(Context *context, break; } } - program->createdFrom = CreatedFrom::IL; + program->createdFrom = CreatedFrom::il; if (errcodeRet != CL_SUCCESS) { delete program; diff --git a/opencl/source/program/get_info.cpp b/opencl/source/program/get_info.cpp index 8d07fb7827..f01ac665df 100644 --- a/opencl/source/program/get_info.cpp +++ b/opencl/source/program/get_info.cpp @@ -117,7 +117,7 @@ cl_int Program::getInfo(cl_program_info paramName, size_t paramValueSize, break; case CL_PROGRAM_SOURCE: - if (createdFrom == CreatedFrom::SOURCE) { + if (createdFrom == CreatedFrom::source) { pSrc = sourceCode.c_str(); retSize = srcSize = strlen(sourceCode.c_str()) + 1; } else { @@ -129,7 +129,7 @@ cl_int Program::getInfo(cl_program_info paramName, size_t paramValueSize, break; case CL_PROGRAM_IL: - if (createdFrom != CreatedFrom::IL) { + if (createdFrom != CreatedFrom::il) { if (paramValueSizeRet) { *paramValueSizeRet = 0; } diff --git a/opencl/source/program/process_device_binary.cpp b/opencl/source/program/process_device_binary.cpp index 14019e6418..463309985e 100644 --- a/opencl/source/program/process_device_binary.cpp +++ b/opencl/source/program/process_device_binary.cpp @@ -160,7 +160,7 @@ cl_int Program::linkBinary(Device *pDevice, const void *constantsInitData, size_ cl_int Program::processGenBinaries(const ClDeviceVector &clDevices, std::unordered_map &phaseReached) { cl_int retVal = CL_SUCCESS; for (auto &clDevice : clDevices) { - if (BuildPhase::BinaryProcessing == phaseReached[clDevice->getRootDeviceIndex()]) { + if (BuildPhase::binaryProcessing == phaseReached[clDevice->getRootDeviceIndex()]) { continue; } if (debugManager.flags.PrintProgramBinaryProcessingTime.get()) { @@ -172,7 +172,7 @@ cl_int Program::processGenBinaries(const ClDeviceVector &clDevices, std::unorder if (retVal != CL_SUCCESS) { break; } - phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::BinaryProcessing; + phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::binaryProcessing; } return retVal; } diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 7e057fac67..7e488b757a 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -157,7 +157,7 @@ cl_int Program::createProgramFromBinary( this->buildInfos[rootDeviceIndex].unpackedDeviceBinarySize = 0U; this->buildInfos[rootDeviceIndex].packedDeviceBinary.reset(); this->buildInfos[rootDeviceIndex].packedDeviceBinarySize = 0U; - this->createdFrom = CreatedFrom::BINARY; + this->createdFrom = CreatedFrom::binary; ArrayRef archive(reinterpret_cast(pBinary), binarySize); bool isSpirV = NEO::isSpirVBitcode(archive); diff --git a/opencl/source/program/program.h b/opencl/source/program/program.h index bcd6312bc8..17f844e794 100644 --- a/opencl/source/program/program.h +++ b/opencl/source/program/program.h @@ -68,18 +68,18 @@ class Program : public BaseObject<_cl_program> { static const cl_ulong objectMagic = 0x5651C89100AAACFELL; enum class BuildPhase { - Init, - SourceCodeNotification, - BinaryCreation, - BinaryProcessing, - DebugDataNotification + init, + sourceCodeNotification, + binaryCreation, + binaryProcessing, + debugDataNotification }; enum class CreatedFrom { - SOURCE, - IL, - BINARY, - UNKNOWN + source, + il, + binary, + unknown }; // Create program from binary @@ -309,7 +309,7 @@ class Program : public BaseObject<_cl_program> { std::unique_ptr irBinary; size_t irBinarySize = 0U; - CreatedFrom createdFrom = CreatedFrom::UNKNOWN; + CreatedFrom createdFrom = CreatedFrom::unknown; struct DeviceBuildInfo { StackVec associatedSubDevices; diff --git a/opencl/source/sharings/d3d/d3d_surface.cpp b/opencl/source/sharings/d3d/d3d_surface.cpp index 7f3cece69a..1b77935c7d 100644 --- a/opencl/source/sharings/d3d/d3d_surface.cpp +++ b/opencl/source/sharings/d3d/d3d_surface.cpp @@ -41,7 +41,7 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo ImageInfo imgInfo = {}; cl_image_format imgFormat = {}; McsSurfaceInfo mcsSurfaceInfo = {}; - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; if (!context || !context->getSharing>() || !context->getSharing>()->getDevice()) { err.set(CL_INVALID_CONTEXT); @@ -93,11 +93,11 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo false, false, true, nullptr); updateImgInfoAndDesc(alloc->getDefaultGmm(), imgInfo, imagePlane, 0u); } else { - lockable = !(surfaceDesc.Usage & D3DResourceFlags::USAGE_RENDERTARGET) || imagePlane != ImagePlane::NO_PLANE; + lockable = !(surfaceDesc.Usage & D3DResourceFlags::USAGE_RENDERTARGET) || imagePlane != ImagePlane::noPlane; if (!lockable) { sharingFcns->createTexture2d(&surfaceStaging, &surfaceDesc, 0u); } - if (imagePlane == ImagePlane::PLANE_U || imagePlane == ImagePlane::PLANE_V || imagePlane == ImagePlane::PLANE_UV) { + if (imagePlane == ImagePlane::planeU || imagePlane == ImagePlane::planeV || imagePlane == ImagePlane::planeUV) { imgInfo.imgDesc.imageWidth /= 2; imgInfo.imgDesc.imageHeight /= 2; } @@ -227,7 +227,7 @@ const std::vector D3DSurface::D3DPlane2Formats = {static_cast(MAKEFOURCC('Y', 'V', '1', '2'))}; cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat, cl_uint plane, ImagePlane &imagePlane) { - imagePlane = ImagePlane::NO_PLANE; + imagePlane = ImagePlane::noPlane; static const cl_image_format unknownFormat = {0, 0}; auto element = D3DtoClFormatConversions.find(d3dFormat); @@ -243,11 +243,11 @@ cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat switch (plane) { case 0: imgFormat.image_channel_order = CL_R; - imagePlane = ImagePlane::PLANE_Y; + imagePlane = ImagePlane::planeY; return CL_SUCCESS; case 1: imgFormat.image_channel_order = CL_RG; - imagePlane = ImagePlane::PLANE_UV; + imagePlane = ImagePlane::planeUV; return CL_SUCCESS; default: imgFormat = unknownFormat; @@ -257,15 +257,15 @@ cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat case MAKEFOURCC('Y', 'V', '1', '2'): switch (plane) { case 0: - imagePlane = ImagePlane::PLANE_Y; + imagePlane = ImagePlane::planeY; return CL_SUCCESS; case 1: - imagePlane = ImagePlane::PLANE_V; + imagePlane = ImagePlane::planeV; return CL_SUCCESS; case 2: - imagePlane = ImagePlane::PLANE_U; + imagePlane = ImagePlane::planeU; return CL_SUCCESS; default: diff --git a/opencl/source/sharings/d3d/d3d_texture.cpp b/opencl/source/sharings/d3d/d3d_texture.cpp index 301c9c45f7..8fc20d53cb 100644 --- a/opencl/source/sharings/d3d/d3d_texture.cpp +++ b/opencl/source/sharings/d3d/d3d_texture.cpp @@ -29,7 +29,7 @@ template Image *D3DTexture::create2d(Context *context, D3DTexture2d *d3dTexture, cl_mem_flags flags, cl_uint subresource, cl_int *retCode) { ErrorCodeHelper err(retCode, CL_SUCCESS); auto sharingFcns = context->getSharing>(); - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; void *sharedHandle = nullptr; cl_uint arrayIndex = 0u; McsSurfaceInfo mcsSurfaceInfo = {}; @@ -47,9 +47,9 @@ Image *D3DTexture::create2d(Context *context, D3DTexture2d *d3dTexture, cl_ if (D3DSharing::isFormatWithPlane1(textureDesc.Format)) { if ((subresource % 2) == 0) { - imagePlane = ImagePlane::PLANE_Y; + imagePlane = ImagePlane::planeY; } else { - imagePlane = ImagePlane::PLANE_UV; + imagePlane = ImagePlane::planeUV; } imgInfo.plane = GmmTypesConverter::convertPlane(imagePlane); arrayIndex = subresource / 2u; @@ -198,7 +198,7 @@ Image *D3DTexture::create3d(Context *context, D3DTexture3d *d3dTexture, cl_ return nullptr; } - D3DSharing::updateImgInfoAndDesc(alloc->getDefaultGmm(), imgInfo, ImagePlane::NO_PLANE, 0u); + D3DSharing::updateImgInfoAndDesc(alloc->getDefaultGmm(), imgInfo, ImagePlane::noPlane, 0u); auto &executionEnvironment = memoryManager->peekExecutionEnvironment(); auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]; @@ -226,7 +226,7 @@ Image *D3DTexture::create3d(Context *context, D3DTexture3d *d3dTexture, cl_ template const ClSurfaceFormatInfo *D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT dxgiFormat, ImagePlane imagePlane, cl_mem_flags flags) { cl_image_format imgFormat = {}; - if (imagePlane == ImagePlane::PLANE_Y) { + if (imagePlane == ImagePlane::planeY) { imgFormat.image_channel_order = CL_R; } else { imgFormat.image_channel_order = CL_RG; diff --git a/opencl/source/sharings/unified/linux/unified_image_linux.cpp b/opencl/source/sharings/unified/linux/unified_image_linux.cpp index fc1910d32b..b5eb57d000 100644 --- a/opencl/source/sharings/unified/linux/unified_image_linux.cpp +++ b/opencl/source/sharings/unified/linux/unified_image_linux.cpp @@ -21,7 +21,7 @@ void *UnifiedImage::swapGmm(GraphicsAllocation *graphicsAllocation, Context *con imgInfo->linearStorage = true; auto gmmHelper = context->getDevice(0)->getRootDeviceEnvironment().getGmmHelper(); auto gmm = std::make_unique(gmmHelper, *imgInfo, StorageInfo{}, false); - gmm->updateImgInfoAndDesc(*imgInfo, 0, NEO::ImagePlane::NO_PLANE); + gmm->updateImgInfoAndDesc(*imgInfo, 0, NEO::ImagePlane::noPlane); delete graphicsAllocation->getDefaultGmm(); graphicsAllocation->setDefaultGmm(gmm.release()); } diff --git a/opencl/source/sharings/unified/windows/unified_image_windows.cpp b/opencl/source/sharings/unified/windows/unified_image_windows.cpp index 3974346403..593cd532fd 100644 --- a/opencl/source/sharings/unified/windows/unified_image_windows.cpp +++ b/opencl/source/sharings/unified/windows/unified_image_windows.cpp @@ -20,7 +20,7 @@ void *UnifiedImage::swapGmm(GraphicsAllocation *graphicsAllocation, Context *con if (graphicsAllocation->getDefaultGmm()->gmmResourceInfo->getResourceType() == RESOURCE_BUFFER) { auto gmmHelper = context->getDevice(0)->getRootDeviceEnvironment().getGmmHelper(); auto gmm = std::make_unique(gmmHelper, *imgInfo, StorageInfo{}, false); - gmm->updateImgInfoAndDesc(*imgInfo, 0, NEO::ImagePlane::NO_PLANE); + gmm->updateImgInfoAndDesc(*imgInfo, 0, NEO::ImagePlane::noPlane); delete graphicsAllocation->getDefaultGmm(); graphicsAllocation->setDefaultGmm(gmm.release()); } diff --git a/opencl/test/unit_test/d3d_sharing/d3d9_tests.cpp b/opencl/test/unit_test/d3d_sharing/d3d9_tests.cpp index bb189a9e5e..42ddde4d4c 100644 --- a/opencl/test/unit_test/d3d_sharing/d3d9_tests.cpp +++ b/opencl/test/unit_test/d3d_sharing/d3d9_tests.cpp @@ -176,7 +176,7 @@ TEST_F(D3D9Tests, WhenGetDeviceIdThenOneCorrectDeviceIsReturned) { TEST_F(D3D9Tests, WhenCreatingSurfaceThenImagePropertiesAreSetCorrectly) { cl_int retVal; cl_image_format expectedImgFormat = {}; - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; D3DSurface::findImgFormat(mockSharingFcns->mockTexture2dDesc.Format, expectedImgFormat, 0, imagePlane); mockSharingFcns->getTexture2dDescSetParams = true; @@ -208,7 +208,7 @@ TEST_F(D3D9Tests, WhenCreatingSurfaceThenImagePropertiesAreSetCorrectly) { TEST(D3D9SimpleTests, givenWrongFormatWhenFindIsCalledThenErrorIsReturned) { cl_image_format expectedImgFormat = {}; - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; auto status = D3DSurface::findImgFormat(D3DFMT_FORCE_DWORD, expectedImgFormat, 0, imagePlane); EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, status); } @@ -216,7 +216,7 @@ TEST(D3D9SimpleTests, givenWrongFormatWhenFindIsCalledThenErrorIsReturned) { TEST_F(D3D9Tests, WhenCreatingSurfaceIntelThenImagePropertiesAreSetCorrectly) { cl_int retVal; cl_image_format expectedImgFormat = {}; - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; D3DSurface::findImgFormat(mockSharingFcns->mockTexture2dDesc.Format, expectedImgFormat, 0, imagePlane); mockSharingFcns->getTexture2dDescSetParams = true; @@ -1249,34 +1249,34 @@ TEST_F(D3D9Tests, givenImproperCommandQueueWhenD3D11ObjectsAreReleasedThenReturn namespace D3D9Formats { static const std::tuple allImageFormats[] = { // input, input, output, output - std::make_tuple(D3DFMT_R32F, 0, CL_R, CL_FLOAT, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_R16F, 0, CL_R, CL_HALF_FLOAT, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_L16, 0, CL_R, CL_UNORM_INT16, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A8, 0, CL_A, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_L8, 0, CL_R, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_G32R32F, 0, CL_RG, CL_FLOAT, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_G16R16F, 0, CL_RG, CL_HALF_FLOAT, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_G16R16, 0, CL_RG, CL_UNORM_INT16, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A8L8, 0, CL_RG, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A32B32G32R32F, 0, CL_RGBA, CL_FLOAT, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A16B16G16R16F, 0, CL_RGBA, CL_HALF_FLOAT, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A16B16G16R16, 0, CL_RGBA, CL_UNORM_INT16, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A8B8G8R8, 0, CL_RGBA, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_X8B8G8R8, 0, CL_RGBA, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_A8R8G8B8, 0, CL_BGRA, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_X8R8G8B8, 0, CL_BGRA, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(MAKEFOURCC('N', 'V', '1', '2'), 0, CL_R, CL_UNORM_INT8, ImagePlane::PLANE_Y), - std::make_tuple(MAKEFOURCC('N', 'V', '1', '2'), 1, CL_RG, CL_UNORM_INT8, ImagePlane::PLANE_UV), - std::make_tuple(MAKEFOURCC('N', 'V', '1', '2'), 2, 0, 0, ImagePlane::NO_PLANE), - std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 0, CL_R, CL_UNORM_INT8, ImagePlane::PLANE_Y), - std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 1, CL_R, CL_UNORM_INT8, ImagePlane::PLANE_V), - std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 2, CL_R, CL_UNORM_INT8, ImagePlane::PLANE_U), - std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 3, 0, 0, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_YUY2, 0, CL_YUYV_INTEL, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_UYVY, 0, CL_UYVY_INTEL, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(MAKEFOURCC('Y', 'V', 'Y', 'U'), 0, CL_YVYU_INTEL, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(MAKEFOURCC('V', 'Y', 'U', 'Y'), 0, CL_VYUY_INTEL, CL_UNORM_INT8, ImagePlane::NO_PLANE), - std::make_tuple(D3DFMT_UNKNOWN, 0, 0, 0, ImagePlane::NO_PLANE)}; + std::make_tuple(D3DFMT_R32F, 0, CL_R, CL_FLOAT, ImagePlane::noPlane), + std::make_tuple(D3DFMT_R16F, 0, CL_R, CL_HALF_FLOAT, ImagePlane::noPlane), + std::make_tuple(D3DFMT_L16, 0, CL_R, CL_UNORM_INT16, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A8, 0, CL_A, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_L8, 0, CL_R, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_G32R32F, 0, CL_RG, CL_FLOAT, ImagePlane::noPlane), + std::make_tuple(D3DFMT_G16R16F, 0, CL_RG, CL_HALF_FLOAT, ImagePlane::noPlane), + std::make_tuple(D3DFMT_G16R16, 0, CL_RG, CL_UNORM_INT16, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A8L8, 0, CL_RG, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A32B32G32R32F, 0, CL_RGBA, CL_FLOAT, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A16B16G16R16F, 0, CL_RGBA, CL_HALF_FLOAT, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A16B16G16R16, 0, CL_RGBA, CL_UNORM_INT16, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A8B8G8R8, 0, CL_RGBA, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_X8B8G8R8, 0, CL_RGBA, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_A8R8G8B8, 0, CL_BGRA, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_X8R8G8B8, 0, CL_BGRA, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(MAKEFOURCC('N', 'V', '1', '2'), 0, CL_R, CL_UNORM_INT8, ImagePlane::planeY), + std::make_tuple(MAKEFOURCC('N', 'V', '1', '2'), 1, CL_RG, CL_UNORM_INT8, ImagePlane::planeUV), + std::make_tuple(MAKEFOURCC('N', 'V', '1', '2'), 2, 0, 0, ImagePlane::noPlane), + std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 0, CL_R, CL_UNORM_INT8, ImagePlane::planeY), + std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 1, CL_R, CL_UNORM_INT8, ImagePlane::planeV), + std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 2, CL_R, CL_UNORM_INT8, ImagePlane::planeU), + std::make_tuple(MAKEFOURCC('Y', 'V', '1', '2'), 3, 0, 0, ImagePlane::noPlane), + std::make_tuple(D3DFMT_YUY2, 0, CL_YUYV_INTEL, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_UYVY, 0, CL_UYVY_INTEL, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(MAKEFOURCC('Y', 'V', 'Y', 'U'), 0, CL_YVYU_INTEL, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(MAKEFOURCC('V', 'Y', 'U', 'Y'), 0, CL_VYUY_INTEL, CL_UNORM_INT8, ImagePlane::noPlane), + std::make_tuple(D3DFMT_UNKNOWN, 0, 0, 0, ImagePlane::noPlane)}; } struct D3D9ImageFormatTests @@ -1293,7 +1293,7 @@ TEST_P(D3D9ImageFormatTests, WhenGettingImageFormatThenValidFormatDetailsAreRetu cl_image_format imgFormat = {}; auto format = std::get<0>(GetParam()); auto plane = std::get<1>(GetParam()); - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; auto expectedImagePlane = std::get<4>(GetParam()); auto expectedClChannelType = static_cast(std::get<3>(GetParam())); auto expectedClChannelOrder = static_cast(std::get<2>(GetParam())); diff --git a/opencl/test/unit_test/d3d_sharing/d3d_tests_part1.cpp b/opencl/test/unit_test/d3d_sharing/d3d_tests_part1.cpp index c8d8a39d71..abf7d90a46 100644 --- a/opencl/test/unit_test/d3d_sharing/d3d_tests_part1.cpp +++ b/opencl/test/unit_test/d3d_sharing/d3d_tests_part1.cpp @@ -149,7 +149,7 @@ TYPED_TEST_P(D3DTests, givenNV12FormatAndEvenPlaneWhen2dCreatedThenSetPlaneParam ASSERT_NE(nullptr, image.get()); EXPECT_EQ(GMM_PLANE_Y, image->getPlane()); - auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_NV12, ImagePlane::PLANE_Y, CL_MEM_READ_WRITE); + auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_NV12, ImagePlane::planeY, CL_MEM_READ_WRITE); EXPECT_TRUE(memcmp(expectedFormat, &image->getSurfaceFormatInfo(), sizeof(SurfaceFormatInfo)) == 0); EXPECT_EQ(1u, this->mockGmmResInfo->getOffsetCalled); EXPECT_EQ(2u, this->mockGmmResInfo->arrayIndexPassedToGetOffset); @@ -235,7 +235,7 @@ TYPED_TEST_P(D3DTests, givenNV12FormatAndOddPlaneWhen2dCreatedThenSetPlaneParams ASSERT_NE(nullptr, image.get()); EXPECT_EQ(GMM_PLANE_U, image->getPlane()); - auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_NV12, ImagePlane::PLANE_UV, CL_MEM_READ_WRITE); + auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_NV12, ImagePlane::planeUV, CL_MEM_READ_WRITE); EXPECT_TRUE(memcmp(expectedFormat, &image->getSurfaceFormatInfo(), sizeof(SurfaceFormatInfo)) == 0); EXPECT_EQ(1u, this->mockGmmResInfo->getOffsetCalled); EXPECT_EQ(3u, this->mockGmmResInfo->arrayIndexPassedToGetOffset); @@ -252,7 +252,7 @@ TYPED_TEST_P(D3DTests, givenP010FormatAndEvenPlaneWhen2dCreatedThenSetPlaneParam auto image = std::unique_ptr(D3DTexture::create2d(this->context, reinterpret_cast(&this->dummyD3DTexture), CL_MEM_READ_WRITE, 4, nullptr)); ASSERT_NE(nullptr, image.get()); - auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P010, ImagePlane::PLANE_Y, CL_MEM_READ_WRITE); + auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P010, ImagePlane::planeY, CL_MEM_READ_WRITE); EXPECT_TRUE(memcmp(expectedFormat, &image->getSurfaceFormatInfo(), sizeof(SurfaceFormatInfo)) == 0); EXPECT_EQ(1u, this->mockGmmResInfo->getOffsetCalled); EXPECT_EQ(2u, this->mockGmmResInfo->arrayIndexPassedToGetOffset); @@ -269,7 +269,7 @@ TYPED_TEST_P(D3DTests, givenP010FormatAndOddPlaneWhen2dCreatedThenSetPlaneParams auto image = std::unique_ptr(D3DTexture::create2d(this->context, reinterpret_cast(&this->dummyD3DTexture), CL_MEM_READ_WRITE, 7, nullptr)); ASSERT_NE(nullptr, image.get()); - auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P010, ImagePlane::PLANE_UV, CL_MEM_READ_WRITE); + auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P010, ImagePlane::planeUV, CL_MEM_READ_WRITE); EXPECT_TRUE(memcmp(expectedFormat, &image->getSurfaceFormatInfo(), sizeof(SurfaceFormatInfo)) == 0); EXPECT_EQ(1u, this->mockGmmResInfo->getOffsetCalled); EXPECT_EQ(3u, this->mockGmmResInfo->arrayIndexPassedToGetOffset); @@ -286,7 +286,7 @@ TYPED_TEST_P(D3DTests, givenP016FormatAndEvenPlaneWhen2dCreatedThenSetPlaneParam auto image = std::unique_ptr(D3DTexture::create2d(this->context, reinterpret_cast(&this->dummyD3DTexture), CL_MEM_READ_WRITE, 4, nullptr)); ASSERT_NE(nullptr, image.get()); - auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P016, ImagePlane::PLANE_Y, CL_MEM_READ_WRITE); + auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P016, ImagePlane::planeY, CL_MEM_READ_WRITE); EXPECT_TRUE(memcmp(expectedFormat, &image->getSurfaceFormatInfo(), sizeof(SurfaceFormatInfo)) == 0); EXPECT_EQ(1u, this->mockGmmResInfo->getOffsetCalled); EXPECT_EQ(2u, this->mockGmmResInfo->arrayIndexPassedToGetOffset); @@ -303,7 +303,7 @@ TYPED_TEST_P(D3DTests, givenP016FormatAndOddPlaneWhen2dCreatedThenSetPlaneParams auto image = std::unique_ptr(D3DTexture::create2d(this->context, reinterpret_cast(&this->dummyD3DTexture), CL_MEM_READ_WRITE, 7, nullptr)); ASSERT_NE(nullptr, image.get()); - auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P016, ImagePlane::PLANE_UV, CL_MEM_READ_WRITE); + auto expectedFormat = D3DTexture::findYuvSurfaceFormatInfo(DXGI_FORMAT_P016, ImagePlane::planeUV, CL_MEM_READ_WRITE); EXPECT_TRUE(memcmp(expectedFormat, &image->getSurfaceFormatInfo(), sizeof(SurfaceFormatInfo)) == 0); EXPECT_EQ(1u, this->mockGmmResInfo->getOffsetCalled); EXPECT_EQ(3u, this->mockGmmResInfo->arrayIndexPassedToGetOffset); @@ -820,7 +820,7 @@ TEST(D3DSurfaceTest, givenD3DSurfaceWhenInvalidMemObjectIsPassedToValidateUpdate }; MockContext context; cl_dx9_surface_info_khr surfaceInfo = {}; - ImagePlane imagePlane = ImagePlane::NO_PLANE; + ImagePlane imagePlane = ImagePlane::noPlane; std::unique_ptr surface(new MockD3DSurface(&context, &surfaceInfo, nullptr, 0, imagePlane, 0, false, false)); MockBuffer buffer; diff --git a/opencl/test/unit_test/d3d_sharing/d3d_tests_part2.cpp b/opencl/test/unit_test/d3d_sharing/d3d_tests_part2.cpp index 7dea60b825..6922833472 100644 --- a/opencl/test/unit_test/d3d_sharing/d3d_tests_part2.cpp +++ b/opencl/test/unit_test/d3d_sharing/d3d_tests_part2.cpp @@ -461,23 +461,23 @@ TYPED_TEST_P(D3DTests, givenPlaneWhenFindYuvSurfaceCalledThenReturnValidImgForma DXGI_FORMAT testFormat[] = {DXGI_FORMAT::DXGI_FORMAT_NV12, DXGI_FORMAT::DXGI_FORMAT_P010, DXGI_FORMAT::DXGI_FORMAT_P016}; cl_channel_type channelDataType[] = {CL_UNORM_INT8, CL_UNORM_INT16, CL_UNORM_INT16}; for (int n = 0; n < 3; n++) { - surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::NO_PLANE, CL_MEM_READ_WRITE); + surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::noPlane, CL_MEM_READ_WRITE); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_order == CL_RG); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_data_type == channelDataType[n]); - surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::PLANE_U, CL_MEM_READ_WRITE); + surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::planeU, CL_MEM_READ_WRITE); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_order == CL_RG); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_data_type == channelDataType[n]); - surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::PLANE_UV, CL_MEM_READ_WRITE); + surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::planeUV, CL_MEM_READ_WRITE); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_order == CL_RG); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_data_type == channelDataType[n]); - surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::PLANE_V, CL_MEM_READ_WRITE); + surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::planeV, CL_MEM_READ_WRITE); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_order == CL_RG); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_data_type == channelDataType[n]); - surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::PLANE_Y, CL_MEM_READ_WRITE); + surfaceFormat = D3DTexture::findYuvSurfaceFormatInfo(testFormat[n], ImagePlane::planeY, CL_MEM_READ_WRITE); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_order == CL_R); EXPECT_TRUE(surfaceFormat->oclImageFormat.image_channel_data_type == channelDataType[n]); } diff --git a/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp b/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp index 64d108e431..edc516348b 100644 --- a/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp +++ b/opencl/test/unit_test/debugger/ocl_with_l0_debugger_tests.cpp @@ -230,7 +230,7 @@ HWTEST_F(DebuggerZebinProgramTest, GivenProgramWhenBuildingThenNotifyModuleCreat memcpy_s(mockCompilerInterface->output.intermediateRepresentation.mem.get(), mockCompilerInterface->output.intermediateRepresentation.size, zebin.storage.data(), zebin.storage.size()); - program->createdFrom = Program::CreatedFrom::BINARY; + program->createdFrom = Program::CreatedFrom::binary; program->irBinary = std::make_unique(16); program->irBinarySize = 16; @@ -256,7 +256,7 @@ HWTEST_F(DebuggerZebinProgramTest, GivenProgramWhenLinkingThenNotifyModuleCreate memcpy_s(mockCompilerInterface->output.intermediateRepresentation.mem.get(), mockCompilerInterface->output.intermediateRepresentation.size, zebin.storage.data(), zebin.storage.size()); - program->createdFrom = Program::CreatedFrom::BINARY; + program->createdFrom = Program::CreatedFrom::binary; program->irBinary = std::make_unique(16); program->irBinarySize = 16; diff --git a/opencl/test/unit_test/gmm_helper/gmm_helper_tests_ocl.cpp b/opencl/test/unit_test/gmm_helper/gmm_helper_tests_ocl.cpp index b9b9ced49d..d24dee659b 100644 --- a/opencl/test/unit_test/gmm_helper/gmm_helper_tests_ocl.cpp +++ b/opencl/test/unit_test/gmm_helper/gmm_helper_tests_ocl.cpp @@ -129,11 +129,11 @@ static const cl_mem_object_type imgTypes[6] = { } // namespace GmmTestConst TEST_F(GmmTests, WhenConvertingPlanesThenCorrectPlaneIsReturned) { - std::vector> v = {{ImagePlane::NO_PLANE, GMM_YUV_PLANE::GMM_NO_PLANE}, - {ImagePlane::PLANE_Y, GMM_YUV_PLANE::GMM_PLANE_Y}, - {ImagePlane::PLANE_U, GMM_YUV_PLANE::GMM_PLANE_U}, - {ImagePlane::PLANE_UV, GMM_YUV_PLANE::GMM_PLANE_U}, - {ImagePlane::PLANE_V, GMM_YUV_PLANE::GMM_PLANE_V}}; + std::vector> v = {{ImagePlane::noPlane, GMM_YUV_PLANE::GMM_NO_PLANE}, + {ImagePlane::planeY, GMM_YUV_PLANE::GMM_PLANE_Y}, + {ImagePlane::planeU, GMM_YUV_PLANE::GMM_PLANE_U}, + {ImagePlane::planeUV, GMM_YUV_PLANE::GMM_PLANE_U}, + {ImagePlane::planeV, GMM_YUV_PLANE::GMM_PLANE_V}}; for (auto p : v) { EXPECT_TRUE(p.second == GmmTypesConverter::convertPlane(p.first)); @@ -162,10 +162,10 @@ TEST_P(GmmImgTest, WhenUpdatingImgInfoAndDescThenInformationIsCorrect) { }; ImageInfo updateImgInfo = {}; - NEO::ImagePlane yuvPlane = NEO::ImagePlane::NO_PLANE; + NEO::ImagePlane yuvPlane = NEO::ImagePlane::noPlane; if (Image::convertType(GetParam()) == ImageType::image2D) { updateImgInfo.plane = GMM_YUV_PLANE::GMM_PLANE_U; - yuvPlane = NEO::ImagePlane::PLANE_UV; + yuvPlane = NEO::ImagePlane::planeUV; } uint32_t expectCalls = 1u; @@ -209,7 +209,7 @@ TEST_P(GmmImgTest, WhenUpdatingImgInfoAndDescThenInformationIsCorrect) { queryGmm->updateImgInfoAndDesc(updateImgInfo, arrayIndex, yuvPlane); EXPECT_EQ(expectCalls, mockResInfo->getOffsetCalled); - if (yuvPlane == NEO::ImagePlane::PLANE_UV) { + if (yuvPlane == NEO::ImagePlane::planeUV) { EXPECT_EQ(imgDesc.imageWidth / 2, updateImgInfo.imgDesc.imageWidth); EXPECT_EQ(imgDesc.imageHeight / 2, updateImgInfo.imgDesc.imageHeight); } else { @@ -230,8 +230,8 @@ TEST_P(GmmImgTest, WhenUpdatingImgInfoAndDescThenInformationIsCorrect) { EXPECT_TRUE(false); } - if (yuvPlane == NEO::ImagePlane::PLANE_UV) { - yuvPlane = NEO::ImagePlane::PLANE_V; + if (yuvPlane == NEO::ImagePlane::planeUV) { + yuvPlane = NEO::ImagePlane::planeV; auto uvRowPitch = updateImgInfo.imgDesc.imageRowPitch; queryGmm->updateImgInfoAndDesc(updateImgInfo, arrayIndex, yuvPlane); EXPECT_EQ(imgDesc.imageWidth / 2, updateImgInfo.imgDesc.imageWidth); diff --git a/opencl/test/unit_test/mocks/mock_debug_program.cpp b/opencl/test/unit_test/mocks/mock_debug_program.cpp index af4b03867d..887ff0f6f2 100644 --- a/opencl/test/unit_test/mocks/mock_debug_program.cpp +++ b/opencl/test/unit_test/mocks/mock_debug_program.cpp @@ -21,7 +21,7 @@ #include "program_debug_data.h" MockDebugProgram::MockDebugProgram(const NEO::ClDeviceVector &deviceVector) : NEO::Program(nullptr, false, deviceVector) { - createdFrom = CreatedFrom::SOURCE; + createdFrom = CreatedFrom::source; sourceCode = "__kernel void kernel(){}"; prepareMockCompilerInterface(deviceVector[0]->getDevice()); } diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index 97f54c1aee..a25bf5e9af 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -825,7 +825,7 @@ TEST_F(ProgramFromSourceTest, GivenSpecificParamatersWhenBuildingProgramThenSucc EXPECT_NE(0u, sourceSize); EXPECT_NE(nullptr, pSourceBuffer); p3->sourceCode = pSourceBuffer.get(); - p3->createdFrom = Program::CreatedFrom::SOURCE; + p3->createdFrom = Program::CreatedFrom::source; retVal = p3->build(p3->getDevices(), nullptr); EXPECT_EQ(CL_INVALID_BINARY, retVal); p3.reset(nullptr); @@ -875,7 +875,7 @@ TEST_F(ProgramFromSourceTest, GivenSpecificParamatersWhenBuildingProgramThenSucc // fail build - code to be build does not exist pMockProgram->sourceCode = ""; // set source code as non-existent (invalid) - pMockProgram->createdFrom = Program::CreatedFrom::SOURCE; + pMockProgram->createdFrom = Program::CreatedFrom::source; pMockProgram->setBuildStatus(CL_BUILD_NONE); pMockProgram->setCreatedFromBinary(false); retVal = pProgram->build(pProgram->getDevices(), nullptr); @@ -940,7 +940,7 @@ TEST_F(ProgramFromSourceTest, WhenBuildingProgramWithOpenClC20ThenExtraExtension pClDevice->getExecutionEnvironment()->rootDeviceEnvironments[pClDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto pProgram = std::make_unique(toClDeviceVector(*pClDevice)); pProgram->sourceCode = "__kernel mock() {}"; - pProgram->createdFrom = Program::CreatedFrom::SOURCE; + pProgram->createdFrom = Program::CreatedFrom::source; MockProgram::getInternalOptionsCalled = 0; @@ -960,7 +960,7 @@ TEST_F(ProgramFromSourceTest, WhenBuildingProgramWithOpenClC30ThenFeaturesAreAdd pClDevice->getExecutionEnvironment()->rootDeviceEnvironments[pClDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto pProgram = std::make_unique(toClDeviceVector(*pClDevice)); pProgram->sourceCode = "__kernel mock() {}"; - pProgram->createdFrom = Program::CreatedFrom::SOURCE; + pProgram->createdFrom = Program::CreatedFrom::source; MockProgram::getInternalOptionsCalled = 0; @@ -982,7 +982,7 @@ TEST_F(ProgramFromSourceTest, WhenBuildingProgramWithOpenClC30ThenFeaturesAreAdd pClDevice->getExecutionEnvironment()->rootDeviceEnvironments[pClDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto pProgram = std::make_unique(toClDeviceVector(*pClDevice)); pProgram->sourceCode = "__kernel mock() {}"; - pProgram->createdFrom = Program::CreatedFrom::SOURCE; + pProgram->createdFrom = Program::CreatedFrom::source; retVal = pProgram->build(pProgram->getDevices(), "-cl-std=CL3.0"); EXPECT_EQ(CL_SUCCESS, retVal); @@ -1057,7 +1057,7 @@ TEST_F(ProgramFromSourceTest, WhenCompilingProgramWithOpenClC30ThenFeaturesAreAd pClDevice->getExecutionEnvironment()->rootDeviceEnvironments[pClDevice->getRootDeviceIndex()]->compilerInterface.reset(pCompilerInterface); auto pProgram = std::make_unique(toClDeviceVector(*pClDevice)); pProgram->sourceCode = "__kernel mock() {}"; - pProgram->createdFrom = Program::CreatedFrom::SOURCE; + pProgram->createdFrom = Program::CreatedFrom::source; auto extensionsOption = pClDevice->peekCompilerExtensions(); auto extensionsWithFeaturesOption = pClDevice->peekCompilerExtensionsWithFeatures(); @@ -1135,7 +1135,7 @@ TEST_F(ProgramFromSourceTest, GivenDifferentCommpilerOptionsWhenBuildingProgramT Callback::unwatch(kernel2); Callback::watch(kernel3); - pProgram->createdFrom = NEO::Program::CreatedFrom::BINARY; + pProgram->createdFrom = NEO::Program::CreatedFrom::binary; pProgram->setIrBinary(new char[16], true); pProgram->setIrBinarySize(16, true); retVal = pProgram->build(pProgram->getDevices(), nullptr); @@ -1147,7 +1147,7 @@ TEST_F(ProgramFromSourceTest, GivenDifferentCommpilerOptionsWhenBuildingProgramT Callback::unwatch(kernel3); Callback::watch(kernel4); - pProgram->createdFrom = NEO::Program::CreatedFrom::SOURCE; + pProgram->createdFrom = NEO::Program::CreatedFrom::source; retVal = pProgram->build(pProgram->getDevices(), nullptr); EXPECT_EQ(CL_SUCCESS, retVal); auto hash5 = pProgram->getCachedFileName(); @@ -1290,7 +1290,7 @@ TEST_F(ProgramTests, GivenFlagsWhenLinkingProgramThenBuildOptionsHaveBeenApplied auto cip = new MockCompilerInterfaceCaptureBuildOptions(); auto pProgram = std::make_unique(toClDeviceVector(*pClDevice)); pProgram->sourceCode = "__kernel mock() {}"; - pProgram->createdFrom = Program::CreatedFrom::SOURCE; + pProgram->createdFrom = Program::CreatedFrom::source; MockProgram::getInternalOptionsCalled = 0; cl_program program = pProgram.get(); @@ -1953,7 +1953,7 @@ TEST_F(ProgramTests, givenStatefulAndStatelessAccessesWhenProgramBuildIsCalledTh MyMockProgram program(pContext, false, toClDeviceVector(*pClDevice)); program.isBuiltIn = false; program.sourceCode = "test_kernel"; - program.createdFrom = Program::CreatedFrom::SOURCE; + program.createdFrom = Program::CreatedFrom::source; program.isGeneratedByIgc = isIgcGenerated; program.setAddressingMode(isStatefulAccess); debugManager.flags.FailBuildProgramWithStatefulAccess.set(debuyKey); @@ -2255,7 +2255,7 @@ TEST_F(ProgramTests, GivenGtpinReraFlagWhenBuildingProgramThenCorrectOptionsAreS pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto program = std::make_unique(toClDeviceVector(*pDevice)); program->sourceCode = "__kernel mock() {}"; - program->createdFrom = Program::CreatedFrom::SOURCE; + program->createdFrom = Program::CreatedFrom::source; // Ask to build created program without NEO::CompilerOptions::gtpinRera flag. cl_int retVal = program->build(program->getDevices(), CompilerOptions::fastRelaxedMath.data()); @@ -2281,7 +2281,7 @@ TEST_F(ProgramTests, GivenFailureDuringProcessGenBinaryWhenProcessGenBinariesIsC auto program = std::make_unique(toClDeviceVector(*pClDevice)); std::unordered_map phaseReached; - phaseReached[0] = Program::BuildPhase::BinaryCreation; + phaseReached[0] = Program::BuildPhase::binaryCreation; cl_int retVal = program->processGenBinaries(toClDeviceVector(*pClDevice), phaseReached); EXPECT_EQ(CL_INVALID_BINARY, retVal); } @@ -2705,7 +2705,7 @@ TEST_F(ProgramTests, GivenInjectInternalBuildOptionsWhenBuildingProgramThenInter pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto program = std::make_unique(toClDeviceVector(*pDevice)); program->sourceCode = "__kernel mock() {}"; - program->createdFrom = Program::CreatedFrom::SOURCE; + program->createdFrom = Program::CreatedFrom::source; cl_int retVal = program->build(program->getDevices(), ""); EXPECT_EQ(CL_SUCCESS, retVal); @@ -2722,7 +2722,7 @@ TEST_F(ProgramTests, GivenInjectInternalBuildOptionsWhenBuildingBuiltInProgramTh pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto program = std::make_unique(toClDeviceVector(*pDevice)); program->sourceCode = "__kernel mock() {}"; - program->createdFrom = Program::CreatedFrom::SOURCE; + program->createdFrom = Program::CreatedFrom::source; program->isBuiltIn = true; cl_int retVal = program->build(program->getDevices(), ""); @@ -2740,7 +2740,7 @@ TEST_F(ProgramTests, GivenInjectInternalBuildOptionsWhenCompilingProgramThenInte pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto program = std::make_unique(toClDeviceVector(*pDevice)); program->sourceCode = "__kernel mock() {}"; - program->createdFrom = Program::CreatedFrom::SOURCE; + program->createdFrom = Program::CreatedFrom::source; cl_int retVal = program->compile(program->getDevices(), nullptr, 0, nullptr, nullptr); EXPECT_EQ(CL_SUCCESS, retVal); @@ -2757,7 +2757,7 @@ TEST_F(ProgramTests, GivenInjectInternalBuildOptionsWhenCompilingBuiltInProgramT pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->compilerInterface.reset(cip); auto program = std::make_unique(toClDeviceVector(*pDevice)); program->sourceCode = "__kernel mock() {}"; - program->createdFrom = Program::CreatedFrom::SOURCE; + program->createdFrom = Program::CreatedFrom::source; program->isBuiltIn = true; cl_int retVal = program->compile(program->getDevices(), nullptr, 0, nullptr, nullptr); diff --git a/shared/source/debugger/linux/debugger_l0_linux.cpp b/shared/source/debugger/linux/debugger_l0_linux.cpp index 605aec558e..4aa106bceb 100644 --- a/shared/source/debugger/linux/debugger_l0_linux.cpp +++ b/shared/source/debugger/linux/debugger_l0_linux.cpp @@ -59,7 +59,7 @@ uint32_t DebuggerL0::registerElf(NEO::DebugData *debugData) { uint32_t handle = 0; if (device->getRootDeviceEnvironment().osInterface.get() != nullptr) { auto drm = device->getRootDeviceEnvironment().osInterface->getDriverModel()->as(); - handle = drm->registerResource(NEO::DrmResourceClass::Elf, debugData->vIsa, debugData->vIsaSize); + handle = drm->registerResource(NEO::DrmResourceClass::elf, debugData->vIsa, debugData->vIsaSize); } return handle; } @@ -70,7 +70,7 @@ bool DebuggerL0::attachZebinModuleToSegmentAllocations(const StackVecgetRootDeviceEnvironment().osInterface->getDriverModel()->as(); uint32_t segmentCount = static_cast(allocs.size()); - moduleHandle = drm->registerResource(NEO::DrmResourceClass::L0ZebinModule, &segmentCount, sizeof(uint32_t)); + moduleHandle = drm->registerResource(NEO::DrmResourceClass::l0ZebinModule, &segmentCount, sizeof(uint32_t)); for (auto &allocation : allocs) { auto drmAllocation = static_cast(allocation); diff --git a/shared/source/gmm_helper/gmm.cpp b/shared/source/gmm_helper/gmm.cpp index b3bca2ea43..6e461f7328 100644 --- a/shared/source/gmm_helper/gmm.cpp +++ b/shared/source/gmm_helper/gmm.cpp @@ -281,10 +281,10 @@ void Gmm::updateImgInfoAndDesc(ImageInfo &imgInfo, uint32_t arrayIndex, ImagePla imgInfo.imgDesc.imageRowPitch = width * (gmmResourceInfo->getBitsPerPixel() >> 3); } imgInfo.imgDesc.imageHeight = gmmResourceInfo->getBaseHeight(); - if ((yuvPlaneType != ImagePlane::NO_PLANE) && (yuvPlaneType != ImagePlane::PLANE_Y)) { + if ((yuvPlaneType != ImagePlane::noPlane) && (yuvPlaneType != ImagePlane::planeY)) { imgInfo.imgDesc.imageWidth /= 2; imgInfo.imgDesc.imageHeight /= 2; - if (yuvPlaneType != ImagePlane::PLANE_UV) { + if (yuvPlaneType != ImagePlane::planeUV) { imgInfo.imgDesc.imageRowPitch /= 2; } } @@ -320,13 +320,13 @@ void Gmm::updateOffsetsInImgInfo(ImageInfo &imgInfo, uint32_t arrayIndex) { uint8_t Gmm::resourceCopyBlt(void *sys, void *gpu, uint32_t pitch, uint32_t height, unsigned char upload, ImagePlane plane) { GMM_RES_COPY_BLT gmmResourceCopyBLT = {}; - if (plane == ImagePlane::PLANE_V) { + if (plane == ImagePlane::planeV) { sys = ptrOffset(sys, height * pitch * 2); pitch /= 2; - } else if (plane == ImagePlane::PLANE_U) { + } else if (plane == ImagePlane::planeU) { sys = ptrOffset(sys, height * pitch * 2 + height * pitch / 2); pitch /= 2; - } else if (plane == ImagePlane::PLANE_UV) { + } else if (plane == ImagePlane::planeUV) { sys = ptrOffset(sys, height * pitch * 2); } uint32_t size = pitch * height; diff --git a/shared/source/helpers/surface_format_info.h b/shared/source/helpers/surface_format_info.h index 1afa24689e..2c88a3c3d7 100644 --- a/shared/source/helpers/surface_format_info.h +++ b/shared/source/helpers/surface_format_info.h @@ -185,11 +185,11 @@ enum GFX3DSTATE_SURFACEFORMAT : unsigned short { }; enum class ImagePlane { - NO_PLANE = 0, - PLANE_Y, - PLANE_U, - PLANE_V, - PLANE_UV + noPlane = 0, + planeY, + planeU, + planeV, + planeUV }; struct SurfaceFormatInfo { diff --git a/shared/source/kernel/dispatch_kernel_encoder_interface.h b/shared/source/kernel/dispatch_kernel_encoder_interface.h index da974cdaa8..08808f7609 100644 --- a/shared/source/kernel/dispatch_kernel_encoder_interface.h +++ b/shared/source/kernel/dispatch_kernel_encoder_interface.h @@ -14,9 +14,9 @@ struct ImplicitArgs; struct KernelDescriptor; enum class SlmPolicy { - SlmPolicyNone, - SlmPolicyLargeSlm, - SlmPolicyLargeData + slmPolicyNone, + slmPolicyLargeSlm, + slmPolicyLargeData }; struct DispatchKernelEncoderI { diff --git a/shared/source/os_interface/linux/drm_allocation.cpp b/shared/source/os_interface/linux/drm_allocation.cpp index fc1293b837..2850698bc4 100644 --- a/shared/source/os_interface/linux/drm_allocation.cpp +++ b/shared/source/os_interface/linux/drm_allocation.cpp @@ -319,28 +319,28 @@ void DrmAllocation::registerBOBindExtHandle(Drm *drm) { return; } - DrmResourceClass resourceClass = DrmResourceClass::MaxSize; + DrmResourceClass resourceClass = DrmResourceClass::maxSize; switch (this->allocationType) { case AllocationType::debugContextSaveArea: - resourceClass = DrmResourceClass::ContextSaveArea; + resourceClass = DrmResourceClass::contextSaveArea; break; case AllocationType::debugSbaTrackingBuffer: - resourceClass = DrmResourceClass::SbaTrackingBuffer; + resourceClass = DrmResourceClass::sbaTrackingBuffer; break; case AllocationType::kernelIsa: - resourceClass = DrmResourceClass::Isa; + resourceClass = DrmResourceClass::isa; break; case AllocationType::debugModuleArea: - resourceClass = DrmResourceClass::ModuleHeapDebugArea; + resourceClass = DrmResourceClass::moduleHeapDebugArea; break; default: break; } - if (resourceClass != DrmResourceClass::MaxSize) { + if (resourceClass != DrmResourceClass::maxSize) { auto handle = 0; - if (resourceClass == DrmResourceClass::Isa) { + if (resourceClass == DrmResourceClass::isa) { auto deviceBitfiled = static_cast(this->storageInfo.subDeviceBitfield.to_ulong()); handle = drm->registerResource(resourceClass, &deviceBitfiled, sizeof(deviceBitfiled)); } else { @@ -357,13 +357,13 @@ void DrmAllocation::registerBOBindExtHandle(Drm *drm) { if (bo) { bo->addBindExtHandle(handle); bo->markForCapture(); - if (resourceClass == DrmResourceClass::Isa && storageInfo.tileInstanced == true) { + if (resourceClass == DrmResourceClass::isa && storageInfo.tileInstanced == true) { auto cookieHandle = drm->registerIsaCookie(handle); bo->addBindExtHandle(cookieHandle); registeredBoBindHandles.push_back(cookieHandle); } - if (resourceClass == DrmResourceClass::SbaTrackingBuffer && getOsContext()) { + if (resourceClass == DrmResourceClass::sbaTrackingBuffer && getOsContext()) { auto deviceIndex = [=]() -> uint32_t { if (storageInfo.tileInstanced == true) { return boIndex; diff --git a/shared/source/os_interface/linux/drm_command_stream.inl b/shared/source/os_interface/linux/drm_command_stream.inl index cad8447458..639e8d3e5b 100644 --- a/shared/source/os_interface/linux/drm_command_stream.inl +++ b/shared/source/os_interface/linux/drm_command_stream.inl @@ -388,7 +388,7 @@ bool DrmCommandStreamReceiver::waitUserFence(TaskCountType waitValue, } for (uint32_t i = 0; i < this->activePartitions; i++) { - ret |= this->drm->waitUserFence(useContextForUserFenceWait ? ctxIds[i] : 0, hostAddress, waitValue, Drm::ValueWidth::U64, timeout, 0u); + ret |= this->drm->waitUserFence(useContextForUserFenceWait ? ctxIds[i] : 0, hostAddress, waitValue, Drm::ValueWidth::u64, timeout, 0u); if (ret != 0) { break; } diff --git a/shared/source/os_interface/linux/drm_debug.cpp b/shared/source/os_interface/linux/drm_debug.cpp index f87281a092..7bbfcd5da0 100644 --- a/shared/source/os_interface/linux/drm_debug.cpp +++ b/shared/source/os_interface/linux/drm_debug.cpp @@ -40,7 +40,7 @@ uint32_t Drm::registerResource(DrmResourceClass classType, const void *data, siz } std::string uuid; - if (classType == NEO::DrmResourceClass::Elf) { + if (classType == NEO::DrmResourceClass::elf) { uuid = generateElfUUID(data); } else { uuid = generateUUID(); @@ -89,7 +89,7 @@ std::string Drm::generateUUID() { } std::string Drm::generateElfUUID(const void *data) { - std::string elfClassUuid = classNamesToUuid[static_cast(DrmResourceClass::Elf)].second; + std::string elfClassUuid = classNamesToUuid[static_cast(DrmResourceClass::elf)].second; std::string uuiD1st = elfClassUuid.substr(0, 18); const char uuidString[] = "%s-%04" SCNx64 "-%012" SCNx64; diff --git a/shared/source/os_interface/linux/drm_debug.h b/shared/source/os_interface/linux/drm_debug.h index f0bf7c6f8d..0bad262c75 100644 --- a/shared/source/os_interface/linux/drm_debug.h +++ b/shared/source/os_interface/linux/drm_debug.h @@ -14,14 +14,14 @@ namespace NEO { enum class DrmResourceClass : uint32_t { - Elf, - Isa, - ModuleHeapDebugArea, - ContextSaveArea, - SbaTrackingBuffer, - ContextID, - L0ZebinModule, - MaxSize + elf, + isa, + moduleHeapDebugArea, + contextSaveArea, + sbaTrackingBuffer, + contextID, + l0ZebinModule, + maxSize }; /* @@ -56,7 +56,7 @@ UUID('285208b2-c5e0-5fcb-90bb-7576ed7a9697') */ -using ClassNamesArray = std::array, size_t(DrmResourceClass::MaxSize)>; +using ClassNamesArray = std::array, size_t(DrmResourceClass::maxSize)>; inline const ClassNamesArray classNamesToUuid = {std::make_pair("I915_UUID_CLASS_ELF_BINARY", "31203221-8069-5a0a-9d43-94a4d3395ee1"), std::make_pair("I915_UUID_CLASS_ISA_BYTECODE", "53baed0a-12c3-5d19-aa69-ab9c51aa1039"), std::make_pair("I915_UUID_L0_MODULE_AREA", "a411e82e-16c9-58b7-bfb5-b209b8601d5f"), @@ -70,7 +70,7 @@ constexpr auto uuidL0CommandQueueHash = "285208b2-c5e0-5fcb-90bb-7576ed7a9697"; struct DrmUuid { static bool getClassUuidIndex(std::string uuid, uint32_t &index) { - for (uint32_t i = 0; i < uint32_t(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 0; i < uint32_t(DrmResourceClass::maxSize); i++) { if (uuid == classNamesToUuid[i].second) { index = i; return true; diff --git a/shared/source/os_interface/linux/drm_memory_manager.cpp b/shared/source/os_interface/linux/drm_memory_manager.cpp index b3d83eaed5..43c2825d71 100644 --- a/shared/source/os_interface/linux/drm_memory_manager.cpp +++ b/shared/source/os_interface/linux/drm_memory_manager.cpp @@ -1063,7 +1063,7 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o Gmm *gmm = new Gmm(executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->getGmmHelper(), *properties.imgInfo, createStorageInfoFromProperties(properties), properties.flags.preferCompressed); - gmm->updateImgInfoAndDesc(*properties.imgInfo, 0, NEO::ImagePlane::NO_PLANE); + gmm->updateImgInfoAndDesc(*properties.imgInfo, 0, NEO::ImagePlane::noPlane); drmAllocation->setDefaultGmm(gmm); bo->setPatIndex(drm.getPatIndex(gmm, properties.allocationType, CacheRegion::defaultRegion, CachePolicy::writeBack, false, MemoryPoolHelper::isSystemMemoryPool(memoryPool))); diff --git a/shared/source/os_interface/linux/drm_neo.cpp b/shared/source/os_interface/linux/drm_neo.cpp index 6b22b50908..0d7a96f298 100644 --- a/shared/source/os_interface/linux/drm_neo.cpp +++ b/shared/source/os_interface/linux/drm_neo.cpp @@ -1150,7 +1150,7 @@ void Drm::waitForBind(uint32_t vmHandleId) { auto fenceValue = this->fenceVal[vmHandleId]; lock.unlock(); - waitUserFence(0u, fenceAddress, fenceValue, ValueWidth::U64, -1, ioctlHelper->getWaitUserFenceSoftFlag()); + waitUserFence(0u, fenceAddress, fenceValue, ValueWidth::u64, -1, ioctlHelper->getWaitUserFenceSoftFlag()); } bool Drm::isSetPairAvailable() { @@ -1535,7 +1535,7 @@ void Drm::waitOnUserFences(const OsContextLinux &osContext, uint64_t address, ui for (auto drmIterator = 0u; drmIterator < numActiveTiles; drmIterator++) { if (*reinterpret_cast(completionFenceCpuAddress) < value) { static constexpr uint16_t flags = 0; - int retVal = waitUserFence(drmContextIds[drmIterator], completionFenceCpuAddress, value, Drm::ValueWidth::U64, selectedTimeout, flags); + int retVal = waitUserFence(drmContextIds[drmIterator], completionFenceCpuAddress, value, Drm::ValueWidth::u64, selectedTimeout, flags); if (debugManager.flags.PrintCompletionFenceUsage.get()) { std::cout << "Completion fence waited." << " Status: " << retVal diff --git a/shared/source/os_interface/linux/drm_neo.h b/shared/source/os_interface/linux/drm_neo.h index f3dcd9c92a..9e342a73e0 100644 --- a/shared/source/os_interface/linux/drm_neo.h +++ b/shared/source/os_interface/linux/drm_neo.h @@ -218,10 +218,10 @@ class Drm : public DriverModel { int waitHandle(uint32_t waitHandle, int64_t timeout); enum class ValueWidth : uint32_t { - U8, - U16, - U32, - U64 + u8, + u16, + u32, + u64 }; MOCKABLE_VIRTUAL int waitUserFence(uint32_t ctxId, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags); @@ -316,7 +316,7 @@ class Drm : public DriverModel { std::mutex bindFenceMutex; std::array pagingFence; std::array fenceVal; - StackVec classHandles; + StackVec classHandles; std::vector virtualMemoryIds; std::unique_ptr hwDeviceId; diff --git a/shared/source/os_interface/linux/os_context_linux.cpp b/shared/source/os_interface/linux/os_context_linux.cpp index 418446c32e..591f386961 100644 --- a/shared/source/os_interface/linux/os_context_linux.cpp +++ b/shared/source/os_interface/linux/os_context_linux.cpp @@ -108,7 +108,7 @@ void OsContextLinux::waitForBind(uint32_t drmIterator) { auto fenceValue = this->fenceVal[drmIterator]; lock.unlock(); - drm.waitUserFence(0u, fenceAddress, fenceValue, Drm::ValueWidth::U64, -1, drm.getIoctlHelper()->getWaitUserFenceSoftFlag()); + drm.waitUserFence(0u, fenceAddress, fenceValue, Drm::ValueWidth::u64, -1, drm.getIoctlHelper()->getWaitUserFenceSoftFlag()); } else { drm.waitForBind(drmIterator); diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp index cc4d9104a7..4d5e04c14a 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp @@ -629,13 +629,13 @@ int IoctlHelperXe::waitUserFence(uint32_t ctxId, uint64_t address, xeLog(" -> IoctlHelperXe::%s a=0x%llx v=0x%llx w=0x%x T=0x%llx F=0x%x\n", __FUNCTION__, address, value, dataWidth, timeout, flags); uint64_t mask; switch (dataWidth) { - case static_cast(Drm::ValueWidth::U64): + case static_cast(Drm::ValueWidth::u64): mask = DRM_XE_UFENCE_WAIT_MASK_U64; break; - case static_cast(Drm::ValueWidth::U32): + case static_cast(Drm::ValueWidth::u32): mask = DRM_XE_UFENCE_WAIT_MASK_U32; break; - case static_cast(Drm::ValueWidth::U16): + case static_cast(Drm::ValueWidth::u16): mask = DRM_XE_UFENCE_WAIT_MASK_U16; break; default: diff --git a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp index 64e9e82da7..fad9f1fee9 100644 --- a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp @@ -310,10 +310,10 @@ void EncodeDispatchKernel::appendAdditionalIDDFields(InterfaceDescriptor uint32_t slmSize = 0u; switch (slmPolicy) { - case SlmPolicy::SlmPolicyLargeData: + case SlmPolicy::slmPolicyLargeData: slmSize = workgroupSlmSize; break; - case SlmPolicy::SlmPolicyLargeSlm: + case SlmPolicy::slmPolicyLargeSlm: default: slmSize = workgroupSlmSize * workGroupCountPerDss; break; diff --git a/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp b/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp index afcf83ba57..eaacbec6e8 100644 --- a/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp @@ -38,10 +38,10 @@ void EncodeDispatchKernel::appendAdditionalIDDFields(InterfaceDescriptor uint32_t slmSize = 0u; switch (slmPolicy) { - case SlmPolicy::SlmPolicyLargeData: + case SlmPolicy::slmPolicyLargeData: slmSize = workgroupSlmSize; break; - case SlmPolicy::SlmPolicyLargeSlm: + case SlmPolicy::slmPolicyLargeSlm: default: slmSize = workgroupSlmSize * workGroupCountPerDss; break; diff --git a/shared/test/common/libult/linux/drm_mock.h b/shared/test/common/libult/linux/drm_mock.h index 68f36d9a4d..fe163f6bc3 100644 --- a/shared/test/common/libult/linux/drm_mock.h +++ b/shared/test/common/libult/linux/drm_mock.h @@ -406,7 +406,7 @@ class DrmMockResources : public DrmMock { uint32_t unregisteredHandle = 0; uint32_t unregisterCalledCount = 0; - DrmResourceClass registeredClass = DrmResourceClass::MaxSize; + DrmResourceClass registeredClass = DrmResourceClass::maxSize; bool registerClassesCalled = false; uint64_t registeredData[128]; size_t registeredDataSize; diff --git a/shared/test/common/os_interface/linux/device_command_stream_fixture.h b/shared/test/common/os_interface/linux/device_command_stream_fixture.h index 912cde714c..f72e7b8294 100644 --- a/shared/test/common/os_interface/linux/device_command_stream_fixture.h +++ b/shared/test/common/os_interface/linux/device_command_stream_fixture.h @@ -110,7 +110,7 @@ class DrmMockCustom : public Drm { uint64_t address = 0u; uint64_t value = 0u; uint32_t ctxId = 0u; - ValueWidth dataWidth = ValueWidth::U8; + ValueWidth dataWidth = ValueWidth::u8; int64_t timeout = 0; uint16_t flags = 0; diff --git a/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp b/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp index 8887c3e864..9a92911798 100644 --- a/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp +++ b/shared/test/unit_test/direct_submission/linux/drm_direct_submission_tests.cpp @@ -350,7 +350,7 @@ HWTEST_F(DrmDirectSubmissionTest, givenCompletionFenceSupportAndHangingContextWh EXPECT_EQ(osContext->getDrmContextIds().size(), drm->waitUserFenceParams.size()); EXPECT_EQ(1, drm->waitUserFenceParams[0].timeout); EXPECT_EQ(10u, drm->waitUserFenceParams[0].value); - EXPECT_EQ(Drm::ValueWidth::U64, drm->waitUserFenceParams[0].dataWidth); + EXPECT_EQ(Drm::ValueWidth::u64, drm->waitUserFenceParams[0].dataWidth); } HWTEST_F(DrmDirectSubmissionTest, givenCompletionFenceSupportAndFenceIsNotCompletedWhenWaitOnSpecificAddressesPerOsContext) { diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h index 92384e81b5..5d63025262 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h @@ -32,15 +32,15 @@ void verifyPreferredSlmValues(std::vector> va EXPECT_EQ(0u, idd.getPreferredSlmAllocationSize()); const std::array slmPolicies = { - NEO::SlmPolicy::SlmPolicyNone, - NEO::SlmPolicy::SlmPolicyLargeSlm, - NEO::SlmPolicy::SlmPolicyLargeData}; + NEO::SlmPolicy::slmPolicyNone, + NEO::SlmPolicy::slmPolicyLargeSlm, + NEO::SlmPolicy::slmPolicyLargeData}; for (auto localWorkGroupsPerDssCount : localWorkGroupsPerDssCounts) { for (auto &valueToTest : valuesToTest) { for (auto slmPolicy : slmPolicies) { auto threadsPerThreadGroup = threadsPerDssCount / localWorkGroupsPerDssCount; - auto slmTotalSize = (slmPolicy == NEO::SlmPolicy::SlmPolicyLargeData) + auto slmTotalSize = (slmPolicy == NEO::SlmPolicy::slmPolicyLargeData) ? valueToTest.preferredSlmAllocationSizePerDss : valueToTest.preferredSlmAllocationSizePerDss / localWorkGroupsPerDssCount; diff --git a/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp b/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp index b4587fbf24..4ac0703e5d 100644 --- a/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp +++ b/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp @@ -495,20 +495,20 @@ TEST_F(GmmHelperTests, GivenPlaneWhenCopyingResourceBltThenResourceIsCopiedCorre expectedCpuBlt.Sys.BufferSize = pitch * height; // plane Y - auto retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::PLANE_Y); + auto retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::planeY); EXPECT_EQ(1u, retVal); EXPECT_TRUE(memcmp(&expectedCpuBlt, &requestedCpuBlt, sizeof(GMM_RES_COPY_BLT)) == 0); EXPECT_EQ(1u, mockResInfo->cpuBltCalled); // no-plane - retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::NO_PLANE); + retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::noPlane); EXPECT_EQ(1u, retVal); EXPECT_TRUE(memcmp(&expectedCpuBlt, &requestedCpuBlt, sizeof(GMM_RES_COPY_BLT)) == 0); EXPECT_EQ(2u, mockResInfo->cpuBltCalled); // plane UV expectedCpuBlt.Sys.pData = ptrOffset(&sys, height * pitch * 2u); - retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::PLANE_UV); + retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::planeUV); EXPECT_EQ(1u, retVal); EXPECT_TRUE(memcmp(&expectedCpuBlt, &requestedCpuBlt, sizeof(GMM_RES_COPY_BLT)) == 0); EXPECT_EQ(3u, mockResInfo->cpuBltCalled); @@ -517,7 +517,7 @@ TEST_F(GmmHelperTests, GivenPlaneWhenCopyingResourceBltThenResourceIsCopiedCorre expectedCpuBlt.Sys.pData = ptrOffset(&sys, height * pitch * 2u); expectedCpuBlt.Sys.RowPitch = pitch / 2; expectedCpuBlt.Sys.BufferSize = expectedCpuBlt.Sys.RowPitch * height; - retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::PLANE_V); + retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::planeV); EXPECT_EQ(1u, retVal); EXPECT_TRUE(memcmp(&expectedCpuBlt, &requestedCpuBlt, sizeof(GMM_RES_COPY_BLT)) == 0); EXPECT_EQ(4u, mockResInfo->cpuBltCalled); @@ -526,7 +526,7 @@ TEST_F(GmmHelperTests, GivenPlaneWhenCopyingResourceBltThenResourceIsCopiedCorre expectedCpuBlt.Sys.pData = ptrOffset(&sys, height * pitch * 2u + height * pitch / 2u); expectedCpuBlt.Sys.RowPitch = pitch / 2; expectedCpuBlt.Sys.BufferSize = expectedCpuBlt.Sys.RowPitch * height; - retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::PLANE_U); + retVal = gmm->resourceCopyBlt(&sys, &gpu, pitch, height, upload, ImagePlane::planeU); EXPECT_EQ(1u, retVal); EXPECT_TRUE(memcmp(&expectedCpuBlt, &requestedCpuBlt, sizeof(GMM_RES_COPY_BLT)) == 0); EXPECT_EQ(5u, mockResInfo->cpuBltCalled); diff --git a/shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h b/shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h index 56763a99a0..eecc8aafad 100644 --- a/shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h +++ b/shared/test/unit_test/mocks/mock_dispatch_kernel_encoder_interface.h @@ -54,7 +54,7 @@ struct MockDispatchKernelEncoder : public DispatchKernelEncoderI { ADDMETHOD_CONST_NOBASE(getIsaAllocation, GraphicsAllocation *, &mockAllocation, ()); ADDMETHOD_CONST_NOBASE(getDynamicStateHeapData, const uint8_t *, nullptr, ()); ADDMETHOD_CONST_NOBASE(requiresGenerationOfLocalIdsByRuntime, bool, true, ()); - ADDMETHOD_CONST_NOBASE(getSlmPolicy, SlmPolicy, SlmPolicy::SlmPolicyNone, ()); + ADDMETHOD_CONST_NOBASE(getSlmPolicy, SlmPolicy, SlmPolicy::slmPolicyNone, ()); ADDMETHOD_CONST_NOBASE(getIsaOffsetInParentAllocation, uint64_t, 0lu, ()); }; } // namespace NEO diff --git a/shared/test/unit_test/os_interface/linux/drm_command_stream_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_command_stream_tests.cpp index 467ed5f022..a3f02786fb 100644 --- a/shared/test/unit_test/os_interface/linux/drm_command_stream_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_command_stream_tests.cpp @@ -1142,7 +1142,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, EXPECT_NE(0u, mock->waitUserFenceCall.ctxId); EXPECT_EQ(-1, mock->waitUserFenceCall.timeout); - EXPECT_EQ(Drm::ValueWidth::U64, mock->waitUserFenceCall.dataWidth); + EXPECT_EQ(Drm::ValueWidth::u64, mock->waitUserFenceCall.dataWidth); } HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, @@ -1236,7 +1236,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, EXPECT_EQ(0u, mock->waitUserFenceCall.ctxId); EXPECT_EQ(1000, mock->waitUserFenceCall.timeout); - EXPECT_EQ(Drm::ValueWidth::U64, mock->waitUserFenceCall.dataWidth); + EXPECT_EQ(Drm::ValueWidth::u64, mock->waitUserFenceCall.dataWidth); } HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, diff --git a/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp index 9c40872793..421253b9a3 100644 --- a/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_debug_prelim_tests.cpp @@ -67,7 +67,7 @@ TEST_F(DrmDebugPrelimTest, GivenUnsupportedUUIDRegisterIoctlWhenRegisteringClass TEST_F(DrmDebugPrelimTest, GivenNoClassesRegisteredWhenRegisteringResourceThenRegisterUUIDIoctlIsNotCalledAndZeroHandleReturned) { DrmQueryMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - auto registeredHandle = drm.registerResource(DrmResourceClass::Isa, nullptr, 0); + auto registeredHandle = drm.registerResource(DrmResourceClass::isa, nullptr, 0); EXPECT_EQ(0u, registeredHandle); EXPECT_EQ(0u, drm.ioctlCallsCount); } @@ -79,7 +79,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringResourceWithoutDataThenRegiste EXPECT_TRUE(result); const auto handle = drm.context.uuidHandle; - auto registeredHandle = drm.registerResource(DrmResourceClass::Isa, nullptr, 0); + auto registeredHandle = drm.registerResource(DrmResourceClass::isa, nullptr, 0); EXPECT_EQ(handle + 1, drm.context.uuidHandle); EXPECT_EQ(handle, registeredHandle); @@ -90,7 +90,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringResourceWithoutDataThenRegiste EXPECT_EQ(nullptr, receivedUuid->ptr); EXPECT_EQ(0u, receivedUuid->size); EXPECT_TRUE(hasSubstr(std::string(receivedUuid->uuid), std::string("00000000-0000-0000"))); - EXPECT_EQ(drm.classHandles[static_cast(DrmResourceClass::Isa)], receivedUuid->uuidClass); + EXPECT_EQ(drm.classHandles[static_cast(DrmResourceClass::isa)], receivedUuid->uuidClass); } TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringResourceWithDataThenRegisterUUIDIoctlIsCalledWithCorrectData) { @@ -102,7 +102,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringResourceWithDataThenRegisterUU auto handle = drm.context.uuidHandle; uint64_t data = 0x12345678; - auto registeredHandle = drm.registerResource(DrmResourceClass::Isa, &data, sizeof(uint64_t)); + auto registeredHandle = drm.registerResource(DrmResourceClass::isa, &data, sizeof(uint64_t)); EXPECT_EQ(handle + 1, drm.context.uuidHandle); EXPECT_EQ(handle, registeredHandle); @@ -113,7 +113,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringResourceWithDataThenRegisterUU EXPECT_EQ(&data, receivedUuid->ptr); EXPECT_EQ(sizeof(uint64_t), receivedUuid->size); EXPECT_TRUE(hasSubstr(std::string(receivedUuid->uuid), std::string("00000000-0000-0000"))); - EXPECT_EQ(drm.classHandles[static_cast(DrmResourceClass::Isa)], receivedUuid->uuidClass); + EXPECT_EQ(drm.classHandles[static_cast(DrmResourceClass::isa)], receivedUuid->uuidClass); EXPECT_EQ(0u, receivedUuid->flags); EXPECT_EQ(0u, receivedUuid->extensions); } @@ -125,7 +125,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenUnregisteringResourceThenUnregisterUUIDIo EXPECT_TRUE(result); uint64_t data = 0x12345678; - auto registeredHandle = drm.registerResource(DrmResourceClass::Isa, &data, sizeof(uint64_t)); + auto registeredHandle = drm.registerResource(DrmResourceClass::isa, &data, sizeof(uint64_t)); drm.unregisterResource(registeredHandle); @@ -184,7 +184,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenRegisteringElfResourceWithoutDataThenRegi EXPECT_TRUE(result); auto handle = drm.context.uuidHandle; - auto registeredHandle = drm.registerResource(DrmResourceClass::Elf, nullptr, 0); + auto registeredHandle = drm.registerResource(DrmResourceClass::elf, nullptr, 0); EXPECT_EQ(handle + 1, drm.context.uuidHandle); EXPECT_EQ(handle, registeredHandle); diff --git a/shared/test/unit_test/os_interface/linux/drm_debug_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_debug_tests.cpp index 0647270a8e..2e40b7a154 100644 --- a/shared/test/unit_test/os_interface/linux/drm_debug_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_debug_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -37,7 +37,7 @@ TEST_F(DrmDebugTest, whenRegisterResourceCalledThenImplementationIsEmpty) { DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]); drmMock.ioctlCallsCount = 0; - auto handle = drmMock.registerResource(DrmResourceClass::MaxSize, nullptr, 0); + auto handle = drmMock.registerResource(DrmResourceClass::maxSize, nullptr, 0); EXPECT_EQ(0u, handle); drmMock.unregisterResource(handle); EXPECT_EQ(0u, drmMock.ioctlCallsCount); diff --git a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 62c25ab7b1..e51ed0d0a1 100644 --- a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -3909,7 +3909,7 @@ TEST(DrmMemoryManagerFreeGraphicsMemoryUnreferenceTest, givenDrmMemoryManagerAnd TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeShouldBeRegisteredThenBoHasBindExtHandleAdded) { const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } @@ -3919,9 +3919,9 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho allocation.bufferObjects[0] = &bo; allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(DrmMockResources::registerResourceReturnHandle, bo.bindExtHandles[0]); - EXPECT_EQ(DrmResourceClass::ContextSaveArea, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::contextSaveArea, drm.registeredClass); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; { MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); @@ -3929,9 +3929,9 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho allocation.bufferObjects[0] = &bo; allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(DrmMockResources::registerResourceReturnHandle, bo.bindExtHandles[0]); - EXPECT_EQ(DrmResourceClass::SbaTrackingBuffer, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::sbaTrackingBuffer, drm.registeredClass); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; { MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); @@ -3939,9 +3939,9 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho allocation.bufferObjects[0] = &bo; allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(DrmMockResources::registerResourceReturnHandle, bo.bindExtHandles[0]); - EXPECT_EQ(DrmResourceClass::Isa, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::isa, drm.registeredClass); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; { MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); @@ -3949,10 +3949,10 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho allocation.bufferObjects[0] = &bo; allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(DrmMockResources::registerResourceReturnHandle, bo.bindExtHandles[0]); - EXPECT_EQ(DrmResourceClass::ModuleHeapDebugArea, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::moduleHeapDebugArea, drm.registeredClass); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; { MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); @@ -3960,7 +3960,7 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho allocation.bufferObjects[0] = &bo; allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(0u, bo.bindExtHandles.size()); - EXPECT_EQ(DrmResourceClass::MaxSize, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::maxSize, drm.registeredClass); } } @@ -3968,9 +3968,9 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } @@ -3981,7 +3981,7 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenAllocationTypeSho allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(0u, bo.bindExtHandles.size()); } - EXPECT_EQ(DrmResourceClass::MaxSize, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::maxSize, drm.registeredClass); } TEST_F(DrmAllocationTests, givenResourceRegistrationNotEnabledWhenRegisteringBindExtHandleThenHandleIsNotAddedToBo) { @@ -3994,7 +3994,7 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationNotEnabledWhenRegisteringBin allocation.bufferObjects[0] = &bo; allocation.registerBOBindExtHandle(&drm); EXPECT_EQ(0u, bo.bindExtHandles.size()); - EXPECT_EQ(DrmResourceClass::MaxSize, drm.registeredClass); + EXPECT_EQ(DrmResourceClass::maxSize, drm.registeredClass); } TEST(DrmMemoryManager, givenTrackedAllocationTypeAndDisabledRegistrationInDrmWhenAllocatingThenRegisterBoBindExtHandleIsNotCalled) { @@ -4016,7 +4016,7 @@ TEST(DrmMemoryManager, givenTrackedAllocationTypeAndDisabledRegistrationInDrmWhe memoryManager->registerAllocationInOs(&allocation); EXPECT_FALSE(allocation.registerBOBindExtHandleCalled); - EXPECT_EQ(DrmResourceClass::MaxSize, mockDrm->registeredClass); + EXPECT_EQ(DrmResourceClass::maxSize, mockDrm->registeredClass); } TEST(DrmMemoryManager, givenResourceRegistrationEnabledAndAllocTypeToCaptureWhenRegisteringAllocationInOsThenItIsMarkedForCapture) { @@ -4056,7 +4056,7 @@ TEST(DrmMemoryManager, givenTrackedAllocationTypeWhenAllocatingThenAllocationIsR executionEnvironment->rootDeviceEnvironments[0]->initGmm(); auto memoryManager = std::make_unique(false, false, false, *executionEnvironment); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { mockDrm->classHandles.push_back(i); } @@ -4068,7 +4068,7 @@ TEST(DrmMemoryManager, givenTrackedAllocationTypeWhenAllocatingThenAllocationIsR properties.gpuAddress = 0x20000; auto sbaAllocation = memoryManager->allocateGraphicsMemoryWithProperties(properties); - EXPECT_EQ(DrmResourceClass::SbaTrackingBuffer, mockDrm->registeredClass); + EXPECT_EQ(DrmResourceClass::sbaTrackingBuffer, mockDrm->registeredClass); EXPECT_EQ(sizeof(uint64_t), mockDrm->registeredDataSize); uint64_t *data = reinterpret_cast(mockDrm->registeredData); @@ -4086,7 +4086,7 @@ TEST(DrmMemoryManager, givenTrackedAllocationTypeWhenFreeingThenRegisteredHandle executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr(mockDrm)); auto memoryManager = std::make_unique(false, false, false, *executionEnvironment); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { mockDrm->classHandles.push_back(i); } @@ -4117,7 +4117,7 @@ TEST(DrmMemoryManager, givenEnabledResourceRegistrationWhenSshIsAllocatedThenItI executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mockDrm, 0u, false); executionEnvironment->memoryManager = std::make_unique(false, false, false, *executionEnvironment); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { mockDrm->classHandles.push_back(i); } EXPECT_TRUE(mockDrm->resourceRegistrationEnabled()); @@ -4141,7 +4141,7 @@ TEST(DrmMemoryManager, givenNullBoWhenRegisteringBindExtHandleThenEarlyReturn) { auto mockDrm = std::make_unique(*executionEnvironment->rootDeviceEnvironments[0]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { mockDrm->classHandles.push_back(i); } @@ -4173,11 +4173,11 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledAndTileInstancedIsaWh const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::kernelIsa, MemoryPool::localMemory); @@ -4197,11 +4197,11 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledAndSingleInstanceIsaW const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::kernelIsa, MemoryPool::system4KBPages); @@ -4219,11 +4219,11 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenIsaIsRegisteredTh const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::kernelIsa, MemoryPool::localMemory); @@ -4243,11 +4243,11 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledAndSubDeviceBitfieldS const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::debugSbaTrackingBuffer, MemoryPool::localMemory); @@ -4281,11 +4281,11 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledAndSubDeviceBitfieldN const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::debugSbaTrackingBuffer, MemoryPool::localMemory); @@ -4318,11 +4318,11 @@ TEST_F(DrmAllocationTests, givenTwoBufferObjectsAndTileInstancedSbaAndSubDeviceB const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo0(rootDeviceIndex, &drm, 3, 0, 0, 1); MockBufferObject bo1(rootDeviceIndex, &drm, 3, 0, 0, 1); @@ -4361,11 +4361,11 @@ TEST_F(DrmAllocationTests, givenResourceRegistrationEnabledWhenSbaTrackingBuffer const uint32_t rootDeviceIndex = 0u; DrmMockResources drm(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]); - for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::MaxSize); i++) { + for (uint32_t i = 3; i < 3 + static_cast(DrmResourceClass::maxSize); i++) { drm.classHandles.push_back(i); } - drm.registeredClass = DrmResourceClass::MaxSize; + drm.registeredClass = DrmResourceClass::maxSize; MockBufferObject bo(rootDeviceIndex, &drm, 3, 0, 0, 1); MockDrmAllocation allocation(rootDeviceIndex, AllocationType::debugSbaTrackingBuffer, MemoryPool::localMemory); diff --git a/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp index 35645c75a5..3d5b6ad267 100644 --- a/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_query_prelim_tests.cpp @@ -502,7 +502,7 @@ TEST(DrmBufferObjectTestPrelim, givenProvidedCtxIdWhenCallingWaitUserFenceThenEx uint64_t gpuAddress = 0x1020304000ull; uint64_t value = 0x98765ull; - drm.waitUserFence(10u, gpuAddress, value, Drm::ValueWidth::U8, -1, 0u); + drm.waitUserFence(10u, gpuAddress, value, Drm::ValueWidth::u8, -1, 0u); EXPECT_EQ(1u, drm.context.waitUserFenceCalled); const auto &waitUserFence = drm.context.receivedWaitUserFence; @@ -523,7 +523,7 @@ TEST(DrmBufferObjectTestPrelim, givenProvidedNoCtxIdWhenCallingWaitUserFenceThen uint64_t gpuAddress = 0x1020304000ull; uint64_t value = 0x98765ull; - drm.waitUserFence(0u, gpuAddress, value, Drm::ValueWidth::U16, 2, 3u); + drm.waitUserFence(0u, gpuAddress, value, Drm::ValueWidth::u16, 2, 3u); EXPECT_EQ(1u, drm.context.waitUserFenceCalled); const auto &waitUserFence = drm.context.receivedWaitUserFence; diff --git a/shared/test/unit_test/os_interface/linux/drm_uuid_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_uuid_tests.cpp index 251a8e87c4..c38cccfbe8 100644 --- a/shared/test/unit_test/os_interface/linux/drm_uuid_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_uuid_tests.cpp @@ -33,7 +33,7 @@ TEST(DrmUuidTest, GivenDrmWhenGeneratingElfUUIDThenCorrectStringsAreReturned) { auto executionEnvironment = std::make_unique(); DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]}; - std::string elfClassUuid = classNamesToUuid[static_cast(DrmResourceClass::Elf)].second; + std::string elfClassUuid = classNamesToUuid[static_cast(DrmResourceClass::elf)].second; std::string uuid1stElfClass = elfClassUuid.substr(0, 18); char data[] = "abc"; @@ -52,26 +52,26 @@ TEST(DrmUuidTest, GivenDrmWhenGeneratingElfUUIDThenCorrectStringsAreReturned) { } TEST(DrmUuidTest, whenResourceClassIsUsedToIndexClassNamesThenCorrectNamesAreReturned) { - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::Elf)].first, "I915_UUID_CLASS_ELF_BINARY"); - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::Isa)].first, "I915_UUID_CLASS_ISA_BYTECODE"); - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::ContextSaveArea)].first, "I915_UUID_L0_SIP_AREA"); - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::ModuleHeapDebugArea)].first, "I915_UUID_L0_MODULE_AREA"); - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::SbaTrackingBuffer)].first, "I915_UUID_L0_SBA_AREA"); - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::ContextID)].first, "I915_UUID_L0_CONTEXT_ID"); - EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::L0ZebinModule)].first, "L0_ZEBIN_MODULE"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::elf)].first, "I915_UUID_CLASS_ELF_BINARY"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::isa)].first, "I915_UUID_CLASS_ISA_BYTECODE"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::contextSaveArea)].first, "I915_UUID_L0_SIP_AREA"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::moduleHeapDebugArea)].first, "I915_UUID_L0_MODULE_AREA"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::sbaTrackingBuffer)].first, "I915_UUID_L0_SBA_AREA"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::contextID)].first, "I915_UUID_L0_CONTEXT_ID"); + EXPECT_STREQ(classNamesToUuid[static_cast(DrmResourceClass::l0ZebinModule)].first, "L0_ZEBIN_MODULE"); } TEST(DrmUuidTest, givenUuidStringWhenGettingClassIndexThenCorrectIndexForValidStringsIsReturned) { uint32_t index = 100; - auto validUuid = DrmUuid::getClassUuidIndex(classNamesToUuid[static_cast(DrmResourceClass::ContextSaveArea)].second, index); + auto validUuid = DrmUuid::getClassUuidIndex(classNamesToUuid[static_cast(DrmResourceClass::contextSaveArea)].second, index); EXPECT_TRUE(validUuid); - EXPECT_EQ(static_cast(DrmResourceClass::ContextSaveArea), index); + EXPECT_EQ(static_cast(DrmResourceClass::contextSaveArea), index); - validUuid = DrmUuid::getClassUuidIndex(classNamesToUuid[static_cast(DrmResourceClass::ModuleHeapDebugArea)].second, index); + validUuid = DrmUuid::getClassUuidIndex(classNamesToUuid[static_cast(DrmResourceClass::moduleHeapDebugArea)].second, index); EXPECT_TRUE(validUuid); - EXPECT_EQ(static_cast(DrmResourceClass::ModuleHeapDebugArea), index); + EXPECT_EQ(static_cast(DrmResourceClass::moduleHeapDebugArea), index); index = 100; validUuid = DrmUuid::getClassUuidIndex("invalid", index); diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp index b174740729..3cd788f6b4 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_encode_dispatch_kernel_pvc.cpp @@ -50,7 +50,7 @@ PVCTEST_F(CommandEncodeStatesPvcTest, GivenSmallSlmTotalSizesWhenSetAdditionalIn hwInfo.platform.usDeviceID = deviceId; hwInfo.platform.usRevId = revisionToTest.revisionId; INTERFACE_DESCRIPTOR_DATA idd = FamilyType::cmdInitInterfaceDescriptorData; - EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsCount, slmTotalSize, SlmPolicy::SlmPolicyNone); + EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsCount, slmTotalSize, SlmPolicy::slmPolicyNone); if (revisionToTest.isWaRequired) { EXPECT_EQ(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_16K, idd.getPreferredSlmAllocationSize()); } else { diff --git a/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp index c26de17482..4900d10b9e 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp @@ -41,28 +41,28 @@ DG2TEST_F(CommandEncodeStatesDg2Test, givenNoWorkaroundNeededWhenSelectingPrefer const uint32_t threadsPerThreadGroup = 7; // 18 groups will fit in one DSS const uint32_t slmSizePerThreadGroup = 2 * MemoryConstants::kiloByte; INTERFACE_DESCRIPTOR_DATA idd = FamilyType::cmdInitInterfaceDescriptorData; - EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::SlmPolicyLargeSlm); + EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::slmPolicyLargeSlm); EXPECT_EQ(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_64K, idd.getPreferredSlmAllocationSize()); } { const uint32_t threadsPerThreadGroup = 8; // 16 groups will fit in one DSS const uint32_t slmSizePerThreadGroup = 2 * MemoryConstants::kiloByte; INTERFACE_DESCRIPTOR_DATA idd = FamilyType::cmdInitInterfaceDescriptorData; - EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::SlmPolicyLargeSlm); + EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::slmPolicyLargeSlm); EXPECT_EQ(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K, idd.getPreferredSlmAllocationSize()); } { const uint32_t threadsPerThreadGroup = 9; // 14 groups will fit in one DSS const uint32_t slmSizePerThreadGroup = 2 * MemoryConstants::kiloByte; INTERFACE_DESCRIPTOR_DATA idd = FamilyType::cmdInitInterfaceDescriptorData; - EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::SlmPolicyLargeSlm); + EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::slmPolicyLargeSlm); EXPECT_EQ(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K, idd.getPreferredSlmAllocationSize()); } { const uint32_t threadsPerThreadGroup = 50; // 2 groups will fit in one DSS const uint32_t slmSizePerThreadGroup = 16 * MemoryConstants::kiloByte; INTERFACE_DESCRIPTOR_DATA idd = FamilyType::cmdInitInterfaceDescriptorData; - EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::SlmPolicyLargeSlm); + EncodeDispatchKernel::appendAdditionalIDDFields(&idd, rootDeviceEnvironment, threadsPerThreadGroup, slmSizePerThreadGroup, SlmPolicy::slmPolicyLargeSlm); EXPECT_EQ(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_32K, idd.getPreferredSlmAllocationSize()); } }