P4 to Git Change 1310033 by skudchad@skudchad_test_win_opencl2 on 2016/09/01 18:10:18
SWDEV-101383 - [RS_DVR][MGPU] Slave GPU is blocked from going into BACO when DVR process is active (no recording or instant replay) - if the OS is Win10, no need to do extensive adapter init. ReviewBoardURL = http://ocltc.amd.com/reviews/r/11241/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#552 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#171 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#60 edit
Este commit está contenido en:
@@ -1800,6 +1800,7 @@ Device::bindExternalDevice(
|
||||
}
|
||||
return false;
|
||||
}
|
||||
CloseInitializedAdapter();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -1816,6 +1817,7 @@ Device::bindExternalDevice(
|
||||
LogError("Failed gslD3D10Associate()");
|
||||
return false;
|
||||
}
|
||||
CloseInitializedAdapter();
|
||||
}
|
||||
|
||||
if (flags & amd::Context::Flags::D3D11DeviceKhr) {
|
||||
@@ -1831,6 +1833,7 @@ Device::bindExternalDevice(
|
||||
LogError("Failed gslD3D11Associate()");
|
||||
return false;
|
||||
}
|
||||
CloseInitializedAdapter();
|
||||
}
|
||||
|
||||
if (flags & amd::Context::Flags::D3D9DeviceKhr) {
|
||||
@@ -1842,6 +1845,7 @@ Device::bindExternalDevice(
|
||||
LogWarning("D3D9<->OpenCL adapter mismatch or D3D9Associate() failure");
|
||||
return false;
|
||||
}
|
||||
CloseInitializedAdapter();
|
||||
}
|
||||
|
||||
if (flags & amd::Context::Flags::D3D9DeviceEXKhr) {
|
||||
@@ -1853,6 +1857,7 @@ Device::bindExternalDevice(
|
||||
LogWarning("D3D9<->OpenCL adapter mismatch or D3D9Associate() failure");
|
||||
return false;
|
||||
}
|
||||
CloseInitializedAdapter();
|
||||
}
|
||||
|
||||
if (flags & amd::Context::Flags::D3D9DeviceVAKhr) {
|
||||
|
||||
@@ -44,6 +44,7 @@ void CALGSLDevice::Initialize()
|
||||
m_isComputeRingIDForced = false;
|
||||
m_forcedComputeEngineID = GSL_ENGINEID_INVALID;
|
||||
gslDeviceOps_ = NULL;
|
||||
m_initLite = 0;
|
||||
}
|
||||
|
||||
CALGSLDevice::CALGSLDevice()
|
||||
@@ -290,7 +291,22 @@ void
|
||||
CALGSLDevice::PerformAdapterInitialization() const
|
||||
{
|
||||
CALGSLDevice* mutable_this = const_cast<CALGSLDevice*>(this);
|
||||
mutable_this->PerformAdapterInitialization_int(false);
|
||||
// Win10 initialization is more exhaustive.
|
||||
// @ToDo Check if Win7 can be simplified as well
|
||||
mutable_this->PerformAdapterInitialization_int((bool)m_initLite);
|
||||
}
|
||||
|
||||
void CALGSLDevice::CloseInitializedAdapter()
|
||||
{
|
||||
// @ToDo Check if Win7 can be simplified as well
|
||||
if (m_initLite)
|
||||
{
|
||||
//! @note: GSL device isn't thread safe
|
||||
amd::ScopedLock k(gslDeviceOps());
|
||||
// close the adaptor
|
||||
gsAdaptor::closeAdaptor(m_adp);
|
||||
m_adp = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -306,15 +322,14 @@ CALGSLDevice::PerformFullInitialization() const
|
||||
bool
|
||||
CALGSLDevice::SetupAdapter(int32 &asic_id)
|
||||
{
|
||||
bool initLite = false;
|
||||
#ifdef ATI_OS_WIN
|
||||
if(osGetVersion() >= AMD_OS_VERSION_WINDOWS_10)
|
||||
{
|
||||
initLite = true;
|
||||
m_initLite = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
PerformAdapterInitialization_int(initLite);
|
||||
PerformAdapterInitialization_int((bool)m_initLite);
|
||||
|
||||
if (m_adp == 0)
|
||||
{
|
||||
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
|
||||
void PerformAdapterInitialization() const;
|
||||
void PerformFullInitialization() const;
|
||||
void CloseInitializedAdapter();
|
||||
|
||||
CopyType GetCopyType(gslMemObject srcMem, gslMemObject destMem, size_t* srcOffset,
|
||||
size_t* destOffset, bool allowDMA, uint32 flags, size_t size, bool enableCopyRect) const;
|
||||
@@ -207,6 +208,7 @@ private:
|
||||
uint m_PerformLazyDeviceInit : 1;
|
||||
uint m_isComputeRingIDForced : 1;
|
||||
uint m_isSDMAL2TConstrained : 1;
|
||||
uint m_initLite : 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Referencia en una nueva incidencia
Block a user