mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
HostPtr surface makeResident must be called once
Change-Id: I9cb04e3affdd8b8634466621b50326a088ecdcf9
This commit is contained in:
committed by
sys_ocldev
parent
f9254c8de6
commit
86bb715b95
@@ -489,10 +489,16 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
|
||||
}
|
||||
|
||||
auto mediaSamplerRequired = false;
|
||||
Kernel *kernel = nullptr;
|
||||
for (auto &dispatchInfo : multiDispatchInfo) {
|
||||
dispatchInfo.getKernel()->makeResident(commandStreamReceiver);
|
||||
requiresCoherency |= dispatchInfo.getKernel()->requiresCoherency();
|
||||
mediaSamplerRequired |= dispatchInfo.getKernel()->isVmeKernel();
|
||||
if (kernel != dispatchInfo.getKernel()) {
|
||||
kernel = dispatchInfo.getKernel();
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
kernel->makeResident(commandStreamReceiver);
|
||||
requiresCoherency |= kernel->requiresCoherency();
|
||||
mediaSamplerRequired |= kernel->isVmeKernel();
|
||||
}
|
||||
|
||||
if (mediaSamplerRequired) {
|
||||
@@ -617,11 +623,17 @@ void CommandQueueHw<GfxFamily>::enqueueBlocked(
|
||||
} else {
|
||||
//store task data in event
|
||||
std::vector<Surface *> allSurfaces;
|
||||
Kernel *kernel = nullptr;
|
||||
for (auto &dispatchInfo : multiDispatchInfo) {
|
||||
dispatchInfo.getKernel()->getResidency(allSurfaces);
|
||||
for (auto &surface : CreateRange(surfaces, surfaceCount)) {
|
||||
allSurfaces.push_back(surface->duplicate());
|
||||
if (kernel != dispatchInfo.getKernel()) {
|
||||
kernel = dispatchInfo.getKernel();
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
kernel->getResidency(allSurfaces);
|
||||
}
|
||||
for (auto &surface : CreateRange(surfaces, surfaceCount)) {
|
||||
allSurfaces.push_back(surface->duplicate());
|
||||
}
|
||||
|
||||
auto kernelOperation = std::unique_ptr<KernelOperation>(blockedCommandsData); // marking ownership
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -274,9 +274,9 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
bool isVmeKernel() { return kernelInfo.isVmeWorkload; };
|
||||
|
||||
//residency for kernel surfaces
|
||||
void makeResident(CommandStreamReceiver &commandStreamReceiver);
|
||||
MOCKABLE_VIRTUAL void makeResident(CommandStreamReceiver &commandStreamReceiver);
|
||||
void updateWithCompletionStamp(CommandStreamReceiver &commandStreamReceiver, CompletionStamp *completionStamp);
|
||||
void getResidency(std::vector<Surface *> &dst);
|
||||
MOCKABLE_VIRTUAL void getResidency(std::vector<Surface *> &dst);
|
||||
bool requiresCoherency();
|
||||
void resetSharedObjectsPatchAddresses();
|
||||
bool isUsingSharedObjArgs() { return usingSharedObjArgs; }
|
||||
|
||||
Reference in New Issue
Block a user