P4 to Git Change 2001943 by gandryey@gera-win10 on 2019/09/20 17:49:31
SWDEV-86035 - Switch GPUOpen to the new interface 40 Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbedefs#50 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#164 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palgpuopen.cpp#16 edit
This commit is contained in:
@@ -889,8 +889,7 @@ bool Device::create(Pal::IDevice* device) {
|
||||
asicRevision_ = properties().revision;
|
||||
|
||||
// XNACK flag should be set for PageMigration | IOMMUv2 Support
|
||||
uint isXNACKSupported =
|
||||
(ipLevel_ < Pal::GfxIpLevel::GfxIp10_1) &&
|
||||
uint isXNACKSupported = (ipLevel_ < Pal::GfxIpLevel::GfxIp10_1) &&
|
||||
(static_cast<uint>(properties_.gpuMemoryProperties.flags.pageMigrationEnabled ||
|
||||
properties_.gpuMemoryProperties.flags.iommuv2Support));
|
||||
uint subtarget = isXNACKSupported;
|
||||
@@ -912,9 +911,9 @@ bool Device::create(Pal::IDevice* device) {
|
||||
for (uint i = 0; i < properties().engineProperties[Pal::EngineTypeCompute].engineCount; ++i) {
|
||||
if (properties().engineProperties[Pal::EngineTypeCompute].capabilities[i].flags.exclusive) {
|
||||
if ((properties()
|
||||
.engineProperties[Pal::EngineTypeCompute]
|
||||
.capabilities[i]
|
||||
.queuePrioritySupport == Pal::SupportQueuePriorityRealtime) &&
|
||||
.engineProperties[Pal::EngineTypeCompute]
|
||||
.capabilities[i]
|
||||
.queuePrioritySupport == Pal::SupportQueuePriorityRealtime) &&
|
||||
(properties().engineProperties[Pal::EngineTypeCompute].maxNumDedicatedCu > 0)) {
|
||||
if (exclusiveComputeEnginesId_.find(ExclusiveQueueType::RealTime0) !=
|
||||
exclusiveComputeEnginesId_.end()) {
|
||||
@@ -923,9 +922,9 @@ bool Device::create(Pal::IDevice* device) {
|
||||
exclusiveComputeEnginesId_.insert({ExclusiveQueueType::RealTime0, i});
|
||||
}
|
||||
} else if (properties()
|
||||
.engineProperties[Pal::EngineTypeCompute]
|
||||
.capabilities[i]
|
||||
.queuePrioritySupport == Pal::SupportQueuePriorityMedium) {
|
||||
.engineProperties[Pal::EngineTypeCompute]
|
||||
.capabilities[i]
|
||||
.queuePrioritySupport == Pal::SupportQueuePriorityMedium) {
|
||||
exclusiveComputeEnginesId_.insert({ExclusiveQueueType::Medium, i});
|
||||
}
|
||||
} else {
|
||||
@@ -1106,18 +1105,21 @@ bool Device::create(Pal::IDevice* device) {
|
||||
// Master function that handles developer callbacks from PAL.
|
||||
void PAL_STDCALL Device::PalDeveloperCallback(void* pPrivateData, const Pal::uint32 deviceIndex,
|
||||
Pal::Developer::CallbackType type, void* pCbData) {
|
||||
VirtualGPU* gpu = nullptr;
|
||||
Device* device = static_cast<Device*>(pPrivateData);
|
||||
const auto& barrier = *static_cast<const Pal::Developer::BarrierData*>(pCbData);
|
||||
|
||||
const auto* pBarrierData = reinterpret_cast<const Pal::Developer::BarrierData*>(pCbData);
|
||||
if ((type == Pal::Developer::CallbackType::BarrierBegin) ||
|
||||
(type == Pal::Developer::CallbackType::BarrierEnd)) {
|
||||
const auto* pBarrierData = reinterpret_cast<const Pal::Developer::BarrierData*>(pCbData);
|
||||
|
||||
VirtualGPU* gpu = nullptr;
|
||||
if (pBarrierData->pCmdBuffer != nullptr) {
|
||||
// Find which queue the current command buffer belongs
|
||||
for (const auto& it : device->vgpus()) {
|
||||
if (it->isActiveCmd(pBarrierData->pCmdBuffer)) {
|
||||
gpu = it;
|
||||
break;
|
||||
if (pBarrierData->pCmdBuffer != nullptr) {
|
||||
// Find which queue the current command buffer belongs
|
||||
for (const auto& it : device->vgpus()) {
|
||||
if (it->isActiveCmd(pBarrierData->pCmdBuffer)) {
|
||||
gpu = it;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1156,8 +1158,7 @@ bool Device::initializeHeapResources() {
|
||||
|
||||
for (const auto& it : exclusiveComputeEnginesId_) {
|
||||
// Request real time compute engines
|
||||
finalizeInfo.requestedEngineCounts[Pal::EngineTypeCompute].engines |=
|
||||
(1 << it.second);
|
||||
finalizeInfo.requestedEngineCounts[Pal::EngineTypeCompute].engines |= (1 << it.second);
|
||||
}
|
||||
// Request all SDMA engines
|
||||
finalizeInfo.requestedEngineCounts[Pal::EngineTypeDma].engines = (1 << numDmaEngines_) - 1;
|
||||
|
||||
@@ -224,7 +224,7 @@ void RgpCaptureMgr::WaitForDriverResume() {
|
||||
|
||||
assert(pDriverControlServer != nullptr);
|
||||
|
||||
pDriverControlServer->WaitForDriverResume();
|
||||
pDriverControlServer->DriverTick();
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
@@ -682,7 +682,7 @@ void RgpCaptureMgr::PostDeviceCreate() {
|
||||
// whether or not the debug vmid has been acquired. External tools use this information to
|
||||
// decide when it's reasonable to make certain requests of the driver through protocol functions.
|
||||
if (pDriverControlServer->IsDriverInitialized() == false) {
|
||||
pDriverControlServer->FinishDriverInitialization();
|
||||
pDriverControlServer->FinishDeviceInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user