P4 to Git Change 1211165 by gandryey@gera-ubuntu14 on 2015/11/13 14:36:37

SWDEV-78467 - OpenCL LiquidFlash feature
	- Add staging transfer support for invisible memory
	- Don't fallback to USWC memory if persistent allocation failed

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#262 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#231 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#390 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#137 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#80 edit
This commit is contained in:
foreman
2015-11-13 15:09:15 -05:00
parent b70c72025b
commit 8a7bac7048
6 changed files with 90 additions and 21 deletions
+4 -1
View File
@@ -445,6 +445,7 @@ Resource::create(MemoryType memType, CreateParams* params)
desc.mipLevels = cal()->mipLevels_;
desc.systemMemory = NULL;
uint allocAttempt = 0;
do {
// Find a type for allocation
if (memoryType() == Persistent) {
@@ -515,7 +516,8 @@ Resource::create(MemoryType memType, CreateParams* params)
if (memoryType() == Local) {
cal_.type_ = Persistent;
}
else if (memoryType() == Persistent) {
// Don't switch to USWC if persistent memory was explicitly asked
else if ((allocAttempt > 0) && (memoryType() == Persistent)) {
cal_.type_ = RemoteUSWC;
}
// Remote cacheable to uncacheable
@@ -525,6 +527,7 @@ Resource::create(MemoryType memType, CreateParams* params)
else {
break;
}
allocAttempt++;
}
}
while (!calRes);