diff options
author | Jonathan Marek <jonathan@marek.ca> | 2020-06-06 11:16:16 -0400 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2020-06-10 19:39:17 +0200 |
commit | d729e10c7c1cd6099749d919655868f979322c34 (patch) | |
tree | 61447575b80ac5810bbcac5eff7324ee3896a66f | |
parent | c2957cdeceb935b5203cf15c177cc035fe6d4601 (diff) |
freedreno/a6xx: use nonbinning VS when GS is used
The current "ds = state->bs" seems broken, and the "vs = state->bs" is
unnecessary (already set above). Since it was added as part of a GS-related
patch, I think this is what was intended.
Note: tesselation disables GMEM rendering so we shouldn't have to worry
about hs/ds + binning interaction.
Fixes: 0eebedb6190fdab8956769 ("freedreno/a6xx: Emit program state for GS")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>
(cherry picked from commit 6cc95abb273a130fb396f4f0dd2b233c534fd008)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/.pick_status.json b/.pick_status.json index 204d83a24fc..de81063b455 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -742,7 +742,7 @@ "description": "freedreno/a6xx: use nonbinning VS when GS is used", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "0eebedb6190fdab8956769b2485180cc4a07119a" }, diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index fa98aae546f..d0871ce887a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -289,10 +289,11 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen, const struct ir3_shader_variant *gs = state->gs; const struct ir3_shader_variant *fs = binning_pass ? &dummy_fs : state->fs; - if (binning_pass && state->ds) - ds = state->bs; - else if (binning_pass) - vs = state->bs; + /* binning VS is wrong when GS is present, so use nonbinning VS + * TODO: compile both binning VS/GS variants correctly + */ + if (binning_pass && state->gs) + vs = state->vs; bool sample_shading = fs->per_samp | key->sample_shading; |