Allow user to set tile size

This commit is contained in:
Jackson
2016-09-21 23:26:44 +02:00
committed by Laurent Clouet
parent 6747b666ef
commit 55b909c98b
6 changed files with 143 additions and 11 deletions

View File

@@ -633,14 +633,17 @@ public class Job {
return Type.OK;
}
private int getTileSize() {
int size = 32; // CPU
GPUDevice gpu = this.config.getGPUDevice();
if (getUseGPU() && this.config.getGPUDevice() != null) {
// GPU
// if the vram is lower than 1G reduce the size of tile to avoid black output
size = (gpu.getMemory() > 1073741824L) ? 256 : 128;
public int getTileSize() {
if (config.getTileSize() == -1) { // not set
int size = 32; // CPU
GPUDevice gpu = this.config.getGPUDevice();
if (getUseGPU() && gpu != null) {
return gpu.getRecommandedTileSize();
}
return size;
}
else {
return config.getTileSize();
}
return size;
}
}