spirv: Stop counting inputs in entry_point_wrapper
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 1 Sep 2020 01:09:42 +0000 (20:09 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Sep 2020 18:02:50 +0000 (18:02 +0000)
nir_shader::num_inputs isn't supposed to be a count of how many input
variables we have.  It's a size of the lowered input space.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472>

src/compiler/spirv/spirv_to_nir.c

index 6bd87bfc8dbe5ca2a72c8a8658710d972e15cf16..1660611066731fb1de3f2c31bb33d72f2552e61c 100644 (file)
@@ -5574,8 +5574,6 @@ vtn_emit_kernel_entry_point_wrapper(struct vtn_builder *b,
    const char *func_name =
       ralloc_asprintf(b->shader, "__wrapped_%s", entry_point->name);
 
-   /* we shouldn't have any inputs yet */
-   vtn_assert(!entry_point->shader->num_inputs);
    vtn_assert(b->shader->info.stage == MESA_SHADER_KERNEL);
 
    nir_function *main_entry_point = nir_function_create(b->shader, func_name);
@@ -5618,7 +5616,6 @@ vtn_emit_kernel_entry_point_wrapper(struct vtn_builder *b,
          in_var->type = param_type->type;
 
       nir_shader_add_variable(b->nb.shader, in_var);
-      b->nb.shader->num_inputs++;
 
       /* we have to copy the entire variable into function memory */
       if (is_by_val) {