diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-08-02 20:58:30 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2016-08-08 14:01:51 -0700 |
commit | b1586526e84ab6eab2023b589da8e153f70dda50 (patch) | |
tree | 59944d5e84ec690104354f291ac2923c3e2b8912 /src/mesa/drivers/dri/i965/intel_fbo.c | |
parent | 7dfb1a4074328bcdff4b407b8f44be538180791d (diff) | |
download | external_mesa3d-b1586526e84ab6eab2023b589da8e153f70dda50.zip external_mesa3d-b1586526e84ab6eab2023b589da8e153f70dda50.tar.gz external_mesa3d-b1586526e84ab6eab2023b589da8e153f70dda50.tar.bz2 |
i965: Bail on the BLT path if BlitFramebuffer requires sRGB conversion.
Modern OpenGL BlitFramebuffer require sRGB encode/decode when
GL_FRAMEBUFFER_SRGB is enabled. The blitter can't handle this,
so we need to bail. On Gen4-5, this means falling back to Meta,
which should handle it.
We allow sRGB <-> sRGB blits, as decode then encode ought to be a noop
(other than potential precision loss, which nobody wants anyway).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_fbo.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 707a9d2..573c3a8 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -828,6 +828,14 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx, return mask; } + if (ctx->Color.sRGBEnabled && + _mesa_get_format_color_encoding(src_irb->mt->format) != + _mesa_get_format_color_encoding(dst_irb->mt->format)) { + perf_debug("glBlitFramebuffer() with sRGB conversion cannot be " + "handled by BLT path.\n"); + return mask; + } + if (!intel_miptree_blit(brw, src_irb->mt, src_irb->mt_level, src_irb->mt_layer, |