From 3d956b4bc0b346a6dff23bfe56c6b5ae1ec1ddaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 1 May 2016 15:29:52 +0200 Subject: [PATCH] st/mesa: fix blit-based GetTexImage for non-finalized textures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes getteximage-depth piglit failures on radeonsi. Cc: 11.1 11.2 Reviewed-by: Ilia Mirkin Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index aa073b0c781..f1812665065 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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; } -- 2.30.2