Simplify the caller by reporting the incompatible formats rather than asserting the caller doesn't request sRGB encoding/decoding. --- src/mesa/drivers/dri/i965/intel_blit.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index 1da37ed730..6db3c37e9d 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.c +++ b/src/mesa/drivers/dri/i965/intel_blit.c @@ -140,14 +140,17 @@ blt_pitch(struct intel_mipmap_tree *mt) bool intel_miptree_blit_compatible_formats(mesa_format src, mesa_format dst) { - /* The BLT doesn't handle sRGB conversion */ - assert(src == _mesa_get_srgb_format_linear(src)); - assert(dst == _mesa_get_srgb_format_linear(dst)); - /* No swizzle or format conversions possible, except... */ if (src == dst) return true; + /* The BLT doesn't handle sRGB conversion */ + if (src != _mesa_get_srgb_format_linear(src)) + return false; + + if (dst != _mesa_get_srgb_format_linear(dst)) + return false; + /* ...we can either discard the alpha channel when going from A->X, * or we can fill the alpha channel with 0xff when going from X->A */ -- 2.13.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev