mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
intel: Don't spam "intelReadPixels: fallback to swrast" in non-PBO case.
When an application is using PBOs, we attempt to use the BLT engine to perform ReadPixels. If that fails due to some restrictions, it's useful to raise a performance warning. In the non-PBO case, we always use a CPU mapping since getting the data into client memory requires a CPU-side copy. This is a very common case, so raising a performance warning is annoying. In particular, apitrace's image dumping code hits this path, causing it to print hundreds of thousands of performance warnings via ARB_debug_output. This tends to obscure actual errors or other important messages. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
46ea804107
commit
ccb041fe8e
1 changed files with 10 additions and 11 deletions
|
|
@ -89,12 +89,7 @@ do_blit_readpixels(struct gl_context * ctx,
|
|||
if (!src)
|
||||
return false;
|
||||
|
||||
if (!_mesa_is_bufferobj(pack->BufferObj)) {
|
||||
/* PBO only for now:
|
||||
*/
|
||||
DBG("%s - not PBO\n", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
assert(_mesa_is_bufferobj(pack->BufferObj));
|
||||
|
||||
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
|
||||
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
|
||||
|
|
@ -178,9 +173,15 @@ intelReadPixels(struct gl_context * ctx,
|
|||
|
||||
DBG("%s\n", __FUNCTION__);
|
||||
|
||||
if (do_blit_readpixels
|
||||
(ctx, x, y, width, height, format, type, pack, pixels))
|
||||
return;
|
||||
if (_mesa_is_bufferobj(pack->BufferObj)) {
|
||||
/* Using PBOs, so try the BLT based path. */
|
||||
if (do_blit_readpixels(ctx, x, y, width, height, format, type, pack,
|
||||
pixels)) {
|
||||
return;
|
||||
}
|
||||
|
||||
perf_debug("%s: fallback to CPU mapping in PBO case\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
/* glReadPixels() wont dirty the front buffer, so reset the dirty
|
||||
* flag after calling intel_prepare_render(). */
|
||||
|
|
@ -188,8 +189,6 @@ intelReadPixels(struct gl_context * ctx,
|
|||
intel_prepare_render(intel);
|
||||
intel->front_buffer_dirty = dirty;
|
||||
|
||||
perf_debug("%s: fallback to swrast\n", __FUNCTION__);
|
||||
|
||||
/* Update Mesa state before calling _mesa_readpixels().
|
||||
* XXX this may not be needed since ReadPixels no longer uses the
|
||||
* span code.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue