glspirv: Don't re-use entry_point pointer from spirv_to_nir
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sun, 19 May 2019 06:57:25 +0000 (23:57 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 29 May 2019 17:34:30 +0000 (10:34 -0700)
Replace its use with checking for is_entrypoint.

This is a preparation to change spirv_to_nir() return type.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/glspirv.c

index 84550e96ff6520409afbffb8cc37d634f64cd0ca..8d1ac9b5072c52377b06fb6b8e31ba9f05ad11fb 100644 (file)
@@ -251,7 +251,7 @@ _mesa_spirv_to_nir(struct gl_context *ctx,
 
    /* Pick off the single entrypoint that we want */
    foreach_list_typed_safe(nir_function, func, node, &nir->functions) {
-      if (func != entry_point)
+      if (!func->is_entrypoint)
          exec_node_remove(&func->node);
    }
    assert(exec_list_length(&nir->functions) == 1);