Mesa (master): nir: Fix count when we didn't lower load_uniforms but did shift load_ubos.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 12 17:22:44 UTC 2020
Module: Mesa
Branch: master
Commit: 4553fc66a5f23607c2e872d8ac8755c747bd0bd2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4553fc66a5f23607c2e872d8ac8755c747bd0bd2
Author: Eric Anholt <eric at anholt.net>
Date: Mon May 11 11:53:22 2020 -0700
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 at google.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4992>
---
src/compiler/nir/nir_lower_uniforms_to_ubo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_lower_uniforms_to_ubo.c b/src/compiler/nir/nir_lower_uniforms_to_ubo.c
index 1046fdc6117..eef0d41440f 100644
--- a/src/compiler/nir/nir_lower_uniforms_to_ubo.c
+++ b/src/compiler/nir/nir_lower_uniforms_to_ubo.c
@@ -110,6 +110,7 @@ nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier)
var->data.binding++;
}
}
+ shader->info.num_ubos++;
if (shader->num_uniforms > 0) {
const struct glsl_type *type = glsl_array_type(glsl_vec4_type(),
@@ -126,7 +127,6 @@ nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier)
ubo->interface_type =
glsl_interface_type(&field, 1, GLSL_INTERFACE_PACKING_STD430,
false, "__ubo0_interface");
- shader->info.num_ubos++;
}
}
More information about the mesa-commit
mailing list