[Mesa-stable] [Mesa-dev] [PATCH] st/mesa: avoid sw fallback for getting/decompressing textures
Roland Scheidegger
sroland at vmware.com
Fri Feb 7 11:56:16 PST 2014
Am 07.02.2014 17:39, schrieb Brian Paul:
> If st_GetTexImage() is to decompress the texture, avoid the fallback
> path even if prefer_blit_based_texture_transfer = false. For drivers
> that returned PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 0, we
> were always taking the fallback path for texture decompression rather
> than rendering a quad. The later is a lot faster.
>
> Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/state_tracker/st_cb_texture.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index 824a13e..f0bf374 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -865,7 +865,9 @@ st_GetTexImage(struct gl_context * ctx,
> ubyte *map = NULL;
> boolean done = FALSE;
>
> - if (!st->prefer_blit_based_texture_transfer) {
> + if (!st->prefer_blit_based_texture_transfer &&
> + !_mesa_is_format_compressed(texImage->TexFormat)) {
> + /* Try to avoid the fallback if we're doing texture decompression here */
> goto fallback;
> }
>
>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
More information about the mesa-stable
mailing list