mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Add debug flag to control RenderCompressed value in HardwareInfo
Change-Id: I733125fbd8596f24cdeb636b69a9198c44bd899b Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
6b8d8cbcbb
commit
4ddf5a1e87
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/hw_helper.h"
|
||||
#include "runtime/os_interface/debug_settings_manager.h"
|
||||
|
||||
namespace OCLRT {
|
||||
HwHelper *hwHelperFactory[IGFX_MAX_CORE] = {};
|
||||
@@ -13,4 +14,19 @@ HwHelper *hwHelperFactory[IGFX_MAX_CORE] = {};
|
||||
HwHelper &HwHelper::get(GFXCORE_FAMILY gfxCore) {
|
||||
return *hwHelperFactory[gfxCore];
|
||||
}
|
||||
|
||||
bool HwHelper::renderCompressedBuffersSupported(const HardwareInfo &hwInfo) {
|
||||
if (DebugManager.flags.RenderCompressedBuffersEnabled.get() != -1) {
|
||||
return !!DebugManager.flags.RenderCompressedBuffersEnabled.get();
|
||||
}
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedBuffers;
|
||||
}
|
||||
|
||||
bool HwHelper::renderCompressedImagesSupported(const HardwareInfo &hwInfo) {
|
||||
if (DebugManager.flags.RenderCompressedImagesEnabled.get() != -1) {
|
||||
return !!DebugManager.flags.RenderCompressedImagesEnabled.get();
|
||||
}
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedImages;
|
||||
}
|
||||
|
||||
} // namespace OCLRT
|
||||
|
||||
@@ -39,6 +39,8 @@ class HwHelper {
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual const AubMemDump::LrcaHelper &getCsTraits(EngineInstanceT engineInstance) const = 0;
|
||||
virtual bool supportsYTiling() const = 0;
|
||||
static bool renderCompressedBuffersSupported(const HardwareInfo &hwInfo);
|
||||
static bool renderCompressedImagesSupported(const HardwareInfo &hwInfo);
|
||||
virtual bool timestampPacketWriteSupported() const = 0;
|
||||
virtual size_t getRenderSurfaceStateSize() const = 0;
|
||||
virtual void setRenderSurfaceStateForBuffer(ExecutionEnvironment &executionEnvironment,
|
||||
|
||||
@@ -328,7 +328,7 @@ cl_int Kernel::initialize() {
|
||||
kernelArguments[i].type = BUFFER_OBJ;
|
||||
usingBuffers = true;
|
||||
this->auxTranslationRequired |= !kernelInfo.kernelArgInfo[i].pureStatefulBufferAccess &&
|
||||
getDevice().getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers;
|
||||
HwHelper::renderCompressedBuffersSupported(getDevice().getHardwareInfo());
|
||||
} else if (argInfo.isImage) {
|
||||
kernelArgHandlers[i] = &Kernel::setArgImage;
|
||||
kernelArguments[i].type = IMAGE_OBJ;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "runtime/gmm_helper/gmm.h"
|
||||
#include "runtime/gmm_helper/gmm_helper.h"
|
||||
#include "runtime/helpers/aligned_memory.h"
|
||||
#include "runtime/helpers/hw_helper.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/helpers/ptr_math.h"
|
||||
#include "runtime/helpers/string.h"
|
||||
@@ -129,7 +130,7 @@ Buffer *Buffer::create(Context *context,
|
||||
GraphicsAllocation::AllocationType allocationType = getGraphicsAllocationType(
|
||||
properties.flags,
|
||||
context->isSharedContext,
|
||||
context->getDevice(0)->getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers);
|
||||
HwHelper::renderCompressedBuffersSupported(context->getDevice(0)->getHardwareInfo()));
|
||||
|
||||
MemoryManager *memoryManager = context->getMemoryManager();
|
||||
UNRECOVERABLE_IF(!memoryManager);
|
||||
|
||||
@@ -104,6 +104,8 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverrideDelayQuickKmdSleepForSporadicWaitsMicros
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, PowerSavingMode, 0, "0: default 1: enable. Whenever driver waits on GPU and its not ready, put waiting thread to sleep and wait for notification.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, CsrDispatchMode, 0, "Chooses DispatchMode for Csr")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDefaultFP64Settings, -1, "-1: dont override, 0: disable, 1: enable.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, RenderCompressedImagesEnabled, -1, "-1: default, 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, RenderCompressedBuffersEnabled, -1, "-1: default, 0: disabled, 1: enabled")
|
||||
|
||||
/*DRIVER TOGGLES*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceOCLVersion, 0, "Force specific OpenCL API version")
|
||||
|
||||
Reference in New Issue
Block a user