From e8a6bf6e1032ea62082ca303446f46a47ae3604c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 14 Dec 2020 11:48:39 -0500 Subject: st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT and skip gs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the previous commit handling this forced geometry shader usage for all cases, but this is not ideal, so instead there are now fragment shader variants for both depth==1 and depth!=1, corresponding to the existence of gl_Layer in the shader Fixes: 614c77772ac ("st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT") Acked-by: Marek Olšák Part-of: (cherry picked from commit 36097fc7ef70471ecfecd428f990233276e9c45b) --- src/mesa/state_tracker/st_cb_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker/st_cb_texture.c') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 2296dd614a6..9f945663fe5 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1271,7 +1271,7 @@ try_pbo_upload_common(struct gl_context *ctx, bool success = false; void *fs; - fs = st_pbo_get_upload_fs(st, src_format, surface->format); + fs = st_pbo_get_upload_fs(st, src_format, surface->format, addr->depth != 1); if (!fs) return false; -- cgit v1.2.3