mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Change type of residency task count to uint32_t
Move definitions of objectNotUsed and objectNotResident to GraphicsAllocation Change-Id: I2aec604a865cc6c975e9d1121028cbdd35c0b18a Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
bd4ea652ec
commit
66492a53a4
@@ -58,11 +58,12 @@ CommandStreamReceiver::~CommandStreamReceiver() {
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::makeResident(GraphicsAllocation &gfxAllocation) {
|
||||
int submissionTaskCount = this->taskCount + 1;
|
||||
if (gfxAllocation.getResidencyTaskCount(deviceIndex) < submissionTaskCount) {
|
||||
auto submissionTaskCount = this->taskCount + 1;
|
||||
bool isNotResident = !gfxAllocation.isResident(deviceIndex);
|
||||
if (isNotResident || gfxAllocation.getResidencyTaskCount(deviceIndex) < submissionTaskCount) {
|
||||
this->getResidencyAllocations().push_back(&gfxAllocation);
|
||||
gfxAllocation.updateTaskCount(submissionTaskCount, deviceIndex);
|
||||
if (!gfxAllocation.isResident(deviceIndex)) {
|
||||
if (isNotResident) {
|
||||
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
||||
}
|
||||
}
|
||||
@@ -105,7 +106,7 @@ void CommandStreamReceiver::makeResidentHostPtrAllocation(GraphicsAllocation *gf
|
||||
|
||||
void CommandStreamReceiver::waitForTaskCountAndCleanAllocationList(uint32_t requiredTaskCount, uint32_t allocationUsage) {
|
||||
auto address = getTagAddress();
|
||||
if (address && requiredTaskCount != ObjectNotUsed) {
|
||||
if (address) {
|
||||
while (*address < requiredTaskCount)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ FlushStamp CommandStreamReceiverWithAUBDump<BaseCSR>::flush(BatchBuffer &batchBu
|
||||
|
||||
template <typename BaseCSR>
|
||||
void CommandStreamReceiverWithAUBDump<BaseCSR>::makeNonResident(GraphicsAllocation &gfxAllocation) {
|
||||
int residencyTaskCount = gfxAllocation.getResidencyTaskCount(this->deviceIndex);
|
||||
uint32_t residencyTaskCount = gfxAllocation.getResidencyTaskCount(this->deviceIndex);
|
||||
BaseCSR::makeNonResident(gfxAllocation);
|
||||
gfxAllocation.updateResidencyTaskCount(residencyTaskCount, this->deviceIndex);
|
||||
if (aubCSR) {
|
||||
|
||||
Reference in New Issue
Block a user