diff options
author | Brian Paul <[email protected]> | 2014-02-07 09:32:05 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-02-07 09:54:43 -0700 |
commit | f47e5962885d9f7de23a8c9c9ba035017e24ffd6 (patch) | |
tree | 00e30db24709ee9d293907cfd4e675981698b82c /src/mesa | |
parent | 5125165dde6ea6c3599810a92d6bcd4a5650adfd (diff) |
st/mesa: avoid sw fallback for getting/decompressing textures
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" <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 824a13e205d..f0bf3745bd5 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; } |