mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
refactor: Make semaphore dependant resources UC
Change for tagBuffer type on Windows. Timestamp types are already UC on all DC flush platforms regardless of OS. Resolves: NEO-13847 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ad99c8d818
commit
7eac78d253
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/memory_manager/allocation_type.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
@@ -87,11 +88,15 @@ GMM_RESOURCE_USAGE_TYPE_ENUM CacheSettingsHelper::getDefaultUsageTypeWithCaching
|
||||
case AllocationType::fillPattern:
|
||||
case AllocationType::svmCpu:
|
||||
case AllocationType::svmZeroCopy:
|
||||
case AllocationType::tagBuffer:
|
||||
if (debugManager.flags.DisableCachingForStatefulBufferAccess.get()) {
|
||||
return getDefaultUsageTypeWithCachingDisabled(allocationType, productHelper);
|
||||
}
|
||||
return GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
case AllocationType::tagBuffer:
|
||||
if (productHelper.isDcFlushAllowed() && OSInterface::isSemaphoreDependantResourceUCRequired) {
|
||||
return getDefaultUsageTypeWithCachingDisabled(allocationType, productHelper);
|
||||
}
|
||||
return GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
case AllocationType::gpuTimestampDeviceBuffer:
|
||||
case AllocationType::timestampPacketTagBuffer:
|
||||
if (debugManager.flags.ForceNonCoherentModeForTimestamps.get()) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -22,6 +22,7 @@ bool OSInterface::osEnabled64kbPages = false;
|
||||
bool OSInterface::newResourceImplicitFlush = true;
|
||||
bool OSInterface::gpuIdleImplicitFlush = true;
|
||||
bool OSInterface::requiresSupportForWddmTrimNotification = false;
|
||||
bool OSInterface::isSemaphoreDependantResourceUCRequired = false;
|
||||
|
||||
bool OSInterface::isDebugAttachAvailable() const {
|
||||
if (driverModel && driverModel->getDriverModelType() == DriverModelType::drm) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -123,6 +123,7 @@ class OSInterface : public NonCopyableClass {
|
||||
static bool newResourceImplicitFlush;
|
||||
static bool gpuIdleImplicitFlush;
|
||||
static bool requiresSupportForWddmTrimNotification;
|
||||
static bool isSemaphoreDependantResourceUCRequired;
|
||||
static std::vector<std::unique_ptr<HwDeviceId>> discoverDevices(ExecutionEnvironment &executionEnvironment);
|
||||
static std::vector<std::unique_ptr<HwDeviceId>> discoverDevice(ExecutionEnvironment &executionEnvironment, std::string &osPciPath);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,6 +14,7 @@ bool OSInterface::osEnabled64kbPages = true;
|
||||
bool OSInterface::newResourceImplicitFlush = true;
|
||||
bool OSInterface::gpuIdleImplicitFlush = false;
|
||||
bool OSInterface::requiresSupportForWddmTrimNotification = true;
|
||||
bool OSInterface::isSemaphoreDependantResourceUCRequired = true;
|
||||
|
||||
bool OSInterface::isDebugAttachAvailable() const {
|
||||
if (driverModel) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/sku_info/operations/sku_info_transfer.h"
|
||||
#include "shared/test/common/fixtures/mock_execution_environment_gmm_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
@@ -718,9 +719,11 @@ TEST(GmmTest, givenAllocationTypeWhenGettingUsageTypeThenReturnCorrectValue) {
|
||||
case AllocationType::fillPattern:
|
||||
case AllocationType::svmCpu:
|
||||
case AllocationType::svmZeroCopy:
|
||||
case AllocationType::tagBuffer:
|
||||
expectedUsage = forceUncached ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
break;
|
||||
case AllocationType::tagBuffer:
|
||||
expectedUsage = (forceUncached || (productHelper.isDcFlushAllowed() && OSInterface::isSemaphoreDependantResourceUCRequired)) ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
break;
|
||||
default:
|
||||
expectedUsage = forceUncached ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_BUFFER;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user