nir: Fix count when we didn't lower load_uniforms but did shift load_ubos.
authorEric Anholt <eric@anholt.net>
Mon, 11 May 2020 18:53:22 +0000 (11:53 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 12 May 2020 17:01:55 +0000 (17:01 +0000)
commit4553fc66a5f23607c2e872d8ac8755c747bd0bd2
treedd69b313374bf02ad2de651c7690beeeec52ef1b
parent0f2e44d55b01b3637fb96ce18840b8ab9250d508
nir: Fix count when we didn't lower load_uniforms but did shift load_ubos.

The fixed commit was really nice in mostly fixing num_ubos to reflect the
shader after lowering, but for
dEQP-GLES31.functional.compute.basic.ubo_to_ssbo_single_invocation there
are no default uniforms and so we skipped the increment, even though we
shifted the block index up.

Fixes: 4777ee1a62f0 ("nir: Always create UBO variable when lowering uniforms to ubo")
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4992>
src/compiler/nir/nir_lower_uniforms_to_ubo.c