diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2020-12-11 19:00:23 -0500 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2020-12-14 09:32:41 -0800 |
commit | 5ac08afcfc7a3bef254c4ef608f37d24b8aa07b6 (patch) | |
tree | c64fb3a0ab8c7355f6a6cf94b16be453295a7ce6 | |
parent | 2ac5dec4f1b3a58187f9afc63cda3d0edba3c9cd (diff) |
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@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8067>
(cherry picked from commit 614c77772ac2f48955537efcfefaf0609d6c03e5)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_pbo.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index c2b359156e8..b8de47a28fa 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -157,7 +157,7 @@ "description": "st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "c99f2fe70ec6a9273786d123fa4ac9924b5911b2" }, diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index ee5ee2df598..f6abffd7454 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; |