[17/n] Internal 4GB allocator.

- Make sure that blocks ISA is made resident
- both blocked & non blocked path
- fix a bug where private surface was not made resident in blocked path.

Change-Id: Ie564595b176b94ecc7c79d7efeae20598c5874fb
This commit is contained in:
Mrozek, Michal
2018-03-27 09:24:26 +02:00
committed by sys_ocldev
parent 51fdd2a18f
commit 09923fcb39
6 changed files with 107 additions and 9 deletions

View File

@@ -20,6 +20,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "runtime/command_stream/command_stream_receiver.h"
#include "runtime/helpers/debug_helpers.h"
#include "runtime/program/block_kernel_manager.h"
#include "runtime/program/kernel_info.h"
@@ -61,4 +62,17 @@ GraphicsAllocation *BlockKernelManager::getPrivateSurface(size_t ordinal) {
return blockPrivateSurfaceArray[ordinal];
return nullptr;
}
void BlockKernelManager::makeInternalAllocationsResident(CommandStreamReceiver &commandStreamReceiver) {
auto blockCount = blockKernelInfoArray.size();
for (uint32_t surfaceIndex = 0; surfaceIndex < blockCount; surfaceIndex++) {
auto surface = getPrivateSurface(surfaceIndex);
if (surface) {
commandStreamReceiver.makeResident(*surface);
}
surface = blockKernelInfoArray[surfaceIndex]->getGraphicsAllocation();
if (surface) {
commandStreamReceiver.makeResident(*surface);
}
}
}
} // namespace OCLRT