Skip to content

Commit

Permalink
Don't merge layers that produce renderer outputs.
Browse files Browse the repository at this point in the history
After talking this over with Luke Emrose it seems unwise to allow
merging of layers that produce renderer outputs.

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Nov 12, 2020
1 parent 4b1f7b7 commit b1f8e91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/liboslexec/instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ ShaderInstance::mergeable (const ShaderInstance &b, const ShaderGroup& /*g*/) co
if (master() != b.master())
return false;

// If one or both instances are directly hooked up to renderer outputs,
// don't merge them.
if (renderer_outputs() || b.renderer_outputs())
return false;

// If the shaders haven't been optimized yet, they don't yet have
// their own symbol tables and instructions (they just refer to
// their unoptimized master), but they may have an "instance
Expand Down

0 comments on commit b1f8e91

Please sign in to comment.