diff options
author | Jason Ekstrand <[email protected]> | 2018-10-29 12:08:29 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-10-30 20:14:52 -0500 |
commit | d3a0d8b750a6db5bc535f5f0b9c2c83849fee5bb (patch) | |
tree | 9be0fe6c1a96a85b53e3b69782fd7c0dc07f8d3f /src/intel/compiler/brw_vec4_nir.cpp | |
parent | 31596836fc22e1f5b4cf85abc012acd27366db87 (diff) |
intel/compiler: Stop assuming the entrypoint is called "main"
This isn't true for Vulkan so we have to whack it to "main" in anv which
is silly. Instead of walking the list of functions and asserting that
everything is named "main" and hoping there's only one function named
"main", just use the nir_shader_get_entrypoint() helper which has better
assertions anyway.
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_vec4_nir.cpp')
-rw-r--r-- | src/intel/compiler/brw_vec4_nir.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp index 5ccfd1f8940..19ee79367c8 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -37,12 +37,7 @@ vec4_visitor::emit_nir_code() if (nir->num_uniforms > 0) nir_setup_uniforms(); - /* get the main function and emit it */ - nir_foreach_function(function, nir) { - assert(strcmp(function->name, "main") == 0); - assert(function->impl); - nir_emit_impl(function->impl); - } + nir_emit_impl(nir_shader_get_entrypoint((nir_shader *)nir)); } void |