Avoid checking the fb status in every bind
On some drivers (e.g. NVIDIA, tested on Windows) the status check is apparently expensive. A simple FBO test app rendering into the FBO on every frame (and thus calling bind()) shows a 19-21% CPU usage. With the patch this gets reduced to 0.8-1%. The check is fairly useless too - whenever creating attachments, the status is checked, so d->valid is up-to-date. Task-number: QTBUG-50496 Change-Id: Ie9f0db34e5c2bc1a1141c734ca0b318419013c0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
This commit is contained in:
parent
bc81a28554
commit
fd6cf5c875
@ -1077,8 +1077,6 @@ bool QOpenGLFramebufferObject::bind()
|
||||
}
|
||||
}
|
||||
|
||||
d->valid = d->checkFramebufferStatus(current);
|
||||
|
||||
return d->valid;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user