From 036d1e4814d8e4184e79e653f97b9f381729edf2 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Mon, 30 Oct 2023 11:52:17 +0000 Subject: [PATCH] refactor: correct variable naming Signed-off-by: Mateusz Jablonski --- .../api/fan/windows/sysman_os_fan_imp.cpp | 14 +- .../source/windows/zes_os_sysman_imp.cpp | 4 +- .../frequency/windows/test_zes_frequency.cpp | 56 ++++---- .../sources/windows/mock_kmd_sys_manager.h | 2 +- .../source/sysman/fan/windows/os_fan_imp.cpp | 14 +- .../source/sysman/windows/os_sysman_imp.cpp | 4 +- .../test_metric_oa_enumeration_windows.cpp | 4 +- .../frequency/windows/test_zes_frequency.cpp | 58 ++++---- .../sysman/windows/mock_kmd_sys_manager.h | 2 +- .../sysman/windows/test_sysman_manager.cpp | 4 +- .../windows/d3d10_11_sharing_functions.cpp | 20 +-- .../windows/d3d9_sharing_functions.cpp | 2 +- .../windows/d3d_sharing_functions.h | 2 +- opencl/source/sharings/d3d/d3d_surface.cpp | 8 +- .../gl/windows/gl_sharing_windows.cpp | 60 ++++----- .../sharings/gl/windows/gl_sharing_windows.h | 70 +++++----- .../gl/windows/gl_texture_windows.cpp | 12 +- .../sharings/gl/windows/win_enable_gl.cpp | 16 +-- .../sharings/gl/windows/win_enable_gl.h | 6 +- .../d3d_sharing/cl_dx_sharing_tests.cpp | 6 +- .../gl/windows/mock_gl_sharing_windows.h | 48 +++---- .../windows/gl_create_from_texture_tests.cpp | 24 ++-- .../gl/windows/gl_os_sharing_tests.cpp | 12 +- .../sharings/gl/windows/gl_sharing_tests.cpp | 126 +++++++++--------- .../windows/debug_registry_reader.cpp | 20 +-- .../os_interface/windows/os_library_win.cpp | 6 +- shared/source/utilities/windows/cpu_info.cpp | 14 +- .../windows/os_memory_virtual_alloc_ult.cpp | 8 +- .../os_interface/windows/signal_utils.cpp | 4 +- .../windows/device_command_stream_tests.cpp | 14 +- 30 files changed, 320 insertions(+), 320 deletions(-) diff --git a/level_zero/sysman/source/api/fan/windows/sysman_os_fan_imp.cpp b/level_zero/sysman/source/api/fan/windows/sysman_os_fan_imp.cpp index a262cfb132..6a8a94621b 100644 --- a/level_zero/sysman/source/api/fan/windows/sysman_os_fan_imp.cpp +++ b/level_zero/sysman/source/api/fan/windows/sysman_os_fan_imp.cpp @@ -35,8 +35,8 @@ ze_result_t WddmFanImp::getProperties(zes_fan_properties_t *pProperties) { request.requestId = KmdSysman::Requests::Fans::CurrentNumOfControlPoints; request.dataSize = sizeof(uint32_t); - uint32_t FanPoints = 2; - memcpy_s(request.dataBuffer, sizeof(uint32_t), &FanPoints, sizeof(uint32_t)); + uint32_t fanPoints = 2; + memcpy_s(request.dataBuffer, sizeof(uint32_t), &fanPoints, sizeof(uint32_t)); vRequests.push_back(request); @@ -56,8 +56,8 @@ ze_result_t WddmFanImp::getProperties(zes_fan_properties_t *pProperties) { pProperties->canControl = (vResponses[0].returnCode == KmdSysman::Success); if (vResponses[1].returnCode == KmdSysman::Success) { - memcpy_s(&FanPoints, sizeof(uint32_t), vResponses[1].dataBuffer, sizeof(uint32_t)); - pProperties->maxPoints = maxPoints = static_cast(FanPoints); + memcpy_s(&fanPoints, sizeof(uint32_t), vResponses[1].dataBuffer, sizeof(uint32_t)); + pProperties->maxPoints = maxPoints = static_cast(fanPoints); } pProperties->maxRPM = -1; pProperties->supportedModes = zes_fan_speed_mode_t::ZES_FAN_SPEED_MODE_TABLE; @@ -132,13 +132,13 @@ ze_result_t WddmFanImp::setSpeedTableMode(const zes_fan_speed_table_t *pSpeedTab singleRequest.commandId = KmdSysman::Command::Get; singleRequest.componentId = KmdSysman::Component::FanComponent; singleRequest.requestId = KmdSysman::Requests::Fans::MaxFanControlPointsSupported; - uint32_t FanPoints = 2; + uint32_t fanPoints = 2; if (pKmdSysManager->requestSingle(singleRequest, singleResponse) == ZE_RESULT_SUCCESS) { if (singleResponse.returnCode == KmdSysman::Success) { - memcpy_s(&FanPoints, sizeof(uint32_t), singleResponse.dataBuffer, sizeof(uint32_t)); + memcpy_s(&fanPoints, sizeof(uint32_t), singleResponse.dataBuffer, sizeof(uint32_t)); } - maxPoints = static_cast(FanPoints); + maxPoints = static_cast(fanPoints); } if (pSpeedTable->numPoints == 0 || pSpeedTable->numPoints > maxPoints) { diff --git a/level_zero/sysman/source/windows/zes_os_sysman_imp.cpp b/level_zero/sysman/source/windows/zes_os_sysman_imp.cpp index 7d03c9608d..c2676bd686 100644 --- a/level_zero/sysman/source/windows/zes_os_sysman_imp.cpp +++ b/level_zero/sysman/source/windows/zes_os_sysman_imp.cpp @@ -18,8 +18,8 @@ namespace L0 { namespace Sysman { ze_result_t WddmSysmanImp::init() { - NEO::OSInterface &OsInterface = *(pParentSysmanDeviceImp->getRootDeviceEnvironment()).osInterface; - auto driverModel = OsInterface.getDriverModel(); + NEO::OSInterface &osInterface = *(pParentSysmanDeviceImp->getRootDeviceEnvironment()).osInterface; + auto driverModel = osInterface.getDriverModel(); if (driverModel && (driverModel->getDriverModelType() == NEO::DriverModelType::WDDM)) { pWddm = driverModel->as(); diff --git a/level_zero/sysman/test/unit_tests/sources/frequency/windows/test_zes_frequency.cpp b/level_zero/sysman/test/unit_tests/sources/frequency/windows/test_zes_frequency.cpp index d92b5c790d..a24702f5f7 100644 --- a/level_zero/sysman/test/unit_tests/sources/frequency/windows/test_zes_frequency.cpp +++ b/level_zero/sysman/test/unit_tests/sources/frequency/windows/test_zes_frequency.cpp @@ -53,7 +53,7 @@ class SysmanDeviceFrequencyFixture : public SysmanDeviceFixture { return static_cast(actualClock); } - std::vector get_frequency_handles(uint32_t count) { + std::vector getFrequencyHandles(uint32_t count) { std::vector handles(count, nullptr); EXPECT_EQ(zesDeviceEnumFrequencyDomains(pSysmanDevice->toHandle(), &count, handles.data()), ZE_RESULT_SUCCESS); return handles; @@ -103,7 +103,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenComponentCountZeroWhenEnumeratingFrequ } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetPropertiesThenSuccessIsReturned) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { EXPECT_NE(handle, nullptr); @@ -128,7 +128,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesAllowSetCallsToFalseFrequencyGetPropertiesThenSuccessIsReturned) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { EXPECT_NE(handle, nullptr); @@ -155,7 +155,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = false; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_properties_t properties; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyGetProperties(handle, &properties)); @@ -168,7 +168,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = true; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_SUCCESS; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_properties_t properties; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyGetProperties(handle, &properties)); @@ -178,7 +178,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndZeroCountWhenCallingzesFrequencyGetAvailableClocksThenCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -200,7 +200,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndZeroCountWhenCa } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndCorrectCountWhenCallingzesFrequencyGetAvailableClocksThenCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -223,7 +223,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndCorrectCountWhe } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetRangeThenVerifyzesFrequencyGetRangeTestCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -245,7 +245,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencySetRangeThenVerifyzesFrequencySetRangeTest1CallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -271,7 +271,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencySetRangeThenVerifyzesFrequencySetRangeTest2CallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -310,7 +310,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetStateThenVerifyCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -347,7 +347,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFrequencyStateAndRequestMultipleFailsThenFailureIsReturned) { pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_state_t state = {}; EXPECT_EQ(ZE_RESULT_ERROR_INVALID_SIZE, zesFrequencyGetState(handle, &state)); @@ -358,7 +358,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = true; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_state_t state = {}; EXPECT_EQ(ZE_RESULT_ERROR_INVALID_SIZE, zesFrequencyGetState(handle, &state)); @@ -366,7 +366,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetThrottleTimeThenVerifyCallFails) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_throttle_time_t throttletime = {}; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyGetThrottleTime(handle, &throttletime)); @@ -376,7 +376,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetCapabilitiesThenVerifyCallSucceeds) { pKmdSysManager->allowSetCalls = false; uint32_t domainIndex = 0; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_capabilities_t ocCaps = {}; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetCapabilities(handle, &ocCaps)); @@ -399,7 +399,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetFrequencyTargetThenVerifyCallSucceeds) { uint32_t domainIndex = 0; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double freqTarget = 0.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetFrequencyTarget(handle, &freqTarget)); @@ -409,7 +409,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetFrequencyTargetAndRequestSingleFailsThenFailureIsReturned) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { pKmdSysManager->mockRequestSingle = true; pKmdSysManager->mockRequestSingleResult = ZE_RESULT_ERROR_UNKNOWN; @@ -420,7 +420,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetVoltageTargetThenVerifyCallSucceeds) { uint32_t domainIndex = 0; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 0.0, voltageOffset = 0.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetVoltageTarget(handle, &voltageTarget, &voltageOffset)); @@ -434,7 +434,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = false; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 0.0, voltageOffset = 0.0; EXPECT_EQ(ZE_RESULT_ERROR_INVALID_SIZE, zesFrequencyOcGetVoltageTarget(handle, &voltageTarget, &voltageOffset)); @@ -443,7 +443,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetModeThenVerifyCallSucceeds) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_mode_t mode = ZES_OC_MODE_OFF; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetMode(handle, &mode)); @@ -453,7 +453,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFalseWhenCallingzesFrequencyOcSetFrequencyTargetThenVerifyCallFails) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double freqTarget = 1400.0; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyOcSetFrequencyTarget(handle, freqTarget)); @@ -462,7 +462,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFal TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFalseWhenCallingzesFrequencyOcSetVoltageTargetThenVerifyCallFails) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 1040.0, voltageOffset = 20.0; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyOcSetVoltageTarget(handle, voltageTarget, voltageOffset)); @@ -471,7 +471,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFal TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFalseWhenCallingzesFrequencyOcSetModeThenVerifyCallFails) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_mode_t mode = ZES_OC_MODE_OVERRIDE; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyOcSetMode(handle, mode)); @@ -480,7 +480,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFal TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetFrequencyTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double freqTarget = 1400.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetFrequencyTarget(handle, freqTarget)); @@ -492,7 +492,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetVoltageTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 1040.0, voltageOffset = 20.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetVoltageTarget(handle, voltageTarget, voltageOffset)); @@ -505,7 +505,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetIccMaxTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double setIccMax = 1050.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetIccMax(handle, setIccMax)); @@ -517,7 +517,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetTjMaxTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double setTjMax = 1050.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetTjMax(handle, setTjMax)); @@ -529,7 +529,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetModeThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_mode_t mode = ZES_OC_MODE_INTERPOLATIVE; diff --git a/level_zero/sysman/test/unit_tests/sources/windows/mock_kmd_sys_manager.h b/level_zero/sysman/test/unit_tests/sources/windows/mock_kmd_sys_manager.h index db15276570..388055b19e 100644 --- a/level_zero/sysman/test/unit_tests/sources/windows/mock_kmd_sys_manager.h +++ b/level_zero/sysman/test/unit_tests/sources/windows/mock_kmd_sys_manager.h @@ -24,7 +24,7 @@ struct MockEventHandle { bool inited = false; }; -uint64_t convertTStoMicroSec(uint64_t TS, uint32_t freq); +uint64_t convertTStoMicroSec(uint64_t ts, uint32_t freq); namespace KmdSysman = L0::Sysman::KmdSysman; struct MockKmdSysManager : public L0::Sysman::KmdSysManager { ze_bool_t allowSetCalls = false; diff --git a/level_zero/tools/source/sysman/fan/windows/os_fan_imp.cpp b/level_zero/tools/source/sysman/fan/windows/os_fan_imp.cpp index 6921cbf0b5..61229e51b9 100644 --- a/level_zero/tools/source/sysman/fan/windows/os_fan_imp.cpp +++ b/level_zero/tools/source/sysman/fan/windows/os_fan_imp.cpp @@ -34,8 +34,8 @@ ze_result_t WddmFanImp::getProperties(zes_fan_properties_t *pProperties) { request.requestId = KmdSysman::Requests::Fans::CurrentNumOfControlPoints; request.dataSize = sizeof(uint32_t); - uint32_t FanPoints = 2; - memcpy_s(request.dataBuffer, sizeof(uint32_t), &FanPoints, sizeof(uint32_t)); + uint32_t fanPoints = 2; + memcpy_s(request.dataBuffer, sizeof(uint32_t), &fanPoints, sizeof(uint32_t)); vRequests.push_back(request); @@ -55,8 +55,8 @@ ze_result_t WddmFanImp::getProperties(zes_fan_properties_t *pProperties) { pProperties->canControl = (vResponses[0].returnCode == KmdSysman::Success); if (vResponses[1].returnCode == KmdSysman::Success) { - memcpy_s(&FanPoints, sizeof(uint32_t), vResponses[1].dataBuffer, sizeof(uint32_t)); - pProperties->maxPoints = maxPoints = static_cast(FanPoints); + memcpy_s(&fanPoints, sizeof(uint32_t), vResponses[1].dataBuffer, sizeof(uint32_t)); + pProperties->maxPoints = maxPoints = static_cast(fanPoints); } pProperties->maxRPM = -1; pProperties->supportedModes = zes_fan_speed_mode_t::ZES_FAN_SPEED_MODE_TABLE; @@ -131,13 +131,13 @@ ze_result_t WddmFanImp::setSpeedTableMode(const zes_fan_speed_table_t *pSpeedTab singleRequest.commandId = KmdSysman::Command::Get; singleRequest.componentId = KmdSysman::Component::FanComponent; singleRequest.requestId = KmdSysman::Requests::Fans::MaxFanControlPointsSupported; - uint32_t FanPoints = 2; + uint32_t fanPoints = 2; if (pKmdSysManager->requestSingle(singleRequest, singleResponse) == ZE_RESULT_SUCCESS) { if (singleResponse.returnCode == KmdSysman::Success) { - memcpy_s(&FanPoints, sizeof(uint32_t), singleResponse.dataBuffer, sizeof(uint32_t)); + memcpy_s(&fanPoints, sizeof(uint32_t), singleResponse.dataBuffer, sizeof(uint32_t)); } - maxPoints = static_cast(FanPoints); + maxPoints = static_cast(fanPoints); } if (pSpeedTable->numPoints == 0 || pSpeedTable->numPoints > maxPoints) { diff --git a/level_zero/tools/source/sysman/windows/os_sysman_imp.cpp b/level_zero/tools/source/sysman/windows/os_sysman_imp.cpp index c660a73bdc..cf2aedffd0 100644 --- a/level_zero/tools/source/sysman/windows/os_sysman_imp.cpp +++ b/level_zero/tools/source/sysman/windows/os_sysman_imp.cpp @@ -20,8 +20,8 @@ ze_result_t WddmSysmanImp::init() { pDevice = Device::fromHandle(pParentSysmanDeviceImp->hCoreDevice); UNRECOVERABLE_IF(nullptr == pDevice); - NEO::OSInterface &OsInterface = pDevice->getOsInterface(); - auto driverModel = OsInterface.getDriverModel(); + NEO::OSInterface &osInterface = pDevice->getOsInterface(); + auto driverModel = osInterface.getDriverModel(); if (driverModel) { pWddm = driverModel->as(); } diff --git a/level_zero/tools/test/unit_tests/sources/metrics/windows/test_metric_oa_enumeration_windows.cpp b/level_zero/tools/test/unit_tests/sources/metrics/windows/test_metric_oa_enumeration_windows.cpp index 0c31ba2e7b..9c7296376f 100644 --- a/level_zero/tools/test/unit_tests/sources/metrics/windows/test_metric_oa_enumeration_windows.cpp +++ b/level_zero/tools/test/unit_tests/sources/metrics/windows/test_metric_oa_enumeration_windows.cpp @@ -38,7 +38,7 @@ TEST_F(MetricEnumerationTestWindows, givenCorrectWindowsAdapterWhenGetMetricsAda setupDefaultMocksForMetricDevice(metricsDevice); - std::unique_ptr OAOsInterface = MetricOAOsInterface::create(*device); + std::unique_ptr oaOsInterface = MetricOAOsInterface::create(*device); adapterGroup.GetParamsResult = &adapterGroupParams; adapterGroup.GetAdapterResult = &adapter; @@ -52,7 +52,7 @@ TEST_F(MetricEnumerationTestWindows, givenCorrectWindowsAdapterWhenGetMetricsAda EXPECT_EQ(mockMetricEnumeration->openMetricsDiscovery(), ZE_RESULT_SUCCESS); uint64_t timerResolution; - EXPECT_EQ(OAOsInterface->getMetricsTimerResolution(timerResolution), ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); + EXPECT_EQ(oaOsInterface->getMetricsTimerResolution(timerResolution), ZE_RESULT_ERROR_UNSUPPORTED_FEATURE); } } // namespace ult } // namespace L0 diff --git a/level_zero/tools/test/unit_tests/sources/sysman/frequency/windows/test_zes_frequency.cpp b/level_zero/tools/test/unit_tests/sources/sysman/frequency/windows/test_zes_frequency.cpp index 58c0417b76..4e5f46ea7f 100644 --- a/level_zero/tools/test/unit_tests/sources/sysman/frequency/windows/test_zes_frequency.cpp +++ b/level_zero/tools/test/unit_tests/sources/sysman/frequency/windows/test_zes_frequency.cpp @@ -69,7 +69,7 @@ class SysmanDeviceFrequencyFixture : public SysmanDeviceFixture { return static_cast(actualClock); } - std::vector get_frequency_handles(uint32_t count) { + std::vector getFrequencyHandles(uint32_t count) { std::vector handles(count, nullptr); EXPECT_EQ(zesDeviceEnumFrequencyDomains(device->toHandle(), &count, handles.data()), ZE_RESULT_SUCCESS); return handles; @@ -120,7 +120,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenComponentCountZeroWhenEnumeratingFrequ } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetPropertiesThenSuccessIsReturned) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { EXPECT_NE(handle, nullptr); @@ -145,7 +145,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesAllowSetCallsToFalseFrequencyGetPropertiesThenSuccessIsReturned) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { EXPECT_NE(handle, nullptr); @@ -172,7 +172,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = false; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_properties_t properties; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyGetProperties(handle, &properties)); @@ -185,7 +185,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = true; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_SUCCESS; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_properties_t properties; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyGetProperties(handle, &properties)); @@ -195,7 +195,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndZeroCountWhenCallingzesFrequencyGetAvailableClocksThenCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -217,7 +217,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndZeroCountWhenCa } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndCorrectCountWhenCallingzesFrequencyGetAvailableClocksThenCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -240,7 +240,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAndCorrectCountWhe } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetRangeThenVerifyzesFrequencyGetRangeTestCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -262,7 +262,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingFrequencyGetRangeAndSetRangeThenUnsupportedErrorIsReturnedForMemoryDomain) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { zes_freq_range_t limits; @@ -277,7 +277,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingFrequen } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencySetRangeThenVerifyzesFrequencySetRangeTest1CallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -316,7 +316,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencySetRangeThenVerifyzesFrequencySetRangeTest2CallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -356,7 +356,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetStateThenVerifyCallSucceeds) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); uint32_t domainIndex = 0; for (auto handle : handles) { @@ -393,7 +393,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFrequencyStateAndRequestMultipleFailsThenFailureIsReturned) { pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_state_t state = {}; EXPECT_EQ(ZE_RESULT_ERROR_INVALID_SIZE, zesFrequencyGetState(handle, &state)); @@ -404,7 +404,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = true; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_state_t state = {}; EXPECT_EQ(ZE_RESULT_ERROR_INVALID_SIZE, zesFrequencyGetState(handle, &state)); @@ -412,7 +412,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhileGettingFreque } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyGetThrottleTimeThenVerifyCallFails) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_freq_throttle_time_t throttletime = {}; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyGetThrottleTime(handle, &throttletime)); @@ -422,7 +422,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetCapabilitiesThenVerifyCallSucceeds) { pKmdSysManager->allowSetCalls = false; uint32_t domainIndex = 0; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_capabilities_t ocCaps = {}; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetCapabilities(handle, &ocCaps)); @@ -445,7 +445,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetFrequencyTargetThenVerifyCallSucceeds) { uint32_t domainIndex = 0; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double freqTarget = 0.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetFrequencyTarget(handle, &freqTarget)); @@ -455,7 +455,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq } TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetFrequencyTargetAndRequestSingleFailsThenFailureIsReturned) { - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { pKmdSysManager->mockRequestSingle = true; pKmdSysManager->mockRequestSingleResult = ZE_RESULT_ERROR_UNKNOWN; @@ -466,7 +466,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetVoltageTargetThenVerifyCallSucceeds) { uint32_t domainIndex = 0; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 0.0, voltageOffset = 0.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetVoltageTarget(handle, &voltageTarget, &voltageOffset)); @@ -480,7 +480,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq pKmdSysManager->mockRequestMultiple = true; pKmdSysManager->requestMultipleSizeDiff = false; pKmdSysManager->mockRequestMultipleResult = ZE_RESULT_ERROR_INVALID_SIZE; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 0.0, voltageOffset = 0.0; EXPECT_EQ(ZE_RESULT_ERROR_INVALID_SIZE, zesFrequencyOcGetVoltageTarget(handle, &voltageTarget, &voltageOffset)); @@ -489,7 +489,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFrequencyOcGetModeThenVerifyCallSucceeds) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_mode_t mode = ZES_OC_MODE_OFF; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcGetMode(handle, &mode)); @@ -499,7 +499,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleWhenCallingzesFreq TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFalseWhenCallingzesFrequencyOcSetFrequencyTargetThenVerifyCallFails) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double freqTarget = 1400.0; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyOcSetFrequencyTarget(handle, freqTarget)); @@ -508,7 +508,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFal TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFalseWhenCallingzesFrequencyOcSetVoltageTargetThenVerifyCallFails) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 1040.0, voltageOffset = 20.0; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyOcSetVoltageTarget(handle, voltageTarget, voltageOffset)); @@ -517,7 +517,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFal TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFalseWhenCallingzesFrequencyOcSetModeThenVerifyCallFails) { pKmdSysManager->allowSetCalls = false; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_mode_t mode = ZES_OC_MODE_OVERRIDE; EXPECT_NE(ZE_RESULT_SUCCESS, zesFrequencyOcSetMode(handle, mode)); @@ -526,7 +526,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToFal TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetFrequencyTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double freqTarget = 1400.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetFrequencyTarget(handle, freqTarget)); @@ -538,7 +538,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetVoltageTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double voltageTarget = 1040.0, voltageOffset = 20.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetVoltageTarget(handle, voltageTarget, voltageOffset)); @@ -551,7 +551,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetIccMaxTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double setIccMax = 1050.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetIccMax(handle, setIccMax)); @@ -563,7 +563,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetTjMaxTargetThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { double setTjMax = 1050.0; EXPECT_EQ(ZE_RESULT_SUCCESS, zesFrequencyOcSetTjMax(handle, setTjMax)); @@ -575,7 +575,7 @@ TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTru TEST_F(SysmanDeviceFrequencyFixture, GivenValidFrequencyHandleAllowSetCallsToTrueWhenCallingzesFrequencyOcSetModeThenVerifyCallSucceed) { pKmdSysManager->allowSetCalls = true; - auto handles = get_frequency_handles(frequencyHandleComponentCount); + auto handles = getFrequencyHandles(frequencyHandleComponentCount); for (auto handle : handles) { zes_oc_mode_t mode = ZES_OC_MODE_INTERPOLATIVE; diff --git a/level_zero/tools/test/unit_tests/sources/sysman/windows/mock_kmd_sys_manager.h b/level_zero/tools/test/unit_tests/sources/sysman/windows/mock_kmd_sys_manager.h index 6e3fbed392..cdb91972bd 100644 --- a/level_zero/tools/test/unit_tests/sources/sysman/windows/mock_kmd_sys_manager.h +++ b/level_zero/tools/test/unit_tests/sources/sysman/windows/mock_kmd_sys_manager.h @@ -22,7 +22,7 @@ struct MockEventHandle { bool inited = false; }; -uint64_t convertTStoMicroSec(uint64_t TS, uint32_t freq); +uint64_t convertTStoMicroSec(uint64_t ts, uint32_t freq); class MockKmdSysManager : public KmdSysManager {}; diff --git a/level_zero/tools/test/unit_tests/sources/sysman/windows/test_sysman_manager.cpp b/level_zero/tools/test/unit_tests/sources/sysman/windows/test_sysman_manager.cpp index 992c501192..0ef93d6f2f 100644 --- a/level_zero/tools/test/unit_tests/sources/sysman/windows/test_sysman_manager.cpp +++ b/level_zero/tools/test/unit_tests/sources/sysman/windows/test_sysman_manager.cpp @@ -18,9 +18,9 @@ extern bool sysmanUltsEnable; namespace L0 { namespace ult { -uint64_t convertTStoMicroSec(uint64_t TS, uint32_t freq) { +uint64_t convertTStoMicroSec(uint64_t ts, uint32_t freq) { double timeFactor = 1.0 / static_cast(freq); - timeFactor = static_cast(TS) * timeFactor; + timeFactor = static_cast(ts) * timeFactor; timeFactor *= static_cast(microFacor); return static_cast(timeFactor); } diff --git a/opencl/source/os_interface/windows/d3d10_11_sharing_functions.cpp b/opencl/source/os_interface/windows/d3d10_11_sharing_functions.cpp index 1dc35aa5cc..c9b3f37f56 100644 --- a/opencl/source/os_interface/windows/d3d10_11_sharing_functions.cpp +++ b/opencl/source/os_interface/windows/d3d10_11_sharing_functions.cpp @@ -116,12 +116,12 @@ std::vector &D3DSharingFunctions::retrieveTextureFormats(cl_me bool success; std::tie(cached, success) = textureFormatCache.emplace(imageType, std::vector(0)); if (!success) { - return DXGINoFormats; + return dxgiNoFormats; } - std::vector &cached_formats = cached->second; + std::vector &cachedFormats = cached->second; std::vector planarFormats(0); - constexpr DXGI_FORMAT DXGIFormats[] = { + constexpr DXGI_FORMAT dxgiFormats[] = { DXGI_FORMAT_R32G32B32A32_TYPELESS, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_UINT, @@ -238,19 +238,19 @@ std::vector &D3DSharingFunctions::retrieveTextureFormats(cl_me DXGI_FORMAT_V208, DXGI_FORMAT_V408, DXGI_FORMAT_FORCE_UINT}; - cached_formats.reserve(arrayCount(DXGIFormats)); - for (auto DXGIFormat : DXGIFormats) { + cachedFormats.reserve(arrayCount(dxgiFormats)); + for (auto dxgiFormat : dxgiFormats) { UINT format = 0; - if (checkFormatSupport(DXGIFormat, &format)) { + if (checkFormatSupport(dxgiFormat, &format)) { if (memObjectFormatSupport(imageType, format)) { - cached_formats.push_back(DXGIFormat); - if (D3DSharing::isFormatWithPlane1(DXGIFormat)) { - planarFormats.push_back(DXGIFormat); + cachedFormats.push_back(dxgiFormat); + if (D3DSharing::isFormatWithPlane1(dxgiFormat)) { + planarFormats.push_back(dxgiFormat); } } } } - cached_formats.shrink_to_fit(); + cachedFormats.shrink_to_fit(); textureFormatPlane1Cache.emplace(imageType, planarFormats); } diff --git a/opencl/source/os_interface/windows/d3d9_sharing_functions.cpp b/opencl/source/os_interface/windows/d3d9_sharing_functions.cpp index 4912badfe7..b903b75566 100644 --- a/opencl/source/os_interface/windows/d3d9_sharing_functions.cpp +++ b/opencl/source/os_interface/windows/d3d9_sharing_functions.cpp @@ -31,7 +31,7 @@ void D3DSharingFunctions::fillCreateBufferDesc(D3DBufferDe template <> std::vector &D3DSharingFunctions::retrieveTextureFormats(cl_mem_object_type imageType, cl_uint plane) { - return DXGINoFormats; + return dxgiNoFormats; } template <> diff --git a/opencl/source/os_interface/windows/d3d_sharing_functions.h b/opencl/source/os_interface/windows/d3d_sharing_functions.h index b87cf33318..1a079c03d0 100644 --- a/opencl/source/os_interface/windows/d3d_sharing_functions.h +++ b/opencl/source/os_interface/windows/d3d_sharing_functions.h @@ -171,7 +171,7 @@ class D3DSharingFunctions : public SharingFunctions { D3DDevice *d3dDevice = nullptr; ID3D11DeviceContext *d3d11DeviceContext = nullptr; - std::vector DXGINoFormats; + std::vector dxgiNoFormats; std::vector> trackedResources; std::map> textureFormatCache; std::map> textureFormatPlane1Cache; diff --git a/opencl/source/sharings/d3d/d3d_surface.cpp b/opencl/source/sharings/d3d/d3d_surface.cpp index ce83749b67..8204bcac2d 100644 --- a/opencl/source/sharings/d3d/d3d_surface.cpp +++ b/opencl/source/sharings/d3d/d3d_surface.cpp @@ -228,11 +228,11 @@ const std::vector D3DSurface::D3DPlane2Formats = cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat, cl_uint plane, ImagePlane &imagePlane) { imagePlane = ImagePlane::NO_PLANE; - static const cl_image_format unknown_format = {0, 0}; + static const cl_image_format unknownFormat = {0, 0}; auto element = D3DtoClFormatConversions.find(d3dFormat); if (element == D3DtoClFormatConversions.end()) { - imgFormat = unknown_format; + imgFormat = unknownFormat; return CL_INVALID_IMAGE_FORMAT_DESCRIPTOR; } @@ -250,7 +250,7 @@ cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat imagePlane = ImagePlane::PLANE_UV; return CL_SUCCESS; default: - imgFormat = unknown_format; + imgFormat = unknownFormat; return CL_INVALID_VALUE; } @@ -269,7 +269,7 @@ cl_int D3DSurface::findImgFormat(D3DFORMAT d3dFormat, cl_image_format &imgFormat return CL_SUCCESS; default: - imgFormat = unknown_format; + imgFormat = unknownFormat; return CL_INVALID_VALUE; } } diff --git a/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp b/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp index 94987f9e38..4970683f5a 100644 --- a/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp +++ b/opencl/source/sharings/gl/windows/gl_sharing_windows.cpp @@ -17,14 +17,14 @@ extern const char *openglDllName; namespace NEO { GLSharingFunctionsWindows::GLSharingFunctionsWindows(GLType glhdcType, GLContext glhglrcHandle, GLContext glhglrcHandleBkpCtx, GLDisplay glhdcHandle) - : GLHDCType(glhdcType), GLHGLRCHandle(glhglrcHandle), GLHGLRCHandleBkpCtx(glhglrcHandleBkpCtx), GLHDCHandle(glhdcHandle) { + : glHDCType(glhdcType), glHGLRCHandle(glhglrcHandle), glHGLRCHandleBkpCtx(glhglrcHandleBkpCtx), glHDCHandle(glhdcHandle) { initGLFunctions(); updateOpenGLContext(); createBackupContext(); } GLSharingFunctionsWindows::~GLSharingFunctionsWindows() { if (pfnWglDeleteContext) { - pfnWglDeleteContext(GLHGLRCHandleBkpCtx); + pfnWglDeleteContext(glHGLRCHandleBkpCtx); } } @@ -35,32 +35,32 @@ bool GLSharingFunctionsWindows::isGlSharingEnabled() { void GLSharingFunctionsWindows::createBackupContext() { if (pfnWglCreateContext) { - GLHGLRCHandleBkpCtx = pfnWglCreateContext(GLHDCHandle); - pfnWglShareLists(GLHGLRCHandle, GLHGLRCHandleBkpCtx); + glHGLRCHandleBkpCtx = pfnWglCreateContext(glHDCHandle); + pfnWglShareLists(glHGLRCHandle, glHGLRCHandleBkpCtx); } } GLboolean GLSharingFunctionsWindows::setSharedOCLContextState() { - ContextInfo CtxInfo = {0}; - GLboolean retVal = GLSetSharedOCLContextState(GLHDCHandle, GLHGLRCHandle, CL_TRUE, &CtxInfo); + ContextInfo ctxInfo = {0}; + GLboolean retVal = glSetSharedOCLContextState(glHDCHandle, glHGLRCHandle, CL_TRUE, &ctxInfo); if (retVal == GL_FALSE) { return GL_FALSE; } - GLContextHandle = CtxInfo.contextHandle; - GLDeviceHandle = CtxInfo.deviceHandle; + glContextHandle = ctxInfo.contextHandle; + glDeviceHandle = ctxInfo.deviceHandle; return retVal; } bool GLSharingFunctionsWindows::isOpenGlExtensionSupported(const unsigned char *pExtensionString) { - bool LoadedNull = (glGetStringi == nullptr) || (glGetIntegerv == nullptr); - if (LoadedNull) { + bool loadedNull = (glGetStringi == nullptr) || (glGetIntegerv == nullptr); + if (loadedNull) { return false; } - cl_int NumberOfExtensions = 0; - glGetIntegerv(GL_NUM_EXTENSIONS, &NumberOfExtensions); - for (cl_int i = 0; i < NumberOfExtensions; i++) { + cl_int numberOfExtensions = 0; + glGetIntegerv(GL_NUM_EXTENSIONS, &numberOfExtensions); + for (cl_int i = 0; i < numberOfExtensions; i++) { std::basic_string pString = glGetStringi(GL_EXTENSIONS, i); if (pString == pExtensionString) { return true; @@ -71,10 +71,10 @@ bool GLSharingFunctionsWindows::isOpenGlExtensionSupported(const unsigned char * bool GLSharingFunctionsWindows::isOpenGlSharingSupported() { - std::basic_string Vendor = glGetString(GL_VENDOR); + std::basic_string vendor = glGetString(GL_VENDOR); const unsigned char intelVendor[] = "Intel"; - if ((Vendor.empty()) || (Vendor != intelVendor)) { + if ((vendor.empty()) || (vendor != intelVendor)) { return false; } std::basic_string Version = glGetString(GL_VERSION); @@ -82,13 +82,13 @@ bool GLSharingFunctionsWindows::isOpenGlSharingSupported() { return false; } - bool IsOpenGLES = false; + bool isOpenGLES = false; const unsigned char versionES[] = "OpenGL ES"; if (Version.find(versionES) != std::string::npos) { - IsOpenGLES = true; + isOpenGLES = true; } - if (IsOpenGLES == true) { + if (isOpenGLES == true) { const unsigned char versionES1[] = "OpenGL ES 1."; if (Version.find(versionES1) != std::string::npos) { const unsigned char supportGLOES[] = "GL_OES_framebuffer_object"; @@ -132,8 +132,8 @@ GLboolean GLSharingFunctionsWindows::initGLFunctions() { if (glLibrary->isLoaded()) { GlFunctionHelper wglLibrary(glLibrary.get(), "wglGetProcAddress"); - GLGetCurrentContext = (*glLibrary)["wglGetCurrentContext"]; - GLGetCurrentDisplay = (*glLibrary)["wglGetCurrentDC"]; + glGetCurrentContext = (*glLibrary)["wglGetCurrentContext"]; + glGetCurrentDisplay = (*glLibrary)["wglGetCurrentDC"]; glGetString = (*glLibrary)["glGetString"]; glGetIntegerv = (*glLibrary)["glGetIntegerv"]; pfnWglCreateContext = (*glLibrary)["wglCreateContext"]; @@ -141,16 +141,16 @@ GLboolean GLSharingFunctionsWindows::initGLFunctions() { pfnWglShareLists = (*glLibrary)["wglShareLists"]; wglMakeCurrent = (*glLibrary)["wglMakeCurrent"]; - GLSetSharedOCLContextState = wglLibrary["wglSetSharedOCLContextStateINTEL"]; - GLAcquireSharedBuffer = wglLibrary["wglAcquireSharedBufferINTEL"]; - GLReleaseSharedBuffer = wglLibrary["wglReleaseSharedBufferINTEL"]; - GLAcquireSharedRenderBuffer = wglLibrary["wglAcquireSharedRenderBufferINTEL"]; - GLReleaseSharedRenderBuffer = wglLibrary["wglReleaseSharedRenderBufferINTEL"]; - GLAcquireSharedTexture = wglLibrary["wglAcquireSharedTextureINTEL"]; - GLReleaseSharedTexture = wglLibrary["wglReleaseSharedTextureINTEL"]; - GLRetainSync = wglLibrary["wglRetainSyncINTEL"]; - GLReleaseSync = wglLibrary["wglReleaseSyncINTEL"]; - GLGetSynciv = wglLibrary["wglGetSyncivINTEL"]; + glSetSharedOCLContextState = wglLibrary["wglSetSharedOCLContextStateINTEL"]; + glAcquireSharedBuffer = wglLibrary["wglAcquireSharedBufferINTEL"]; + glReleaseSharedBuffer = wglLibrary["wglReleaseSharedBufferINTEL"]; + glAcquireSharedRenderBuffer = wglLibrary["wglAcquireSharedRenderBufferINTEL"]; + glReleaseSharedRenderBuffer = wglLibrary["wglReleaseSharedRenderBufferINTEL"]; + glAcquireSharedTexture = wglLibrary["wglAcquireSharedTextureINTEL"]; + glReleaseSharedTexture = wglLibrary["wglReleaseSharedTextureINTEL"]; + glRetainSync = wglLibrary["wglRetainSyncINTEL"]; + glReleaseSync = wglLibrary["wglReleaseSyncINTEL"]; + glGetSynciv = wglLibrary["wglGetSyncivINTEL"]; glGetStringi = wglLibrary["glGetStringi"]; glGetLuid = wglLibrary["wglGetLuidINTEL"]; } diff --git a/opencl/source/sharings/gl/windows/gl_sharing_windows.h b/opencl/source/sharings/gl/windows/gl_sharing_windows.h index 421d8a91c6..90417fb9b7 100644 --- a/opencl/source/sharings/gl/windows/gl_sharing_windows.h +++ b/opencl/source/sharings/gl/windows/gl_sharing_windows.h @@ -52,8 +52,8 @@ class GLSharingFunctionsWindows : public GLSharingFunctions { GLSharingFunctionsWindows(GLType glhdcType, GLContext glhglrcHandle, GLContext glhglrcHandleBkpCtx, GLDisplay glhdcHandle); ~GLSharingFunctionsWindows() override; - OS_HANDLE getGLDeviceHandle() const { return GLDeviceHandle; } - OS_HANDLE getGLContextHandle() const { return GLContextHandle; } + OS_HANDLE getGLDeviceHandle() const { return glDeviceHandle; } + OS_HANDLE getGLContextHandle() const { return glContextHandle; } GLboolean initGLFunctions() override; bool isOpenGlSharingSupported() override; @@ -69,49 +69,49 @@ class GLSharingFunctionsWindows : public GLSharingFunctions { // Gl functions GLboolean acquireSharedBufferINTEL(GLvoid *pBufferInfo) { - return GLAcquireSharedBuffer(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pBufferInfo); + return glAcquireSharedBuffer(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pBufferInfo); } GLboolean releaseSharedBufferINTEL(GLvoid *pBufferInfo) { - return GLReleaseSharedBuffer(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pBufferInfo); + return glReleaseSharedBuffer(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pBufferInfo); } GLboolean acquireSharedRenderBuffer(GLvoid *pResourceInfo) { - return GLAcquireSharedRenderBuffer(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pResourceInfo); + return glAcquireSharedRenderBuffer(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pResourceInfo); } GLboolean releaseSharedRenderBuffer(GLvoid *pResourceInfo) { - return GLReleaseSharedRenderBuffer(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pResourceInfo); + return glReleaseSharedRenderBuffer(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pResourceInfo); } GLboolean acquireSharedTexture(GLvoid *pResourceInfo) { - return GLAcquireSharedTexture(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pResourceInfo); + return glAcquireSharedTexture(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pResourceInfo); } GLboolean releaseSharedTexture(GLvoid *pResourceInfo) { - return GLReleaseSharedTexture(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pResourceInfo); + return glReleaseSharedTexture(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pResourceInfo); } GLboolean retainSync(GLvoid *pSyncInfo) { - return GLRetainSync(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pSyncInfo); + return glRetainSync(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pSyncInfo); } GLboolean releaseSync(GLvoid *pSync) { - return GLReleaseSync(GLHDCHandle, GLHGLRCHandle, GLHGLRCHandleBkpCtx, pSync); + return glReleaseSync(glHDCHandle, glHGLRCHandle, glHGLRCHandleBkpCtx, pSync); } void getSynciv(GLvoid *pSync, GLenum pname, GLint *value) { - return GLGetSynciv(pSync, pname, value); + return glGetSynciv(pSync, pname, value); } GLContext getCurrentContext() { - return GLGetCurrentContext(); + return glGetCurrentContext(); } GLDisplay getCurrentDisplay() { - return GLGetCurrentDisplay(); + return glGetCurrentDisplay(); } GLboolean makeCurrent(GLContext contextHandle, GLDisplay displayHandle = 0) { if (displayHandle == 0) { - displayHandle = GLHDCHandle; + displayHandle = glHDCHandle; } return this->wglMakeCurrent(displayHandle, contextHandle); } GLContext getBackupContextHandle() { - return GLHGLRCHandleBkpCtx; + return glHGLRCHandleBkpCtx; } GLContext getContextHandle() { - return GLHGLRCHandle; + return glHGLRCHandle; } bool glArbSyncObjectSetup(OSInterface &osInterface, CL_GL_SYNC_INFO &glSyncInfo) { return pfnGlArbSyncObjectSetup(*this, osInterface, glSyncInfo); @@ -134,7 +134,7 @@ class GLSharingFunctionsWindows : public GLSharingFunctions { protected: void updateOpenGLContext() { - if (GLSetSharedOCLContextState) { + if (glSetSharedOCLContextState) { setSharedOCLContextState(); } } @@ -143,24 +143,24 @@ class GLSharingFunctionsWindows : public GLSharingFunctions { bool isOpenGlExtensionSupported(const unsigned char *pExtentionString); // Handles - GLType GLHDCType = 0; - GLContext GLHGLRCHandle = 0; - GLContext GLHGLRCHandleBkpCtx = 0; - GLDisplay GLHDCHandle = 0; - OS_HANDLE GLDeviceHandle = 0; - OS_HANDLE GLContextHandle = 0; + GLType glHDCType = 0; + GLContext glHGLRCHandle = 0; + GLContext glHGLRCHandleBkpCtx = 0; + GLDisplay glHDCHandle = 0; + OS_HANDLE glDeviceHandle = 0; + OS_HANDLE glContextHandle = 0; // GL functions std::unique_ptr glLibrary; - PFNOGLSetSharedOCLContextStateINTEL GLSetSharedOCLContextState = nullptr; - PFNOGLAcquireSharedBufferINTEL GLAcquireSharedBuffer = nullptr; - PFNOGLReleaseSharedBufferINTEL GLReleaseSharedBuffer = nullptr; - PFNOGLAcquireSharedRenderBufferINTEL GLAcquireSharedRenderBuffer = nullptr; - PFNOGLReleaseSharedRenderBufferINTEL GLReleaseSharedRenderBuffer = nullptr; - PFNOGLAcquireSharedTextureINTEL GLAcquireSharedTexture = nullptr; - PFNOGLReleaseSharedTextureINTEL GLReleaseSharedTexture = nullptr; - PFNOGLGetCurrentContext GLGetCurrentContext = nullptr; - PFNOGLGetCurrentDisplay GLGetCurrentDisplay = nullptr; + PFNOGLSetSharedOCLContextStateINTEL glSetSharedOCLContextState = nullptr; + PFNOGLAcquireSharedBufferINTEL glAcquireSharedBuffer = nullptr; + PFNOGLReleaseSharedBufferINTEL glReleaseSharedBuffer = nullptr; + PFNOGLAcquireSharedRenderBufferINTEL glAcquireSharedRenderBuffer = nullptr; + PFNOGLReleaseSharedRenderBufferINTEL glReleaseSharedRenderBuffer = nullptr; + PFNOGLAcquireSharedTextureINTEL glAcquireSharedTexture = nullptr; + PFNOGLReleaseSharedTextureINTEL glReleaseSharedTexture = nullptr; + PFNOGLGetCurrentContext glGetCurrentContext = nullptr; + PFNOGLGetCurrentDisplay glGetCurrentDisplay = nullptr; PFNglGetString glGetString = nullptr; PFNglGetStringi glGetStringi = nullptr; PFNglGetIntegerv glGetIntegerv = nullptr; @@ -168,9 +168,9 @@ class GLSharingFunctionsWindows : public GLSharingFunctions { PFNwglMakeCurrent wglMakeCurrent = nullptr; PFNwglShareLists pfnWglShareLists = nullptr; PFNwglDeleteContext pfnWglDeleteContext = nullptr; - PFNOGLRetainSyncINTEL GLRetainSync = nullptr; - PFNOGLReleaseSyncINTEL GLReleaseSync = nullptr; - PFNOGLGetSyncivINTEL GLGetSynciv = nullptr; + PFNOGLRetainSyncINTEL glRetainSync = nullptr; + PFNOGLReleaseSyncINTEL glReleaseSync = nullptr; + PFNOGLGetSyncivINTEL glGetSynciv = nullptr; PFNglArbSyncObjectSetup pfnGlArbSyncObjectSetup = nullptr; PFNglArbSyncObjectCleanup pfnGlArbSyncObjectCleanup = nullptr; PFNglArbSyncObjectSignal pfnGlArbSyncObjectSignal = nullptr; diff --git a/opencl/source/sharings/gl/windows/gl_texture_windows.cpp b/opencl/source/sharings/gl/windows/gl_texture_windows.cpp index 5182ea8098..d194eef8e4 100644 --- a/opencl/source/sharings/gl/windows/gl_texture_windows.cpp +++ b/opencl/source/sharings/gl/windows/gl_texture_windows.cpp @@ -95,12 +95,12 @@ Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl } if (imgDesc.image_array_size > 1 || imgDesc.image_depth > 1) { - GMM_REQ_OFFSET_INFO GMMReqInfo = {}; - GMMReqInfo.ArrayIndex = imgDesc.image_array_size > 1 ? 1 : 0; - GMMReqInfo.Slice = imgDesc.image_depth > 1 ? 1 : 0; - GMMReqInfo.ReqLock = 1; - gmm->gmmResourceInfo->getOffset(GMMReqInfo); - imgDesc.image_slice_pitch = GMMReqInfo.Lock.Offset; + GMM_REQ_OFFSET_INFO gmmReqInfo = {}; + gmmReqInfo.ArrayIndex = imgDesc.image_array_size > 1 ? 1 : 0; + gmmReqInfo.Slice = imgDesc.image_depth > 1 ? 1 : 0; + gmmReqInfo.ReqLock = 1; + gmm->gmmResourceInfo->getOffset(gmmReqInfo); + imgDesc.image_slice_pitch = gmmReqInfo.Lock.Offset; } else { imgDesc.image_slice_pitch = alloc->getUnderlyingBufferSize(); } diff --git a/opencl/source/sharings/gl/windows/win_enable_gl.cpp b/opencl/source/sharings/gl/windows/win_enable_gl.cpp index c7ffe66f62..918cf29ead 100644 --- a/opencl/source/sharings/gl/windows/win_enable_gl.cpp +++ b/opencl/source/sharings/gl/windows/win_enable_gl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,19 +27,19 @@ bool GlSharingContextBuilder::processProperties(cl_context_properties &propertyT switch (propertyType) { case CL_GL_CONTEXT_KHR: - contextData->GLHGLRCHandle = (GLContext)propertyValue; + contextData->glHGLRCHandle = (GLContext)propertyValue; return true; case CL_WGL_HDC_KHR: contextData->GLHDCType = (GLType)CL_WGL_HDC_KHR; - contextData->GLHDCHandle = (GLDisplay)propertyValue; + contextData->glHDCHandle = (GLDisplay)propertyValue; return true; case CL_GLX_DISPLAY_KHR: contextData->GLHDCType = (GLType)CL_GLX_DISPLAY_KHR; - contextData->GLHDCHandle = (GLDisplay)propertyValue; + contextData->glHDCHandle = (GLDisplay)propertyValue; return true; case CL_EGL_DISPLAY_KHR: contextData->GLHDCType = (GLType)CL_EGL_DISPLAY_KHR; - contextData->GLHDCHandle = (GLDisplay)propertyValue; + contextData->glHDCHandle = (GLDisplay)propertyValue; return true; } return false; @@ -49,9 +49,9 @@ bool GlSharingContextBuilder::finalizeProperties(Context &context, int32_t &errc if (contextData.get() == nullptr) return true; - if (contextData->GLHGLRCHandle) { - context.registerSharing(new GLSharingFunctionsWindows(contextData->GLHDCType, contextData->GLHGLRCHandle, - nullptr, contextData->GLHDCHandle)); + if (contextData->glHGLRCHandle) { + context.registerSharing(new GLSharingFunctionsWindows(contextData->GLHDCType, contextData->glHGLRCHandle, + nullptr, contextData->glHDCHandle)); } contextData.reset(nullptr); diff --git a/opencl/source/sharings/gl/windows/win_enable_gl.h b/opencl/source/sharings/gl/windows/win_enable_gl.h index a192867684..f42495f38f 100644 --- a/opencl/source/sharings/gl/windows/win_enable_gl.h +++ b/opencl/source/sharings/gl/windows/win_enable_gl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,8 +16,8 @@ class Context; struct GlCreateContextProperties { GLType GLHDCType = 0; - GLContext GLHGLRCHandle = 0; - GLDisplay GLHDCHandle = 0; + GLContext glHGLRCHandle = 0; + GLDisplay glHDCHandle = 0; }; class GlSharingContextBuilder : public SharingContextBuilder { diff --git a/opencl/test/unit_test/d3d_sharing/cl_dx_sharing_tests.cpp b/opencl/test/unit_test/d3d_sharing/cl_dx_sharing_tests.cpp index 21ff80ced9..3a42541424 100644 --- a/opencl/test/unit_test/d3d_sharing/cl_dx_sharing_tests.cpp +++ b/opencl/test/unit_test/d3d_sharing/cl_dx_sharing_tests.cpp @@ -143,7 +143,7 @@ static const DXGI_FORMAT DXGIformats[] = { DXGI_FORMAT_FORCE_UINT}; template -struct clIntelSharingFormatQueryDX1X : public PlatformFixture, public ::testing::Test { +struct ClIntelSharingFormatQueryDX1X : public PlatformFixture, public ::testing::Test { std::vector retrievedFormats; ArrayRef availableFormats; @@ -185,8 +185,8 @@ IDXGIAdapter *MockD3DSharingFunctions::getDxgiDescAdapter template <> IDXGIAdapter *MockD3DSharingFunctions::getDxgiDescAdapterRequested{}; -typedef clIntelSharingFormatQueryDX1X clIntelSharingFormatQueryDX10; -typedef clIntelSharingFormatQueryDX1X clIntelSharingFormatQueryDX11; +typedef ClIntelSharingFormatQueryDX1X clIntelSharingFormatQueryDX10; +typedef ClIntelSharingFormatQueryDX1X clIntelSharingFormatQueryDX11; TEST_F(clIntelSharingFormatQueryDX10, givenInvalidContextWhenDX10TextureFormatsRequestedThenInvalidContextError) { retVal = clGetSupportedD3D10TextureFormatsINTEL(NULL, CL_MEM_READ_WRITE, 0, diff --git a/opencl/test/unit_test/mocks/gl/windows/mock_gl_sharing_windows.h b/opencl/test/unit_test/mocks/gl/windows/mock_gl_sharing_windows.h index 1a3be2810f..7cbec96aab 100644 --- a/opencl/test/unit_test/mocks/gl/windows/mock_gl_sharing_windows.h +++ b/opencl/test/unit_test/mocks/gl/windows/mock_gl_sharing_windows.h @@ -81,21 +81,21 @@ class GlSharingFunctionsMock : public GLSharingFunctionsWindows { }; ~GlSharingFunctionsMock() override = default; - using GLSharingFunctionsWindows::GLAcquireSharedBuffer; - using GLSharingFunctionsWindows::GLAcquireSharedRenderBuffer; - using GLSharingFunctionsWindows::GLAcquireSharedTexture; - using GLSharingFunctionsWindows::GLGetCurrentContext; - using GLSharingFunctionsWindows::GLGetCurrentDisplay; + using GLSharingFunctionsWindows::glAcquireSharedBuffer; + using GLSharingFunctionsWindows::glAcquireSharedRenderBuffer; + using GLSharingFunctionsWindows::glAcquireSharedTexture; + using GLSharingFunctionsWindows::glGetCurrentContext; + using GLSharingFunctionsWindows::glGetCurrentDisplay; using GLSharingFunctionsWindows::glGetIntegerv; using GLSharingFunctionsWindows::glGetString; using GLSharingFunctionsWindows::glGetStringi; - using GLSharingFunctionsWindows::GLGetSynciv; - using GLSharingFunctionsWindows::GLReleaseSharedBuffer; - using GLSharingFunctionsWindows::GLReleaseSharedRenderBuffer; - using GLSharingFunctionsWindows::GLReleaseSharedTexture; - using GLSharingFunctionsWindows::GLReleaseSync; - using GLSharingFunctionsWindows::GLRetainSync; - using GLSharingFunctionsWindows::GLSetSharedOCLContextState; + using GLSharingFunctionsWindows::glGetSynciv; + using GLSharingFunctionsWindows::glReleaseSharedBuffer; + using GLSharingFunctionsWindows::glReleaseSharedRenderBuffer; + using GLSharingFunctionsWindows::glReleaseSharedTexture; + using GLSharingFunctionsWindows::glReleaseSync; + using GLSharingFunctionsWindows::glRetainSync; + using GLSharingFunctionsWindows::glSetSharedOCLContextState; using GLSharingFunctionsWindows::isOpenGlExtensionSupported; using GLSharingFunctionsWindows::pfnWglCreateContext; using GLSharingFunctionsWindows::pfnWglDeleteContext; @@ -104,8 +104,8 @@ class GlSharingFunctionsMock : public GLSharingFunctionsWindows { using GLSharingFunctionsWindows::wglMakeCurrent; using GLSharingFunctionsWindows::glArbEventMapping; - using GLSharingFunctionsWindows::GLContextHandle; - using GLSharingFunctionsWindows::GLDeviceHandle; + using GLSharingFunctionsWindows::glContextHandle; + using GLSharingFunctionsWindows::glDeviceHandle; using GLSharingFunctionsWindows::getSupportedFormats; using GLSharingFunctionsWindows::pfnGlArbSyncObjectCleanup; @@ -113,30 +113,30 @@ class GlSharingFunctionsMock : public GLSharingFunctionsWindows { using GLSharingFunctionsWindows::pfnGlArbSyncObjectSignal; using GLSharingFunctionsWindows::pfnGlArbSyncObjectWaitServer; - GlSharingFunctionsMock(GLType GLHDCType, GLContext GLHGLRCHandle, GLContext GLHGLRCHandleBkpCtx, GLDisplay GLHDCHandle) - : GLSharingFunctionsWindows(GLHDCType, GLHGLRCHandle, GLHGLRCHandleBkpCtx, GLHDCHandle) { + GlSharingFunctionsMock(GLType GLHDCType, GLContext glHGLRCHandle, GLContext glHGLRCHandleBkpCtx, GLDisplay glHDCHandle) + : GLSharingFunctionsWindows(GLHDCType, glHGLRCHandle, glHGLRCHandleBkpCtx, glHDCHandle) { initMembers(); updateOpenGLContext(); createBackupContext(); } GlSharingFunctionsMock(); - void setHandles(GLType GLHDCType, GLContext GLHGLRCHandle, GLContext GLHGLRCHandleBkpCtx, GLDisplay GLHDCHandle) { - this->GLHDCType = GLHDCType; - this->GLHGLRCHandle = GLHGLRCHandle; - this->GLHGLRCHandleBkpCtx = GLHGLRCHandleBkpCtx; - this->GLHDCHandle = GLHDCHandle; + void setHandles(GLType GLHDCType, GLContext glHGLRCHandle, GLContext glHGLRCHandleBkpCtx, GLDisplay glHDCHandle) { + this->glHDCType = GLHDCType; + this->glHGLRCHandle = glHGLRCHandle; + this->glHGLRCHandleBkpCtx = glHGLRCHandleBkpCtx; + this->glHDCHandle = glHDCHandle; } - void setGLAcquireSharedBufferMock(PFNOGLAcquireSharedBufferINTEL mock) { GLAcquireSharedBuffer = mock; } + void setGLAcquireSharedBufferMock(PFNOGLAcquireSharedBufferINTEL mock) { glAcquireSharedBuffer = mock; } - void setGLAcquireSharedTextureMock(PFNOGLAcquireSharedTextureINTEL mock) { GLAcquireSharedTexture = mock; } + void setGLAcquireSharedTextureMock(PFNOGLAcquireSharedTextureINTEL mock) { glAcquireSharedTexture = mock; } }; class MockGlSharing { public: MockGlSharing() {} - MockGlSharing(GLType GLHDCType, GLContext GLHGLRCHandle, GLContext GLHGLRCHandleBkpCtx, GLDisplay GLHDCHandle); + MockGlSharing(GLType GLHDCType, GLContext glHGLRCHandle, GLContext glHGLRCHandleBkpCtx, GLDisplay glHDCHandle); void uploadDataToBufferInfo() { dllParam->loadBuffer(bufferInfoOutput); } diff --git a/opencl/test/unit_test/sharings/gl/windows/gl_create_from_texture_tests.cpp b/opencl/test/unit_test/sharings/gl/windows/gl_create_from_texture_tests.cpp index d57b05ea28..a415ff6c01 100644 --- a/opencl/test/unit_test/sharings/gl/windows/gl_create_from_texture_tests.cpp +++ b/opencl/test/unit_test/sharings/gl/windows/gl_create_from_texture_tests.cpp @@ -171,17 +171,17 @@ TEST_P(CreateFromGlTextureTestsWithParams, givenAllTextureSpecificParamsWhenCrea EXPECT_EQ(glImage->getImageDesc().image_row_pitch, gmmRowPitch); } - size_t ImageInfoRowPitch = 0; - retVal = clGetImageInfo(glImage, CL_IMAGE_ROW_PITCH, sizeof(size_t), &ImageInfoRowPitch, NULL); + size_t imageInfoRowPitch = 0; + retVal = clGetImageInfo(glImage, CL_IMAGE_ROW_PITCH, sizeof(size_t), &imageInfoRowPitch, NULL); ASSERT_EQ(CL_SUCCESS, retVal); - ASSERT_EQ(rowPitch, ImageInfoRowPitch); + ASSERT_EQ(rowPitch, imageInfoRowPitch); - size_t ImageInfoSlicePitch = 0; + size_t imageInfoSlicePitch = 0; slicePitch *= !(glImage->getImageDesc().image_type == CL_MEM_OBJECT_IMAGE2D || glImage->getImageDesc().image_type == CL_MEM_OBJECT_IMAGE1D || glImage->getImageDesc().image_type == CL_MEM_OBJECT_IMAGE1D_BUFFER); - retVal = clGetImageInfo(glImage, CL_IMAGE_SLICE_PITCH, sizeof(size_t), &ImageInfoSlicePitch, NULL); + retVal = clGetImageInfo(glImage, CL_IMAGE_SLICE_PITCH, sizeof(size_t), &imageInfoSlicePitch, NULL); ASSERT_EQ(CL_SUCCESS, retVal); - ASSERT_EQ(slicePitch, ImageInfoSlicePitch); + ASSERT_EQ(slicePitch, imageInfoSlicePitch); } EXPECT_EQ(glImage->getImageDesc().image_height, gmm->gmmResourceInfo->getBaseHeight()); @@ -193,12 +193,12 @@ TEST_P(CreateFromGlTextureTestsWithParams, givenAllTextureSpecificParamsWhenCrea } if (imgDesc.imageArraySize > 1 || imgDesc.imageDepth > 1) { - GMM_REQ_OFFSET_INFO GMMReqInfo = {}; - GMMReqInfo.ArrayIndex = imgDesc.imageArraySize > 1 ? 1 : 0; - GMMReqInfo.Slice = imgDesc.imageDepth > 1 ? 1 : 0; - GMMReqInfo.ReqLock = 1; - gmm->gmmResourceInfo->getOffset(GMMReqInfo); - size_t expectedSlicePitch = GMMReqInfo.Lock.Offset; + GMM_REQ_OFFSET_INFO gmmReqInfo = {}; + gmmReqInfo.ArrayIndex = imgDesc.imageArraySize > 1 ? 1 : 0; + gmmReqInfo.Slice = imgDesc.imageDepth > 1 ? 1 : 0; + gmmReqInfo.ReqLock = 1; + gmm->gmmResourceInfo->getOffset(gmmReqInfo); + size_t expectedSlicePitch = gmmReqInfo.Lock.Offset; EXPECT_EQ(glImage->getImageDesc().image_slice_pitch, expectedSlicePitch); } else { EXPECT_EQ(glImage->getImageDesc().image_slice_pitch, imgInfo.size); diff --git a/opencl/test/unit_test/sharings/gl/windows/gl_os_sharing_tests.cpp b/opencl/test/unit_test/sharings/gl/windows/gl_os_sharing_tests.cpp index ea3df3b6fe..7fbc254c5a 100644 --- a/opencl/test/unit_test/sharings/gl/windows/gl_os_sharing_tests.cpp +++ b/opencl/test/unit_test/sharings/gl/windows/gl_os_sharing_tests.cpp @@ -47,12 +47,12 @@ struct MockOSInterface : OSInterface { TEST(glSharingBasicTest, GivenSharingFunctionsWhenItIsConstructedThenBackupContextIsCreated) { GLType GLHDCType = CL_WGL_HDC_KHR; - GLContext GLHGLRCHandle = 0; - GLDisplay GLHDCHandle = 0; + GLContext glHGLRCHandle = 0; + GLDisplay glHDCHandle = 0; int32_t expectedContextAttrs[3] = {0}; GlDllHelper dllHelper; - auto glSharingFunctions = new GlSharingFunctionsMock(GLHDCType, GLHGLRCHandle, GLHGLRCHandle, GLHDCHandle); + auto glSharingFunctions = new GlSharingFunctionsMock(GLHDCType, glHGLRCHandle, glHGLRCHandle, glHDCHandle); EXPECT_EQ(1, dllHelper.getParam("WGLCreateContextCalled")); EXPECT_EQ(1, dllHelper.getParam("WGLShareListsCalled")); @@ -77,8 +77,8 @@ TEST(glSharingBasicTest, GivenSharingFunctionsWhenItIsConstructedThenBackupConte struct GlArbSyncEventOsTest : public ::testing::Test { void SetUp() override { rootDeviceEnvironment = std::make_unique(executionEnvironment); - sharing.GLContextHandle = 0x2cU; - sharing.GLDeviceHandle = 0x3cU; + sharing.glContextHandle = 0x2cU; + sharing.glDeviceHandle = 0x3cU; wddm = new WddmMock(*rootDeviceEnvironment); rootDeviceEnvironment->osInterface = std::make_unique(); osInterface = rootDeviceEnvironment->osInterface.get(); @@ -144,7 +144,7 @@ TEST_F(GlArbSyncEventOsTest, WhenCreateSynchronizationObjectSucceedsThenAllHAndl EXPECT_EQ(1U, syncInfo.serverSynchronizationObject); EXPECT_EQ(2U, syncInfo.clientSynchronizationObject); EXPECT_EQ(3U, syncInfo.submissionSynchronizationObject); - EXPECT_EQ(sharing.GLContextHandle, syncInfo.hContextToBlock); + EXPECT_EQ(sharing.glContextHandle, syncInfo.hContextToBlock); EXPECT_NE(nullptr, syncInfo.event); EXPECT_NE(nullptr, syncInfo.eventName); EXPECT_NE(nullptr, syncInfo.submissionEvent); diff --git a/opencl/test/unit_test/sharings/gl/windows/gl_sharing_tests.cpp b/opencl/test/unit_test/sharings/gl/windows/gl_sharing_tests.cpp index 85211dc086..e9341d7877 100644 --- a/opencl/test/unit_test/sharings/gl/windows/gl_sharing_tests.cpp +++ b/opencl/test/unit_test/sharings/gl/windows/gl_sharing_tests.cpp @@ -638,41 +638,41 @@ TEST_F(glSharingTests, givenMockGLWhenFunctionsAreCalledThenCallsAreReceived) { } TEST(glSharingBasicTest, GivenSharingFunctionsWhenItIsConstructedThenOglContextFunctionIsCalled) { - GLType GLHDCType = 0; - GLContext GLHGLRCHandle = 0; - GLDisplay GLHDCHandle = 0; + GLType glHDCType = 0; + GLContext glHGLRCHandle = 0; + GLDisplay glHDCHandle = 0; GlDllHelper getDllParam; - GlSharingFunctionsMock glSharingFunctions(GLHDCType, GLHGLRCHandle, GLHGLRCHandle, GLHDCHandle); + GlSharingFunctionsMock glSharingFunctions(glHDCType, glHGLRCHandle, glHGLRCHandle, glHDCHandle); EXPECT_EQ(1, getDllParam.getGLSetSharedOCLContextStateReturnedValue()); } TEST(glSharingBasicTest, givenInvalidExtensionNameWhenCheckGLExtensionSupportedThenReturnFalse) { MockGLSharingFunctions glSharingFunctions; const unsigned char invalidExtension[] = "InvalidExtensionName"; - bool RetVal = glSharingFunctions.isOpenGlExtensionSupported(invalidExtension); - EXPECT_FALSE(RetVal); + bool retVal = glSharingFunctions.isOpenGlExtensionSupported(invalidExtension); + EXPECT_FALSE(retVal); } TEST(glSharingBasicTest, givenglGetIntegervIsNullWhenCheckGLExtensionSupportedThenReturnFalse) { MockGLSharingFunctions glSharingFunctions; glSharingFunctions.glGetIntegerv = nullptr; const unsigned char invalidExtension[] = "InvalidExtensionName"; - bool RetVal = glSharingFunctions.isOpenGlExtensionSupported(invalidExtension); - EXPECT_FALSE(RetVal); + bool retVal = glSharingFunctions.isOpenGlExtensionSupported(invalidExtension); + EXPECT_FALSE(retVal); } TEST(glSharingBasicTest, givenValidExtensionNameWhenCheckGLExtensionSupportedThenReturnTrue) { MockGLSharingFunctions glSharingFunctions; const unsigned char supportGLOES[] = "GL_OES_framebuffer_object"; - bool RetVal = glSharingFunctions.isOpenGlExtensionSupported(supportGLOES); - EXPECT_TRUE(RetVal); + bool retVal = glSharingFunctions.isOpenGlExtensionSupported(supportGLOES); + EXPECT_TRUE(retVal); } TEST(glSharingBasicTest, givenWhenCheckGLSharingSupportedThenReturnTrue) { MockGLSharingFunctions glSharingFunctions; - bool RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_TRUE(RetVal); + bool retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_TRUE(retVal); } TEST(glSharingBasicTest, givenVendorisNullWhenCheckGLSharingSupportedThenReturnFalse) { @@ -683,48 +683,48 @@ TEST(glSharingBasicTest, givenVendorisNullWhenCheckGLSharingSupportedThenReturnF MockGLSharingFunctions glSharingFunctions; glSharingFunctions.glGetString = invalidGetStringFcn; - bool RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_FALSE(RetVal); + bool retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_FALSE(retVal); } TEST(glSharingBasicTest, givenVersionisNullWhenCheckGLSharingSupportedThenReturnFalse) { MockGLSharingFunctions glSharingFunctions; glSharingFunctions.dllParam->glSetString("", GL_VERSION); // version returns null - bool RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_FALSE(RetVal); + bool retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_FALSE(retVal); glSharingFunctions.dllParam->glSetString("Int..", GL_VENDOR); - RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_FALSE(RetVal); + retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_FALSE(retVal); } TEST(glSharingBasicTest, givenVersionisGlesWhenCheckGLSharingSupportedThenReturnFalse) { MockGLSharingFunctions glSharingFunctions; glSharingFunctions.dllParam->glSetString("OpenGL ES", GL_VERSION); - bool RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_TRUE(RetVal); + bool retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_TRUE(retVal); glSharingFunctions.dllParam->glSetString("OpenGL ES 1.", GL_VERSION); - RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_TRUE(RetVal); + retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_TRUE(retVal); glSharingFunctions.dllParam->glSetString("2.0", GL_VERSION); - RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_TRUE(RetVal); + retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_TRUE(retVal); glSharingFunctions.dllParam->glSetStringi("GL_EXT_framebuffer_o...", 1); - RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_FALSE(RetVal); + retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_FALSE(retVal); glSharingFunctions.dllParam->glSetStringi("GL_EXT_framebuffer_object", 1); - RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_TRUE(RetVal); + retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_TRUE(retVal); glSharingFunctions.dllParam->glSetString("OpenGL ES 1.", GL_VERSION); glSharingFunctions.dllParam->glSetStringi("GL_OES_framebuffer_o...", 0); - RetVal = glSharingFunctions.isOpenGlSharingSupported(); - EXPECT_FALSE(RetVal); + retVal = glSharingFunctions.isOpenGlSharingSupported(); + EXPECT_FALSE(retVal); } TEST(glSharingBasicTest, givensetSharedOCLContextStateWhenCallThenCorrectValue) { @@ -735,41 +735,41 @@ TEST(glSharingBasicTest, givensetSharedOCLContextStateWhenCallThenCorrectValue) EXPECT_EQ(1u, glSharingFunctions.setSharedOCLContextState()); } TEST(glSharingBasicTest, givenGlSharingFunctionsWhenItIsConstructedThenFunctionsAreLoaded) { - GLType GLHDCType = 0; - GLContext GLHGLRCHandle = 0; - GLDisplay GLHDCHandle = 0; + GLType glHDCType = 0; + GLContext glHGLRCHandle = 0; + GLDisplay glHDCHandle = 0; - GlSharingFunctionsMock glSharingFunctions(GLHDCType, GLHGLRCHandle, GLHGLRCHandle, GLHDCHandle); + GlSharingFunctionsMock glSharingFunctions(glHDCType, glHGLRCHandle, glHGLRCHandle, glHDCHandle); - EXPECT_NE(nullptr, glSharingFunctions.GLGetCurrentContext); - EXPECT_NE(nullptr, glSharingFunctions.GLGetCurrentDisplay); + EXPECT_NE(nullptr, glSharingFunctions.glGetCurrentContext); + EXPECT_NE(nullptr, glSharingFunctions.glGetCurrentDisplay); EXPECT_NE(nullptr, glSharingFunctions.glGetString); EXPECT_NE(nullptr, glSharingFunctions.glGetIntegerv); EXPECT_NE(nullptr, glSharingFunctions.pfnWglCreateContext); EXPECT_NE(nullptr, glSharingFunctions.pfnWglDeleteContext); EXPECT_NE(nullptr, glSharingFunctions.pfnWglShareLists); EXPECT_NE(nullptr, glSharingFunctions.wglMakeCurrent); - EXPECT_NE(nullptr, glSharingFunctions.GLSetSharedOCLContextState); - EXPECT_NE(nullptr, glSharingFunctions.GLAcquireSharedBuffer); - EXPECT_NE(nullptr, glSharingFunctions.GLReleaseSharedBuffer); - EXPECT_NE(nullptr, glSharingFunctions.GLAcquireSharedRenderBuffer); - EXPECT_NE(nullptr, glSharingFunctions.GLReleaseSharedRenderBuffer); - EXPECT_NE(nullptr, glSharingFunctions.GLAcquireSharedTexture); - EXPECT_NE(nullptr, glSharingFunctions.GLReleaseSharedTexture); - EXPECT_NE(nullptr, glSharingFunctions.GLRetainSync); - EXPECT_NE(nullptr, glSharingFunctions.GLReleaseSync); - EXPECT_NE(nullptr, glSharingFunctions.GLGetSynciv); + EXPECT_NE(nullptr, glSharingFunctions.glSetSharedOCLContextState); + EXPECT_NE(nullptr, glSharingFunctions.glAcquireSharedBuffer); + EXPECT_NE(nullptr, glSharingFunctions.glReleaseSharedBuffer); + EXPECT_NE(nullptr, glSharingFunctions.glAcquireSharedRenderBuffer); + EXPECT_NE(nullptr, glSharingFunctions.glReleaseSharedRenderBuffer); + EXPECT_NE(nullptr, glSharingFunctions.glAcquireSharedTexture); + EXPECT_NE(nullptr, glSharingFunctions.glReleaseSharedTexture); + EXPECT_NE(nullptr, glSharingFunctions.glRetainSync); + EXPECT_NE(nullptr, glSharingFunctions.glReleaseSync); + EXPECT_NE(nullptr, glSharingFunctions.glGetSynciv); EXPECT_NE(nullptr, glSharingFunctions.glGetStringi); } TEST(glSharingBasicTest, givenNumEntriesLowerThanSupportedFormatsWhenGettingSupportedFormatsThenOnlyNumEntiresAreReturned) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags = CL_MEM_READ_WRITE; - cl_mem_object_type image_type = CL_MEM_OBJECT_IMAGE2D; + cl_mem_object_type imageType = CL_MEM_OBJECT_IMAGE2D; cl_uint numImageFormats = 0; cl_GLenum glFormats[3] = {}; - auto retVal = glSharingFunctions.getSupportedFormats(flags, image_type, 1, glFormats, &numImageFormats); + auto retVal = glSharingFunctions.getSupportedFormats(flags, imageType, 1, glFormats, &numImageFormats); EXPECT_EQ(CL_SUCCESS, retVal); @@ -782,13 +782,13 @@ TEST(glSharingBasicTest, givenNumEntriesLowerThanSupportedFormatsWhenGettingSupp TEST(glSharingBasicTest, givenCorrectFlagsWhenGettingSupportedFormatsThenCorrectListIsReturned) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags[] = {CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY, CL_MEM_READ_WRITE, CL_MEM_KERNEL_READ_AND_WRITE}; - cl_mem_object_type image_type = CL_MEM_OBJECT_IMAGE2D; + cl_mem_object_type imageType = CL_MEM_OBJECT_IMAGE2D; cl_GLenum glFormats[3] = {}; cl_uint numImageFormats = 0; for (auto flag : flags) { - auto result = glSharingFunctions.getSupportedFormats(flag, image_type, arrayCount(glFormats), glFormats, &numImageFormats); + auto result = glSharingFunctions.getSupportedFormats(flag, imageType, arrayCount(glFormats), glFormats, &numImageFormats); EXPECT_EQ(CL_SUCCESS, result); EXPECT_EQ(static_cast(GlSharing::glToCLFormats.size()), numImageFormats); @@ -802,13 +802,13 @@ TEST(glSharingBasicTest, givenCorrectFlagsWhenGettingSupportedFormatsThenCorrect TEST(glSharingBasicTest, givenSupportedImageTypesWhenGettingSupportedFormatsThenCorrectListIsReturned) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags = CL_MEM_READ_WRITE; - cl_mem_object_type image_types[] = {CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE1D_BUFFER, CL_MEM_OBJECT_IMAGE2D_ARRAY}; + cl_mem_object_type imageTypes[] = {CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE1D_BUFFER, CL_MEM_OBJECT_IMAGE2D_ARRAY}; cl_GLenum glFormats[3] = {}; cl_uint numImageFormats = 0; - for (auto image_type : image_types) { + for (auto imageType : imageTypes) { - auto result = glSharingFunctions.getSupportedFormats(flags, image_type, arrayCount(glFormats), glFormats, &numImageFormats); + auto result = glSharingFunctions.getSupportedFormats(flags, imageType, arrayCount(glFormats), glFormats, &numImageFormats); EXPECT_EQ(CL_SUCCESS, result); EXPECT_EQ(static_cast(GlSharing::glToCLFormats.size()), numImageFormats); @@ -822,10 +822,10 @@ TEST(glSharingBasicTest, givenSupportedImageTypesWhenGettingSupportedFormatsThen TEST(glSharingBasicTest, givenZeroNumEntriesWhenGettingSupportedFormatsThenNumFormatsIsReturned) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags = CL_MEM_READ_WRITE; - cl_mem_object_type image_type = CL_MEM_OBJECT_IMAGE2D; + cl_mem_object_type imageType = CL_MEM_OBJECT_IMAGE2D; cl_uint numImageFormats = 0; - auto result = glSharingFunctions.getSupportedFormats(flags, image_type, 0, nullptr, &numImageFormats); + auto result = glSharingFunctions.getSupportedFormats(flags, imageType, 0, nullptr, &numImageFormats); EXPECT_EQ(CL_SUCCESS, result); EXPECT_EQ(static_cast(GlSharing::glToCLFormats.size()), numImageFormats); @@ -834,9 +834,9 @@ TEST(glSharingBasicTest, givenZeroNumEntriesWhenGettingSupportedFormatsThenNumFo TEST(glSharingBasicTest, givenNullNumImageFormatsWhenGettingSupportedFormatsThenNumFormatsIsNotDereferenced) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags = CL_MEM_READ_WRITE; - cl_mem_object_type image_type = CL_MEM_OBJECT_IMAGE2D; + cl_mem_object_type imageType = CL_MEM_OBJECT_IMAGE2D; - auto result = glSharingFunctions.getSupportedFormats(flags, image_type, 0, nullptr, nullptr); + auto result = glSharingFunctions.getSupportedFormats(flags, imageType, 0, nullptr, nullptr); EXPECT_EQ(CL_SUCCESS, result); } @@ -844,11 +844,11 @@ TEST(glSharingBasicTest, givenNullNumImageFormatsWhenGettingSupportedFormatsThen TEST(glSharingBasicTest, givenInvalidImageTypeWhenGettingSupportedFormatsThenIvalidValueErrorIsReturned) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags = CL_MEM_READ_WRITE; - cl_mem_object_type image_type = CL_MEM_OBJECT_PIPE; + cl_mem_object_type imageType = CL_MEM_OBJECT_PIPE; cl_GLenum glFormats[3] = {}; cl_uint numImageFormats = 0; - auto result = glSharingFunctions.getSupportedFormats(flags, image_type, arrayCount(glFormats), glFormats, &numImageFormats); + auto result = glSharingFunctions.getSupportedFormats(flags, imageType, arrayCount(glFormats), glFormats, &numImageFormats); EXPECT_EQ(CL_INVALID_VALUE, result); EXPECT_EQ(0u, numImageFormats); @@ -857,11 +857,11 @@ TEST(glSharingBasicTest, givenInvalidImageTypeWhenGettingSupportedFormatsThenIva TEST(glSharingBasicTest, givenInvalidFlagsWhenGettingSupportedFormatsThenIvalidValueErrorIsReturned) { MockGLSharingFunctions glSharingFunctions; cl_mem_flags flags = CL_MEM_NO_ACCESS_INTEL; - cl_mem_object_type image_type = CL_MEM_OBJECT_IMAGE2D; + cl_mem_object_type imageType = CL_MEM_OBJECT_IMAGE2D; cl_GLenum glFormats[3] = {}; cl_uint numImageFormats = 0; - auto result = glSharingFunctions.getSupportedFormats(flags, image_type, arrayCount(glFormats), glFormats, &numImageFormats); + auto result = glSharingFunctions.getSupportedFormats(flags, imageType, arrayCount(glFormats), glFormats, &numImageFormats); EXPECT_EQ(CL_INVALID_VALUE, result); EXPECT_EQ(0u, numImageFormats); @@ -1283,14 +1283,14 @@ TEST_F(glSharingTests, WhenArbSyncEventCreationFailsThenGetOrCreateGlArbSyncEven TEST_F(glSharingTests, whenGetGlDeviceHandleIsCalledThenProperHandleIsReturned) { auto *sharing = static_cast(context.getSharing()); ASSERT_NE(nullptr, sharing); - sharing->GLDeviceHandle = 0x2c; + sharing->glDeviceHandle = 0x2c; EXPECT_EQ(0x2cU, sharing->getGLDeviceHandle()); } TEST_F(glSharingTests, whenGetGlContextHandleIsCalledThenProperHandleIsReturned) { auto *sharing = static_cast(context.getSharing()); ASSERT_NE(nullptr, sharing); - sharing->GLContextHandle = 0x2c; + sharing->glContextHandle = 0x2c; EXPECT_EQ(0x2cU, sharing->getGLContextHandle()); } diff --git a/shared/source/os_interface/windows/debug_registry_reader.cpp b/shared/source/os_interface/windows/debug_registry_reader.cpp index 2281bef5b1..4ef6463e9d 100644 --- a/shared/source/os_interface/windows/debug_registry_reader.cpp +++ b/shared/source/os_interface/windows/debug_registry_reader.cpp @@ -57,7 +57,7 @@ int32_t RegistryReader::getSetting(const char *settingName, int32_t defaultValue } bool RegistryReader::getSettingIntCommon(const char *settingName, int64_t &value) { - HKEY Key{}; + HKEY key{}; DWORD success = ERROR_SUCCESS; bool retVal = false; @@ -65,13 +65,13 @@ bool RegistryReader::getSettingIntCommon(const char *settingName, int64_t &value registryReadRootKey.c_str(), 0, KEY_READ, - &Key); + &key); if (ERROR_SUCCESS == success) { DWORD size = sizeof(int64_t); int64_t regData; - success = SysCalls::regQueryValueExA(Key, + success = SysCalls::regQueryValueExA(key, settingName, NULL, NULL, @@ -81,7 +81,7 @@ bool RegistryReader::getSettingIntCommon(const char *settingName, int64_t &value value = regData; retVal = true; } - RegCloseKey(Key); + RegCloseKey(key); } return retVal; } @@ -126,7 +126,7 @@ int64_t RegistryReader::getSetting(const char *settingName, int64_t defaultValue } bool RegistryReader::getSettingStringCommon(const char *settingName, std::string &keyValue) { - HKEY Key{}; + HKEY key{}; DWORD success = ERROR_SUCCESS; bool retVal = false; @@ -134,12 +134,12 @@ bool RegistryReader::getSettingStringCommon(const char *settingName, std::string registryReadRootKey.c_str(), 0, KEY_READ, - &Key); + &key); if (ERROR_SUCCESS == success) { DWORD regType = REG_NONE; DWORD regSize = 0; - success = SysCalls::regQueryValueExA(Key, + success = SysCalls::regQueryValueExA(key, settingName, NULL, ®Type, @@ -148,7 +148,7 @@ bool RegistryReader::getSettingStringCommon(const char *settingName, std::string if (ERROR_SUCCESS == success) { if (regType == REG_SZ || regType == REG_MULTI_SZ) { auto regData = std::make_unique(regSize); - success = SysCalls::regQueryValueExA(Key, + success = SysCalls::regQueryValueExA(key, settingName, NULL, ®Type, @@ -161,7 +161,7 @@ bool RegistryReader::getSettingStringCommon(const char *settingName, std::string } else if (regType == REG_BINARY) { size_t charCount = regSize / sizeof(wchar_t); auto regData = std::make_unique(charCount); - success = SysCalls::regQueryValueExA(Key, + success = SysCalls::regQueryValueExA(key, settingName, NULL, ®Type, @@ -179,7 +179,7 @@ bool RegistryReader::getSettingStringCommon(const char *settingName, std::string } } } - RegCloseKey(Key); + RegCloseKey(key); } return retVal; } diff --git a/shared/source/os_interface/windows/os_library_win.cpp b/shared/source/os_interface/windows/os_library_win.cpp index 118040c678..f2d6d97bc2 100644 --- a/shared/source/os_interface/windows/os_library_win.cpp +++ b/shared/source/os_interface/windows/os_library_win.cpp @@ -39,7 +39,7 @@ decltype(&GetModuleFileNameA) OsLibrary::getModuleFileNameA = GetModuleFileNameA decltype(&GetSystemDirectoryA) OsLibrary::getSystemDirectoryA = GetSystemDirectoryA; extern "C" IMAGE_DOS_HEADER __ImageBase; -__inline HINSTANCE GetModuleHINSTANCE() { return (HINSTANCE)&__ImageBase; } +__inline HINSTANCE getModuleHINSTANCE() { return (HINSTANCE)&__ImageBase; } void OsLibrary::getLastErrorString(std::string *errorValue) { DWORD errorID = GetLastError(); @@ -58,7 +58,7 @@ void OsLibrary::getLastErrorString(std::string *errorValue) { HMODULE OsLibrary::loadDependency(const std::string &dependencyFileName) const { char dllPath[MAX_PATH]; - DWORD length = getModuleFileNameA(GetModuleHINSTANCE(), dllPath, MAX_PATH); + DWORD length = getModuleFileNameA(getModuleHINSTANCE(), dllPath, MAX_PATH); for (DWORD idx = length; idx > 0; idx--) { if (dllPath[idx - 1] == '\\') { dllPath[idx] = '\0'; @@ -101,7 +101,7 @@ void *OsLibrary::getProcAddress(const std::string &procName) { std::string OsLibrary::getFullPath() { char dllPath[MAX_PATH]; - getModuleFileNameA(GetModuleHINSTANCE(), dllPath, MAX_PATH); + getModuleFileNameA(getModuleHINSTANCE(), dllPath, MAX_PATH); return std::string(dllPath); } } // namespace Windows diff --git a/shared/source/utilities/windows/cpu_info.cpp b/shared/source/utilities/windows/cpu_info.cpp index 413d5f35f4..f715407bab 100644 --- a/shared/source/utilities/windows/cpu_info.cpp +++ b/shared/source/utilities/windows/cpu_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,19 +11,19 @@ namespace NEO { -void cpuid_windows_wrapper(int cpuInfo[4], int functionId) { +void cpuidWindowsWrapper(int cpuInfo[4], int functionId) { __cpuid(cpuInfo, functionId); } -void cpuidex_windows_wrapper(int *cpuInfo, int functionId, int subfunctionId) { +void cpuidexWindowsWrapper(int *cpuInfo, int functionId, int subfunctionId) { __cpuidex(cpuInfo, functionId, subfunctionId); } -void get_cpu_flags_windows(std::string &cpuFlags) {} +void getCpuFlagsWindows(std::string &cpuFlags) {} -void (*CpuInfo::cpuidexFunc)(int *, int, int) = cpuidex_windows_wrapper; -void (*CpuInfo::cpuidFunc)(int[4], int) = cpuid_windows_wrapper; -void (*CpuInfo::getCpuFlagsFunc)(std::string &) = get_cpu_flags_windows; +void (*CpuInfo::cpuidexFunc)(int *, int, int) = cpuidexWindowsWrapper; +void (*CpuInfo::cpuidFunc)(int[4], int) = cpuidWindowsWrapper; +void (*CpuInfo::getCpuFlagsFunc)(std::string &) = getCpuFlagsWindows; const CpuInfo CpuInfo::instance; diff --git a/shared/test/common/os_interface/windows/os_memory_virtual_alloc_ult.cpp b/shared/test/common/os_interface/windows/os_memory_virtual_alloc_ult.cpp index c175ce337b..e8eb3cb718 100644 --- a/shared/test/common/os_interface/windows/os_memory_virtual_alloc_ult.cpp +++ b/shared/test/common/os_interface/windows/os_memory_virtual_alloc_ult.cpp @@ -15,11 +15,11 @@ namespace SysCalls { extern bool mmapAllowExtendedPointers; } -BOOL WINAPI ULTVirtualFree(LPVOID ptr, SIZE_T size, DWORD flags) { +BOOL WINAPI ultVirtualFree(LPVOID ptr, SIZE_T size, DWORD flags) { return 1; } -LPVOID WINAPI ULTVirtualAlloc(LPVOID inPtr, SIZE_T size, DWORD flags, DWORD type) { +LPVOID WINAPI ultVirtualAlloc(LPVOID inPtr, SIZE_T size, DWORD flags, DWORD type) { if (castToUint64(inPtr) > maxNBitValue(48) && SysCalls::mmapAllowExtendedPointers) { return inPtr; } @@ -27,10 +27,10 @@ LPVOID WINAPI ULTVirtualAlloc(LPVOID inPtr, SIZE_T size, DWORD flags, DWORD type } OSMemoryWindows::VirtualFreeFcn getVirtualFree() { - return ULTVirtualFree; + return ultVirtualFree; } OSMemoryWindows::VirtualAllocFcn getVirtualAlloc() { - return ULTVirtualAlloc; + return ultVirtualAlloc; } } // namespace NEO diff --git a/shared/test/common/os_interface/windows/signal_utils.cpp b/shared/test/common/os_interface/windows/signal_utils.cpp index 158540f9ca..904429d004 100644 --- a/shared/test/common/os_interface/windows/signal_utils.cpp +++ b/shared/test/common/os_interface/windows/signal_utils.cpp @@ -17,7 +17,7 @@ std::string lastTest(""); static int newStdOut = -1; -LONG WINAPI UltExceptionFilter( +LONG WINAPI ultExceptionFilter( _In_ struct _EXCEPTION_POINTERS *exceptionInfo) { std::cout << "UnhandledException: 0x" << std::hex << exceptionInfo->ExceptionRecord->ExceptionCode << std::dec << " on test: " << lastTest << std::endl; @@ -41,7 +41,7 @@ int setAbrt(bool enableAbrt) { newStdOut = _dup(1); } - SetUnhandledExceptionFilter(&UltExceptionFilter); + SetUnhandledExceptionFilter(&ultExceptionFilter); if (enableAbrt) { oldSigAbrt = signal(SIGABRT, handleSIGABRT); } diff --git a/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp b/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp index a2d9d4e2c4..b9550127b1 100644 --- a/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp @@ -812,12 +812,12 @@ TEST_F(WddmCommandStreamTest, givenTwoTemporaryAllocationsWhenCleanTemporaryAllo if (memoryManager->isLimitedGPU(0)) { GTEST_SKIP(); } - void *host_ptr = (void *)0x1212341; - void *host_ptr2 = (void *)0x2212341; + void *hostPtr = reinterpret_cast(0x1212341); + void *hostPtr2 = reinterpret_cast(0x2212341); auto size = 17262u; - GraphicsAllocation *graphicsAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), false, size}, host_ptr); - GraphicsAllocation *graphicsAllocation2 = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), false, size}, host_ptr2); + GraphicsAllocation *graphicsAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), false, size}, hostPtr); + GraphicsAllocation *graphicsAllocation2 = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), false, size}, hostPtr2); csr->getInternalAllocationStorage()->storeAllocation(std::unique_ptr(graphicsAllocation), TEMPORARY_ALLOCATION); csr->getInternalAllocationStorage()->storeAllocation(std::unique_ptr(graphicsAllocation2), TEMPORARY_ALLOCATION); @@ -827,12 +827,12 @@ TEST_F(WddmCommandStreamTest, givenTwoTemporaryAllocationsWhenCleanTemporaryAllo const auto firstWaitResult = csr->waitForTaskCountAndCleanAllocationList(1, TEMPORARY_ALLOCATION); EXPECT_EQ(WaitStatus::Ready, firstWaitResult); // graphicsAllocation2 still lives - EXPECT_EQ(host_ptr2, graphicsAllocation2->getUnderlyingBuffer()); + EXPECT_EQ(hostPtr2, graphicsAllocation2->getUnderlyingBuffer()); auto hostPtrManager = memoryManager->getHostPtrManager(); - auto alignedPtr = alignDown(host_ptr, MemoryConstants::pageSize); - auto alignedPtr2 = alignDown(host_ptr2, MemoryConstants::pageSize); + auto alignedPtr = alignDown(hostPtr, MemoryConstants::pageSize); + auto alignedPtr2 = alignDown(hostPtr2, MemoryConstants::pageSize); auto fragment = hostPtrManager->getFragment({alignedPtr2, csr->getRootDeviceIndex()}); ASSERT_NE(nullptr, fragment);