Mesa (master): nir/split_vars: fixup some more explicit_stride related issues.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 25 03:58:52 UTC 2019


Module: Mesa
Branch: master
Commit: 9417793fb1453ab90f0dd53bf55904fc02b28215
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9417793fb1453ab90f0dd53bf55904fc02b28215

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Mar 22 14:21:55 2019 +1000

nir/split_vars: fixup some more explicit_stride related issues.

With vkpipelinedb Samuel discovered a regression since we stopped
stripping types at the spir-v level.

This adds a check to the var splitting for the case where it
asserts the type hasn't changed, when it has just created a bare
type, and it's different than the original type which has an explicit
stride.

This also removes a pointless assert that also triggers.

Fixes: 3b3653c4cf (nir/spirv: don't use bare types, remove assert in split vars for testing)

Acked-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/compiler/nir/nir_split_vars.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_split_vars.c b/src/compiler/nir/nir_split_vars.c
index 777c4ac7225..c6fe1b59a65 100644
--- a/src/compiler/nir/nir_split_vars.c
+++ b/src/compiler/nir/nir_split_vars.c
@@ -519,7 +519,7 @@ split_var_list_arrays(nir_shader *shader,
          exec_node_remove(&var->node);
          exec_list_push_tail(&split_vars, &var->node);
       } else {
-         assert(split_type == var->type);
+         assert(split_type == glsl_get_bare_type(var->type));
          /* If we're not modifying this variable, delete the info so we skip
           * it faster in later passes.
           */
@@ -915,7 +915,6 @@ get_vec_var_usage(nir_variable *var,
    const struct glsl_type *type = var->type;
    for (unsigned i = 0; i < num_levels; i++) {
       usage->levels[i].array_len = glsl_get_length(type);
-      assert(glsl_get_explicit_stride(type) == 0);
       type = glsl_get_array_element(type);
    }
    assert(glsl_type_is_vector_or_scalar(type));




More information about the mesa-commit mailing list