diff options
author | Eric Anholt <eric@anholt.net> | 2020-12-11 13:11:26 -0800 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2021-01-06 09:31:46 -0800 |
commit | cf5fe357d6bac1a33ae784d8e1bab5fa199b51c9 (patch) | |
tree | a95288312ade51c262dda764c8b0fdb817961219 | |
parent | 071a87ac7f9e218b2f11be85d04b4786a3e6dad6 (diff) |
gallium/ntt: Fix emitting UBO declarations.
Fixes: d70fff99c5bc ("nir: Use a single list for all shader variables")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8196>
(cherry picked from commit ec0bab8ca9eaed4648cf9e90398606fa4fc6e747)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/nir/nir_to_tgsi.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json index a5b53269bc1..40660090938 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -589,7 +589,7 @@ "description": "gallium/ntt: Fix emitting UBO declarations.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "d70fff99c5bc3a721e20869e7f0be8024ffe5ecd" }, diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 7d23ab08bce..35477e11e89 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -258,8 +258,6 @@ ntt_setup_uniforms(struct ntt_compile *c) var->data.image.format, !var->data.read_only, false); - } else if (var->data.mode == nir_var_mem_ubo) { - ureg_DECL_constant2D(c->ureg, 0, 0, var->data.driver_location + 1); } else { unsigned size; if (packed) { @@ -274,6 +272,10 @@ ntt_setup_uniforms(struct ntt_compile *c) } } + nir_foreach_variable_with_modes(var, c->s, nir_var_mem_ubo) { + ureg_DECL_constant2D(c->ureg, 0, 0, var->data.driver_location + 1); + } + for (int i = 0; i < PIPE_MAX_SAMPLERS; i++) { if (c->s->info.textures_used & (1 << i)) ureg_DECL_sampler(c->ureg, i); |