mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
refactor: remove not needed volatile
Related-To: NEO-10767 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4cdd5671f7
commit
99a7b5a4fb
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -19,7 +19,7 @@ struct MonitoredFence {
|
||||
D3DKMT_HANDLE fenceHandle = 0;
|
||||
D3DGPU_VIRTUAL_ADDRESS gpuAddress = 0;
|
||||
volatile uint64_t *cpuAddress = nullptr;
|
||||
volatile uint64_t currentFenceValue = 0;
|
||||
uint64_t currentFenceValue = 0;
|
||||
uint64_t lastSubmittedFence = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,7 +13,8 @@ namespace NEO {
|
||||
struct MockMigrationSyncDataWithYield : public MigrationSyncData {
|
||||
using MigrationSyncData::MigrationSyncData;
|
||||
void yield() const override {
|
||||
(*this->tagAddress)++;
|
||||
auto newTag = *this->tagAddress + 1;
|
||||
*this->tagAddress = newTag;
|
||||
MigrationSyncData::yield();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -455,7 +455,7 @@ HWTEST_F(CommandStreamReceiverTest, givenGpuHangWhenWaititingForCompletionWithTi
|
||||
csr.activePartitions = 1;
|
||||
csr.gpuHangCheckPeriod = 0us;
|
||||
|
||||
volatile TagAddressType tasksCount[16] = {};
|
||||
TagAddressType tasksCount[16] = {};
|
||||
csr.tagAddress = tasksCount;
|
||||
|
||||
constexpr auto enableTimeout = false;
|
||||
@@ -470,7 +470,7 @@ HWTEST_F(CommandStreamReceiverTest, givenNoGpuHangWhenWaititingForCompletionWith
|
||||
auto driverModelMock = std::make_unique<MockDriverModel>();
|
||||
driverModelMock->isGpuHangDetectedToReturn = false;
|
||||
|
||||
volatile TagAddressType tasksCount[16] = {};
|
||||
TagAddressType tasksCount[16] = {};
|
||||
driverModelMock->isGpuHangDetectedSideEffect = [&tasksCount] {
|
||||
tasksCount[0]++;
|
||||
};
|
||||
|
||||
@@ -2351,7 +2351,8 @@ HWTEST_F(GraphicsAllocationDestroyTests, givenAllocationUsedOnlyByNonDefaultCsrW
|
||||
|
||||
memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(graphicsAllocation);
|
||||
EXPECT_NE(nullptr, nonDefaultCsr->getInternalAllocationStorage()->getDeferredAllocations().peekHead());
|
||||
(*nonDefaultCsr->getTagAddress())++;
|
||||
auto newTag = *nonDefaultCsr->getTagAddress() + 1;
|
||||
(*nonDefaultCsr->getTagAddress()) = newTag;
|
||||
// no need to call freeGraphicsAllocation
|
||||
}
|
||||
|
||||
@@ -2374,7 +2375,8 @@ HWTEST_F(GraphicsAllocationDestroyTests, givenAllocationUsedOnlyByNonDefaultDevi
|
||||
memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(graphicsAllocation);
|
||||
EXPECT_FALSE(nonDefaultCommandStreamReceiver.getInternalAllocationStorage()->getDeferredAllocations().peekIsEmpty());
|
||||
EXPECT_TRUE(nonDefaultCommandStreamReceiver.getInternalAllocationStorage()->getTemporaryAllocations().peekIsEmpty());
|
||||
(*nonDefaultCommandStreamReceiver.getTagAddress())++;
|
||||
auto newTag = *nonDefaultCommandStreamReceiver.getTagAddress() + 1;
|
||||
(*nonDefaultCommandStreamReceiver.getTagAddress()) = newTag;
|
||||
// no need to call freeGraphicsAllocation
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user