From: Christian König Date: Thu, 14 Jan 2016 12:38:10 +0000 (+0100) Subject: radeonsi: ignore PIPE_BIND_LINEAR in si_is_format_supported v2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7eb5e5b8b4ae51be367050df48d3a9398694d3bc;p=mesa.git radeonsi: ignore PIPE_BIND_LINEAR in si_is_format_supported v2 Linear layout should work for all not compressed or depth/stencil formats. v2: restrict it a bit more Signed-off-by: Christian König Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index a2b0da90ec9..10d691a92f1 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2046,6 +2046,11 @@ boolean si_is_format_supported(struct pipe_screen *screen, if (usage & PIPE_BIND_TRANSFER_WRITE) retval |= PIPE_BIND_TRANSFER_WRITE; + if ((usage & PIPE_BIND_LINEAR) && + !util_format_is_compressed(format) && + !(usage & PIPE_BIND_DEPTH_STENCIL)) + retval |= PIPE_BIND_LINEAR; + return retval == usage; }