OSDN Git Service

Use spirv-tools optimizer in GraphicsPipeline
authorChris Forbes <chrisforbes@google.com>
Thu, 31 Jan 2019 15:54:05 +0000 (07:54 -0800)
committerChris Forbes <chrisforbes@google.com>
Mon, 11 Feb 2019 19:14:27 +0000 (19:14 +0000)
commiteea21ba1c248221ea777a8bad5c9eac28b4f2e9f
tree41427686d0fd8da368e4c71cb09f946e51870f05
parent1845d5eeb9fe630ef4414b80e0e7c3ccec2c6710
Use spirv-tools optimizer in GraphicsPipeline

Run some optimization passes before lowering the code, to allow for a
simpler compiler.

Current passes:
- Exhaustively inline functions
- Apply and freeze specialization constants

I expect this set of passes will change somewhat as the
compiler evolves. We may want to stop inlining at some point.

Bug: b/124058197
Bug: b/124056625

Change-Id: Ib2a3dc2d2599449d45ac7ebb1de107deba8eb2c3
Reviewed-on: https://swiftshader-review.googlesource.com/c/24288
Tested-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
src/Vulkan/VkPipeline.cpp