Skip to content

Commit

Permalink
fix: make backfacing shadeop indicate backfacing shader-global is nee…
Browse files Browse the repository at this point in the history
…ded (#1827)

The backfacing shadeop now directly accesses the backfacing field
on the shader globals rather than calculating it from N and I.
This updates the shader-globals-needed query to reflect that
change.

Signed-off-by: Stephen Friedman <[email protected]>
  • Loading branch information
sfriedmapixar authored Jun 10, 2024
1 parent ba775bf commit b284a8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/liboslexec/runtimeoptimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3348,8 +3348,7 @@ RuntimeOptimizer::run()
m_unknown_closures_needed = true;
}
} else if (op.opname() == u_backfacing) {
m_globals_needed.insert(u_N);
m_globals_needed.insert(u_I);
m_globals_needed.insert(u_backfacing);
} else if (op.opname() == u_calculatenormal) {
m_globals_needed.insert(u_flipHandedness);
} else if (op.opname() == u_getattribute) {
Expand Down
2 changes: 1 addition & 1 deletion testsuite/globals-needed/ref/out.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Need 2 globals: I N
Need 1 globals: backfacing
Need 2 globals: P flipHandedness

0 comments on commit b284a8b

Please sign in to comment.