Skip to content

Commit b86f0b9

Browse files
sfriedmapixarlgritz
authored andcommitted
fix: Print closure missing error message at compile time instead of run time. (#1781)
Prevent complications on the GPU by printing error messages at compile time instead of generating code to print them at runtime when a closure doesn't exist. --------- Signed-off-by: Stephen Friedman <[email protected]>
1 parent e9a78a2 commit b86f0b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liboslexec/llvm_gen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3830,11 +3830,11 @@ LLVMGEN(llvm_gen_closure)
38303830
const ClosureRegistry::ClosureEntry* clentry
38313831
= rop.shadingsys().find_closure(closure_name);
38323832
if (!clentry) {
3833-
rop.llvm_gen_error(fmtformat(
3833+
rop.shadingcontext()->errorfmt(
38343834
"Closure '{}' is not supported by the current renderer, called from {}:{} in shader \"{}\", layer {} \"{}\", group \"{}\"",
38353835
closure_name, op.sourcefile(), op.sourceline(),
38363836
rop.inst()->shadername(), rop.layer(), rop.inst()->layername(),
3837-
rop.group().name()));
3837+
rop.group().name());
38383838
return false;
38393839
}
38403840

0 commit comments

Comments
 (0)