mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
performance: override for driver protection bits
Add infrastructure to override usage in getDriverProtectionBits. Related-To: NEO-14482 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
00620f07c0
commit
be04b6f172
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -33,7 +33,11 @@ class MockGmmResourceInfo : public GmmResourceInfo {
|
||||
|
||||
size_t getRenderPitch() override { return rowPitch; }
|
||||
|
||||
uint64_t getDriverProtectionBits() override { return driverProtectionBits; }
|
||||
uint64_t getDriverProtectionBits(bool overrideUsage, uint32_t usage) override {
|
||||
driverProtectionBitsUsageWasOverriden = overrideUsage;
|
||||
driverProtectionBitsUsageOverride = usage;
|
||||
return driverProtectionBits;
|
||||
}
|
||||
|
||||
uint32_t getNumSamples() override { return mockResourceCreateParams.MSAA.NumSamples; }
|
||||
|
||||
@@ -116,6 +120,8 @@ class MockGmmResourceInfo : public GmmResourceInfo {
|
||||
using GmmResourceInfo::decodeResourceInfo;
|
||||
|
||||
uint64_t driverProtectionBits = 0;
|
||||
bool driverProtectionBitsUsageWasOverriden = false;
|
||||
uint32_t driverProtectionBitsUsageOverride = 0u;
|
||||
uint32_t getOffsetCalled = 0u;
|
||||
uint32_t arrayIndexPassedToGetOffset = 0;
|
||||
SurfaceFormatInfo tempSurface{};
|
||||
|
||||
Reference in New Issue
Block a user