Mesa (master): st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Dec 14 14:58:54 UTC 2020
Module: Mesa
Branch: master
Commit: 614c77772ac2f48955537efcfefaf0609d6c03e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=614c77772ac2f48955537efcfefaf0609d6c03e5
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Dec 11 19:00:23 2020 -0500
st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT
the code here tries to be too smart and only use a geometry shader if there's
actually multiple layers being uploaded, but the fragment shader also unconditionally
reads gl_Layer as long as the pipe cap for gs is set, which means that
in the case when the gs is dynamically disabled due to uploading a
single-layer surface, the fs has no input to read for gl_Layer and everything breaks
always using a gs isn't ideal, but it's considerably more work to manage multiple
fs variants based on layer usage
Fixes: c99f2fe70ec ("st/mesa: implement PBO upload for multiple layers")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8067>
---
src/mesa/state_tracker/st_pbo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c
index fbc6b4ef8a2..3c197d89b53 100644
--- a/src/mesa/state_tracker/st_pbo.c
+++ b/src/mesa/state_tracker/st_pbo.c
@@ -202,7 +202,7 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr,
return false;
}
- if (addr->depth != 1 && st->pbo.use_gs && !st->pbo.gs) {
+ if (st->pbo.use_gs && !st->pbo.gs) {
st->pbo.gs = st_pbo_create_gs(st);
if (!st->pbo.gs)
return false;
More information about the mesa-commit
mailing list