Added const qualifiers to GMMHelper's getMOCS

Change-Id: I536837d36c0b8a8ef184af2b95f9832171c5b85c
Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
Konstanty Misiak
2020-02-04 12:13:57 +01:00
committed by sys_ocldev
parent f936b3e1cd
commit 6369470b3e
4 changed files with 5 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ const HardwareInfo *GmmHelper::getHardwareInfo() {
return hwInfo;
}
uint32_t GmmHelper::getMOCS(uint32_t type) {
uint32_t GmmHelper::getMOCS(uint32_t type) const {
MEMORY_OBJECT_CONTROL_STATE mocs = gmmClientContext->cachePolicyGetMemoryObject(nullptr, static_cast<GMM_RESOURCE_USAGE_TYPE>(type));
return static_cast<uint32_t>(mocs.DwordValue);

View File

@@ -25,7 +25,7 @@ class GmmHelper {
MOCKABLE_VIRTUAL ~GmmHelper();
const HardwareInfo *getHardwareInfo();
uint32_t getMOCS(uint32_t type);
uint32_t getMOCS(uint32_t type) const;
static constexpr uint64_t maxPossiblePitch = 2147483648;

View File

@@ -65,7 +65,7 @@ class HwHelper {
static uint32_t getMaxThreadsForVfe(const HardwareInfo &hwInfo);
virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const;
virtual uint32_t getMetricsLibraryGenId() const = 0;
virtual uint32_t getMocsIndex(GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const = 0;
virtual uint32_t getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const = 0;
virtual bool requiresAuxResolves() const = 0;
virtual bool tilingAllowed(bool isSharedContext, bool isImage1d, bool forceLinearStorage) = 0;
virtual uint32_t getBarriersCountFromHasBarriers(uint32_t hasBarriers) = 0;
@@ -174,7 +174,7 @@ class HwHelperHw : public HwHelper {
uint32_t getMetricsLibraryGenId() const override;
uint32_t getMocsIndex(GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const override;
uint32_t getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const override;
bool requiresAuxResolves() const override;

View File

@@ -54,7 +54,7 @@ std::string HwHelperHw<GfxFamily>::getExtensions() const {
}
template <typename GfxFamily>
uint32_t HwHelperHw<GfxFamily>::getMocsIndex(GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const {
uint32_t HwHelperHw<GfxFamily>::getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const {
if (l3enabled) {
return gmmHelper.getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) >> 1;
}