mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Enable signed/unsigned mismatch warning for MSVC
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
30071599df
commit
aff0ea99a8
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -74,7 +74,7 @@ TEST(OSTimeWinTests, givenNoOSInterfaceWhenGetCpuTimeThenReturnsSuccess) {
|
||||
auto osTime(OSTime::create(nullptr));
|
||||
auto error = osTime->getCpuTime(&time);
|
||||
EXPECT_TRUE(error);
|
||||
EXPECT_NE(0, time);
|
||||
EXPECT_NE(0u, time);
|
||||
}
|
||||
|
||||
TEST(OSTimeWinTests, givenNoOSInterfaceWhenGetCpuGpuTimeThenReturnsError) {
|
||||
@ -82,8 +82,8 @@ TEST(OSTimeWinTests, givenNoOSInterfaceWhenGetCpuGpuTimeThenReturnsError) {
|
||||
auto osTime(OSTime::create(nullptr));
|
||||
auto success = osTime->getCpuGpuTime(&CPUGPUTime);
|
||||
EXPECT_FALSE(success);
|
||||
EXPECT_EQ(0, CPUGPUTime.CPUTimeinNS);
|
||||
EXPECT_EQ(0, CPUGPUTime.GPUTimeStamp);
|
||||
EXPECT_EQ(0u, CPUGPUTime.CPUTimeinNS);
|
||||
EXPECT_EQ(0u, CPUGPUTime.GPUTimeStamp);
|
||||
}
|
||||
|
||||
TEST(OSTimeWinTests, givenOSInterfaceWhenGetCpuGpuTimeThenReturnsSuccess) {
|
||||
@ -98,12 +98,12 @@ TEST(OSTimeWinTests, givenOSInterfaceWhenGetCpuGpuTimeThenReturnsSuccess) {
|
||||
auto osTime = OSTime::create(osInterface.get());
|
||||
auto success = osTime->getCpuGpuTime(&CPUGPUTime01);
|
||||
EXPECT_TRUE(success);
|
||||
EXPECT_NE(0, CPUGPUTime01.CPUTimeinNS);
|
||||
EXPECT_NE(0, CPUGPUTime01.GPUTimeStamp);
|
||||
EXPECT_NE(0u, CPUGPUTime01.CPUTimeinNS);
|
||||
EXPECT_NE(0u, CPUGPUTime01.GPUTimeStamp);
|
||||
success = osTime->getCpuGpuTime(&CPUGPUTime02);
|
||||
EXPECT_TRUE(success);
|
||||
EXPECT_NE(0, CPUGPUTime02.CPUTimeinNS);
|
||||
EXPECT_NE(0, CPUGPUTime02.GPUTimeStamp);
|
||||
EXPECT_NE(0u, CPUGPUTime02.CPUTimeinNS);
|
||||
EXPECT_NE(0u, CPUGPUTime02.GPUTimeStamp);
|
||||
EXPECT_GT(CPUGPUTime02.GPUTimeStamp, CPUGPUTime01.GPUTimeStamp);
|
||||
EXPECT_GT(CPUGPUTime02.CPUTimeinNS, CPUGPUTime01.CPUTimeinNS);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -80,28 +80,28 @@ TEST_F(DebugReaderWithRegistryAndEnvTest, givenIntDebugKeyWhenReadFromRegistrySu
|
||||
SysCalls::regOpenKeySuccessCount = 1u;
|
||||
SysCalls::regQueryValueSuccessCount = 1u;
|
||||
|
||||
EXPECT_EQ(1, registryReader.getSetting("settingSourceInt", 0));
|
||||
EXPECT_EQ(1u, registryReader.getSetting("settingSourceInt", 0));
|
||||
}
|
||||
|
||||
TEST_F(DebugReaderWithRegistryAndEnvTest, givenInt64DebugKeyWhenReadFromRegistrySucceedsThenReturnObtainedValue) {
|
||||
SysCalls::regOpenKeySuccessCount = 1u;
|
||||
SysCalls::regQueryValueSuccessCount = 1u;
|
||||
|
||||
EXPECT_EQ(0xffffffffeeeeeeee, registryReader.getSetting("settingSourceInt64", 0));
|
||||
EXPECT_EQ(0xeeeeeeee, registryReader.getSetting("settingSourceInt64", 0));
|
||||
}
|
||||
|
||||
TEST_F(DebugReaderWithRegistryAndEnvTest, givenIntDebugKeyWhenQueryValueFailsThenObtainValueFromEnv) {
|
||||
SysCalls::regOpenKeySuccessCount = 1u;
|
||||
SysCalls::regQueryValueSuccessCount = 0u;
|
||||
|
||||
EXPECT_EQ(2, registryReader.getSetting("settingSourceInt", 0));
|
||||
EXPECT_EQ(2u, registryReader.getSetting("settingSourceInt", 0));
|
||||
}
|
||||
|
||||
TEST_F(DebugReaderWithRegistryAndEnvTest, givenIntDebugKeyWhenOpenKeyFailsThenObtainValueFromEnv) {
|
||||
SysCalls::regOpenKeySuccessCount = 0u;
|
||||
SysCalls::regQueryValueSuccessCount = 0u;
|
||||
|
||||
EXPECT_EQ(2, registryReader.getSetting("settingSourceInt", 0));
|
||||
EXPECT_EQ(2u, registryReader.getSetting("settingSourceInt", 0));
|
||||
}
|
||||
|
||||
TEST_F(DebugReaderWithRegistryAndEnvTest, givenStringDebugKeyWhenReadFromRegistrySucceedsThenReturnObtainedValue) {
|
||||
|
@ -450,7 +450,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenAllocationWithoutHighPriorityWhenMemory
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
EXPECT_EQ(MemoryManager::AllocationStatus::Success, status);
|
||||
EXPECT_EQ(1u, wddm->setAllocationPriorityResult.called);
|
||||
EXPECT_EQ(DXGI_RESOURCE_PRIORITY_NORMAL, wddm->setAllocationPriorityResult.uint64ParamPassed);
|
||||
EXPECT_EQ(static_cast<uint64_t>(DXGI_RESOURCE_PRIORITY_NORMAL), wddm->setAllocationPriorityResult.uint64ParamPassed);
|
||||
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValueOnSomeOfMultipleEngine
|
||||
|
||||
memoryManager->handleFenceCompletion(allocation);
|
||||
EXPECT_EQ(1u, wddm->waitFromCpuResult.called);
|
||||
EXPECT_EQ(129, wddm->waitFromCpuResult.uint64ParamPassed);
|
||||
EXPECT_EQ(129u, wddm->waitFromCpuResult.uint64ParamPassed);
|
||||
EXPECT_EQ(lastEngineFence, wddm->waitFromCpuResult.monitoredFence);
|
||||
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
@ -1160,7 +1160,7 @@ TEST_F(WddmMemoryManagerTest, GivenUnAlignedPointerAndSizeWhenAllocate32BitMemor
|
||||
void *ptr = reinterpret_cast<void *>(0x1001);
|
||||
auto *gpuAllocation = memoryManager->allocate32BitGraphicsMemory(rootDeviceIndex, size, ptr, AllocationType::BUFFER);
|
||||
EXPECT_EQ(reinterpret_cast<void *>(0x1000), reinterpret_cast<void *>(gpuAllocation->getDefaultGmm()->resourceParams.pExistingSysMem));
|
||||
EXPECT_EQ(0x2000, gpuAllocation->getDefaultGmm()->resourceParams.ExistingSysMemSize);
|
||||
EXPECT_EQ(0x2000u, gpuAllocation->getDefaultGmm()->resourceParams.ExistingSysMemSize);
|
||||
memoryManager->freeGraphicsMemory(gpuAllocation);
|
||||
}
|
||||
|
||||
@ -1575,7 +1575,7 @@ TEST_F(BufferWithWddmMemory, givenFragmentsThatAreNotInOrderWhenGraphicsAllocati
|
||||
osHandle->gpuPtr = gpuAdress;
|
||||
memoryManager->getHostPtrManager()->storeFragment(rootDeviceIndex, fragment);
|
||||
|
||||
auto offset = 80;
|
||||
auto offset = 80u;
|
||||
auto allocationPtr = ptrOffset(ptr, offset);
|
||||
AllocationData allocationData;
|
||||
allocationData.size = size;
|
||||
|
@ -242,11 +242,11 @@ TEST_F(WddmResidencyControllerTest, givenWddmResidencyControllerWhenCallingWasAl
|
||||
TEST_F(WddmResidencyControllerTest, givenWddmResidencyControllerThenUpdateLastTrimFenceValueUsesMonitoredFence) {
|
||||
*residencyController->getMonitoredFence().cpuAddress = 1234;
|
||||
residencyController->updateLastTrimFenceValue();
|
||||
EXPECT_EQ(1234, residencyController->lastTrimFenceValue);
|
||||
EXPECT_EQ(1234u, residencyController->lastTrimFenceValue);
|
||||
|
||||
*residencyController->getMonitoredFence().cpuAddress = 12345;
|
||||
residencyController->updateLastTrimFenceValue();
|
||||
EXPECT_EQ(12345, residencyController->lastTrimFenceValue);
|
||||
EXPECT_EQ(12345u, residencyController->lastTrimFenceValue);
|
||||
}
|
||||
|
||||
TEST_F(WddmResidencyControllerWithGdiTest, givenWddmResidencyControllerWhenItIsDestructedThenUnregisterTrimCallback) {
|
||||
|
@ -92,7 +92,7 @@ HWTEST_F(EnqueueBufferWindowsTest, givenMisalignedHostPtrWhenEnqueueReadBufferCa
|
||||
buffer->forceDisallowCPUCopy = true;
|
||||
auto retVal = cmdQ->enqueueReadBuffer(buffer.get(), CL_FALSE, 0, 4, misalignedPtr, nullptr, 0, nullptr, nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
ASSERT_NE(0, cmdQ->lastEnqueuedKernels.size());
|
||||
ASSERT_NE(0u, cmdQ->lastEnqueuedKernels.size());
|
||||
Kernel *kernel = cmdQ->lastEnqueuedKernels[0];
|
||||
|
||||
auto hostPtrAllocation = cmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage()->getTemporaryAllocations().peekHead();
|
||||
|
@ -178,19 +178,19 @@ TEST_F(GlReusedBufferTests, givenMultipleBuffersAndGlobalShareHandleChangedWhenA
|
||||
auto graphicsAllocation1 = clBuffer1->getGraphicsAllocation(rootDeviceIndex);
|
||||
auto graphicsAllocation2 = clBuffer2->getGraphicsAllocation(rootDeviceIndex);
|
||||
ASSERT_EQ(graphicsAllocation1, graphicsAllocation2);
|
||||
ASSERT_EQ(2, graphicsAllocation1->peekReuseCount());
|
||||
ASSERT_EQ(1, graphicsAllocationsForGlBufferReuse->size());
|
||||
ASSERT_EQ(2u, graphicsAllocation1->peekReuseCount());
|
||||
ASSERT_EQ(1u, graphicsAllocationsForGlBufferReuse->size());
|
||||
|
||||
bufferInfoOutput.globalShareHandle = 41;
|
||||
dllParam.loadBuffer(bufferInfoOutput);
|
||||
clBuffer1->peekSharingHandler()->acquire(clBuffer1.get(), rootDeviceIndex);
|
||||
auto newGraphicsAllocation = clBuffer1->getGraphicsAllocation(rootDeviceIndex);
|
||||
EXPECT_EQ(1, graphicsAllocationsForGlBufferReuse->size());
|
||||
EXPECT_EQ(1u, graphicsAllocationsForGlBufferReuse->size());
|
||||
EXPECT_EQ(newGraphicsAllocation, graphicsAllocationsForGlBufferReuse->at(0).second);
|
||||
|
||||
clBuffer2->peekSharingHandler()->acquire(clBuffer2.get(), rootDeviceIndex);
|
||||
EXPECT_EQ(clBuffer2->getGraphicsAllocation(rootDeviceIndex), newGraphicsAllocation);
|
||||
EXPECT_EQ(1, graphicsAllocationsForGlBufferReuse->size());
|
||||
EXPECT_EQ(1u, graphicsAllocationsForGlBufferReuse->size());
|
||||
EXPECT_EQ(newGraphicsAllocation, graphicsAllocationsForGlBufferReuse->at(0).second);
|
||||
|
||||
clBuffer1->peekSharingHandler()->release(clBuffer1.get(), rootDeviceIndex);
|
||||
|
Reference in New Issue
Block a user