OSDN Git Service

intel/compiler: Stop assuming the entrypoint is called "main"
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 29 Oct 2018 17:08:29 +0000 (12:08 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 31 Oct 2018 01:14:52 +0000 (20:14 -0500)
commitd3a0d8b750a6db5bc535f5f0b9c2c83849fee5bb
tree9be0fe6c1a96a85b53e3b69782fd7c0dc07f8d3f
parent31596836fc22e1f5b4cf85abc012acd27366db87
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 <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_vec4_nir.cpp
src/intel/vulkan/anv_pipeline.c