mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Revert "fix: Set compression parameter when resource imported"
This reverts commit c5b66d50e2.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6acfcb83b9
commit
c98344c906
@@ -13,7 +13,7 @@
|
||||
namespace NEO {
|
||||
uint64_t GmmClientContext::mapGpuVirtualAddress(MapGpuVirtualAddressGmm *pMapGpuVa) {
|
||||
auto gmmResourceFlags = pMapGpuVa->resourceInfoHandle->getResourceFlags()->Info;
|
||||
if ((gmmResourceFlags.MediaCompressed || gmmResourceFlags.RenderCompressed) && !pMapGpuVa->resourceInfoHandle->isResourceDenyCompressionEnabled()) {
|
||||
if (gmmResourceFlags.MediaCompressed || gmmResourceFlags.RenderCompressed) {
|
||||
auto gmmResourceInfo = pMapGpuVa->resourceInfoHandle->peekGmmResourceInfo();
|
||||
GMM_MAPGPUVIRTUALADDRESS gmmMapAddress = {pMapGpuVa->mapGpuVirtualAddressParams, 1, &gmmResourceInfo, pMapGpuVa->outVirtualAddress};
|
||||
return clientContext->MapGpuVirtualAddress(&gmmMapAddress);
|
||||
@@ -23,7 +23,7 @@ uint64_t GmmClientContext::mapGpuVirtualAddress(MapGpuVirtualAddressGmm *pMapGpu
|
||||
}
|
||||
uint64_t GmmClientContext::freeGpuVirtualAddress(FreeGpuVirtualAddressGmm *pFreeGpuVa) {
|
||||
auto gmmResourceFlags = pFreeGpuVa->resourceInfoHandle->getResourceFlags()->Info;
|
||||
if ((gmmResourceFlags.MediaCompressed || gmmResourceFlags.RenderCompressed) && !pFreeGpuVa->resourceInfoHandle->isResourceDenyCompressionEnabled()) {
|
||||
if (gmmResourceFlags.MediaCompressed || gmmResourceFlags.RenderCompressed) {
|
||||
auto gmmResourceInfo = pFreeGpuVa->resourceInfoHandle->peekGmmResourceInfo();
|
||||
GMM_FREEGPUVIRTUALADDRESS gmmFreeAddress = {pFreeGpuVa->hAdapter, pFreeGpuVa->baseAddress, pFreeGpuVa->size, 1, &gmmResourceInfo};
|
||||
return clientContext->FreeGpuVirtualAddress(&gmmFreeAddress);
|
||||
|
||||
@@ -77,12 +77,7 @@ Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_
|
||||
Gmm::Gmm(GmmHelper *gmmHelper, GMM_RESOURCE_INFO *inputGmm) : Gmm(gmmHelper, inputGmm, false) {}
|
||||
|
||||
Gmm::Gmm(GmmHelper *gmmHelper, GMM_RESOURCE_INFO *inputGmm, bool openingHandle) : gmmHelper(gmmHelper) {
|
||||
auto &rootDeviceEnvironment = gmmHelper->getRootDeviceEnvironment();
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
|
||||
gmmResourceInfo.reset(GmmResourceInfo::create(gmmHelper->getClientContext(), inputGmm, openingHandle));
|
||||
if (gfxCoreHelper.isCompressionAppliedForImportedResource(*this)) {
|
||||
compressionEnabled = true;
|
||||
}
|
||||
applyDebugOverrides();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,7 @@ class GmmResourceInfo : NonCopyableAndNonMovableClass {
|
||||
|
||||
MOCKABLE_VIRTUAL size_t getRenderPitch() { return static_cast<size_t>(resourceInfo->GetRenderPitch()); }
|
||||
|
||||
MOCKABLE_VIRTUAL uint64_t getDriverProtectionBits(uint32_t overrideUsage, bool compressionDenied);
|
||||
|
||||
MOCKABLE_VIRTUAL bool isResourceDenyCompressionEnabled();
|
||||
MOCKABLE_VIRTUAL uint64_t getDriverProtectionBits(uint32_t overrideUsage);
|
||||
|
||||
MOCKABLE_VIRTUAL uint32_t getNumSamples() { return resourceInfo->GetNumSamples(); }
|
||||
|
||||
|
||||
@@ -9,14 +9,10 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage, bool compressionDenied) {
|
||||
uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage) {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
bool GmmResourceInfo::isResourceDenyCompressionEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GmmResourceInfo::isDisplayable() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage, bool compressionDenied) {
|
||||
uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage) {
|
||||
GMM_OVERRIDE_VALUES overrideValues{};
|
||||
if (GMM_RESOURCE_USAGE_UNKNOWN != overrideUsage) {
|
||||
overrideValues.Usage = overrideUsage;
|
||||
@@ -17,10 +17,6 @@ uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage, bool c
|
||||
return static_cast<uint64_t>(resourceInfo->GetDriverProtectionBits(overrideValues));
|
||||
}
|
||||
|
||||
bool GmmResourceInfo::isResourceDenyCompressionEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GmmResourceInfo::isDisplayable() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9,14 +9,10 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage, bool compressionDenied) {
|
||||
uint64_t GmmResourceInfo::getDriverProtectionBits(uint32_t overrideUsage) {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
bool GmmResourceInfo::isResourceDenyCompressionEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GmmResourceInfo::isDisplayable() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,6 @@ class GfxCoreHelper {
|
||||
virtual size_t getTimestampPacketAllocatorAlignment() const = 0;
|
||||
virtual size_t getSingleTimestampPacketSize() const = 0;
|
||||
virtual void applyAdditionalCompressionSettings(Gmm &gmm, bool isNotCompressed) const = 0;
|
||||
virtual bool isCompressionAppliedForImportedResource(Gmm &gmm) const = 0;
|
||||
virtual void applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const = 0;
|
||||
virtual bool unTypedDataPortCacheFlushRequired() const = 0;
|
||||
virtual bool isEngineTypeRemappingToHwSpecificRequired() const = 0;
|
||||
@@ -419,7 +418,6 @@ class GfxCoreHelperHw : public GfxCoreHelper {
|
||||
static size_t getSingleTimestampPacketSizeHw();
|
||||
|
||||
void applyAdditionalCompressionSettings(Gmm &gmm, bool isNotCompressed) const override;
|
||||
bool isCompressionAppliedForImportedResource(Gmm &gmm) const override;
|
||||
|
||||
void applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const override;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/bit_helpers.h"
|
||||
@@ -664,17 +663,6 @@ size_t GfxCoreHelperHw<GfxFamily>::getPreemptionAllocationAlignment() const {
|
||||
template <typename GfxFamily>
|
||||
void GfxCoreHelperHw<GfxFamily>::applyAdditionalCompressionSettings(Gmm &gmm, bool isNotCompressed) const {}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool GfxCoreHelperHw<GfxFamily>::isCompressionAppliedForImportedResource(Gmm &gmm) const {
|
||||
auto gmmFlags = gmm.gmmResourceInfo->getResourceFlags();
|
||||
auto isResourceDenyCompressionEnabled = gmm.gmmResourceInfo->isResourceDenyCompressionEnabled();
|
||||
if (((gmmFlags->Info.MediaCompressed == 1) || (gmmFlags->Info.RenderCompressed == 1)) && (!isResourceDenyCompressionEnabled)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void GfxCoreHelperHw<GfxFamily>::applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const {
|
||||
gmm.resourceParams.Flags.Info.RenderCompressed = isCompressed;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
@@ -24,17 +23,6 @@ void GfxCoreHelperHw<Family>::applyAdditionalCompressionSettings(Gmm &gmm, bool
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool GfxCoreHelperHw<Family>::isCompressionAppliedForImportedResource(Gmm &gmm) const {
|
||||
auto gmmFlags = gmm.gmmResourceInfo->getResourceFlags();
|
||||
auto isResourceDenyCompressionEnabled = gmm.gmmResourceInfo->isResourceDenyCompressionEnabled();
|
||||
if ((gmmFlags->Info.NotCompressed == 0) && (!isResourceDenyCompressionEnabled)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
const EngineInstancesContainer GfxCoreHelperHw<GfxFamily>::getGpgpuEngineInstances(const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
|
||||
Reference in New Issue
Block a user