- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'd like to be able to create some data for each bucket that renders and to clean it up when it's done. I'd prefer it to be at that level of granularity rather than per thread (though if there's an option for that, it'd be better than nothing) as I know it won't be needed within other buckets and each bucket is single threaded with a shorter lifetime. (Though, of course, just clearing and reusing would be even nicer if it's made per thread, but reset at the start of each bucket).
It's in a camera shader, if that's relevant. Are there APIs around that would facilitate this? I've not managed to find anything obvious. Couldn't find documentation on how calls to node_initialize etc relate to threads. Do any of those happen to be done per thread?
As a worst case, even been able to get the number of threads and bucket size would be enough for me to use. Perhaps just number of threads would be enough, but for that I would need to know if pixels are completed one at a time (i.e. whether all samples within a given pixel are made sequentially or if all samples within a bucket are randomly processed within a thread)
EDIT: Now, I've gotten to the point where querying bucket size would be enough for me to get what I want. So, turns out it's in options, but only when it's non-default of 64. So I can access that, combined with using thread_local, I can get something that'll do the trick for me here.
EDIT2: Hmmm, okay, I've noticed that a single thread can have more than one bucket going at once. Is that hard coded? (if so how many) Or is it variable, if so, how can I access it?
EDIT3: the best thing for my particular case would be if I can get an index per sample within a pixel. Is that available anywhere? That's all I'm trying to generate with all this.
Cheers,
Alan.
Solved! Go to Solution.