-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batched closures #1500
Batched closures #1500
Conversation
// zero out the closure parameter memory. | ||
if (clentry->prepare) { | ||
// Call clentry->prepare(renderservices *, int id, void *mem) | ||
llvm::Value *funct_ptr = rop.ll.constant_ptr((void *)clentry->prepare, rop.llvm_type_prepare_closure_func()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was(is) there a unit test that exercised the prepare function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK There is not -- there isn't anything that appears to exercise it in the single-point testsuite either. I did a best-effort at making it match the single point implementation. Maybe Larry or someone else can comment on if this is a critical feature or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The renderer interface for closures, including registering and processing them remains unchanged. The Ci variable in BatchedShaderGlobals has moved from the uniform portion to the varying portion, which may require changes to any renderer code that was utilizing the BatchedShaderGlobals. To utilize closures with the batched interface, you register the closures per usual, then once shading has finished, the Ci in BatchedShaderGlobals will contain an Block of pointers to the roots of a closure trees that can be processed independently just like in the normal single-point interface. This initial implementation is largely functional, however, there may be more optimization gains available in the code that copies the run-time SIMD values and scatters them to the separate closure-data locations. One remaining un-implemented feature is passing _closures_ via get/setmessage() when using the batched shading interface, and the locations where that would need to be implemented are marked in the source. Signed-off-by: Stephen Friedman <[email protected]>
* Remove unneded Block specializations for pointers. * Rename null variable to null_value. * remove a 0 default param to rop.llvm_void_ptr in batched_llvm_gen.cpp:llvm_gen_mul * Optimizations to masking and loading in wide_opclosure.cpp * Fix LLVM11+ builds by using llvm_vecor_type instead of llvm::VectorType::get Signed-off-by: Stephen Friedman <[email protected]>
…instantiating the templates. Signed-off-by: Stephen Friedman <[email protected]>
Description
Tests
Checklist: