]> git.sesse.net Git - movit/commit
Make effect_id phase-local instead of global.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Jan 2014 21:07:29 +0000 (22:07 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Jan 2014 21:07:29 +0000 (22:07 +0100)
commitd4f00f9f47a0efaefabaf1efa1a0e214eeecca67
tree5bf2f37beb080479fb9ac85f333a6ad5f39efc94
parentedb0700c0a8ea225ce9add1cb4f70d42af6de381
Make effect_id phase-local instead of global.

This is mainly to reduce the number of substantially identical shaders
we have to keep around and compile; even though two chains may be
different, often, some phase (and very often, a large one at that)
will be similar. However, in the old system, since effects had global
IDs, a change in an earlier phase would displace identifiers in a
later one, and the shader would be uncacheable.

Note that this means that an effect can actually have multiple effect_ids
now (since it could already be part of multiple phases). This is the
reason why we can't just keep having a single effect_id on the node
that we set phase-locally; it really needs to be different between phases.
effect_chain.cpp
effect_chain.h