st/mesa: fix blit-based GetTexImage for non-finalized textures
authorMarek Olšák <marek.olsak@amd.com>
Sun, 1 May 2016 13:29:52 +0000 (15:29 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 2 May 2016 20:49:25 +0000 (22:49 +0200)
This fixes getteximage-depth piglit failures on radeonsi.

Cc: 11.1 11.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_cb_texture.c

index aa073b0c7814d7f859cfbb67481ab434e69d86b2..f1812665065ce6ef854cee92065ab41e65fcbc61 100644 (file)
@@ -2137,7 +2137,8 @@ st_GetTexSubImage(struct gl_context * ctx,
       goto fallback;
    }
 
-   if (!stImage->pt || !src) {
+   /* Handle non-finalized textures. */
+   if (!stImage->pt || stImage->pt != stObj->pt || !src) {
       goto fallback;
    }