[PAL] Skip extra calls to MakeResident

With the PAL_ALWAYS_RESIDENT flag memory objects are resident at allocation time, no need to make them resident again before submit.

Also we should never evict anything with this setting, or we'll generate a VM fault.

Change-Id: Ieacc6af88ab4e09c20efd94100e148b2502e1d70
Este commit está contenido en:
Vladislav Sytchenko
2020-10-09 14:13:32 -04:00
padre 099dbb7f13
commit fd09a7a23c
+2 -2
Ver fichero
@@ -339,7 +339,7 @@ void VirtualGPU::Queue::addCmdDoppRef(Pal::IGpuMemory* iMem, bool lastDoppCmd, b
}
bool VirtualGPU::Queue::flush() {
if (palMemRefs_.size() != 0) {
if (!gpu_.dev().settings().alwaysResident_ && palMemRefs_.size() != 0) {
if (Pal::Result::Success !=
iDev_->AddGpuMemoryReferences(palMemRefs_.size(), &palMemRefs_[0], iQueue_,
Pal::GpuMemoryRefCantTrim)) {
@@ -450,7 +450,7 @@ bool VirtualGPU::Queue::flush() {
}
}
}
if (palMems_.size() != 0) {
if (!gpu_.dev().settings().alwaysResident_ && palMems_.size() != 0) {
iDev_->RemoveGpuMemoryReferences(palMems_.size(), &palMems_[0], iQueue_);
palMems_.clear();
}