diff options
author | Rob Clark <[email protected]> | 2019-05-01 10:41:51 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-05-02 11:19:22 -0700 |
commit | 32925f407248dfdd6994523d7a895112da8a82ae (patch) | |
tree | f6e3769aac1cb2f5883d088a33fbafe3475281c4 /src/freedreno/ir3/ir3_nir.c | |
parent | ff4168c4186d93c00fe7a5d13c28bbaff734b3a0 (diff) |
freedreno/ir3: fix shader variants vs UBO analysis
Otherwise we zero out the state again, but all the UBO loads that we
could lower are already lowered. End result is that we didn't emit the
uniforms for lowered UBO access in any case where multiple shader
variants are used.
Fixes: 893425a607a freedreno/ir3: Push UBOs to constant file
Fixes: 3c8779af325 freedreno/ir3: Enable PIPE_CAP_PACKED_UNIFORMS
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_nir.c')
-rw-r--r-- | src/freedreno/ir3/ir3_nir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 76230e3be50..43b9c4d7287 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -228,8 +228,10 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s, /* do ubo load and idiv lowering after first opt loop to get a chance to * propagate constants for divide by immed power-of-two and constant ubo * block/offsets: + * + * NOTE that UBO analysis pass should only be done once, before variants */ - const bool ubo_progress = OPT(s, ir3_nir_analyze_ubo_ranges, shader); + const bool ubo_progress = !key && OPT(s, ir3_nir_analyze_ubo_ranges, shader); const bool idiv_progress = OPT(s, nir_lower_idiv); if (ubo_progress || idiv_progress) ir3_optimize_loop(s); |