Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-16Cycles: Refactor Image Texture limits.Thomas Dinges
Instead of treating Fermi GPU limits as default, and overriding them for other devices, we now nicely set them for each platform. * Due to setting values for all platforms, we don't have to offset the slot id for OpenCL anymore, as the image manager wont add float images for OpenCL now. * Bugfix: TEX_NUM_FLOAT_IMAGES was always 5, even for CPU, so the code in svm_image.h clamped float textures with alpha on CPU after the 5th slot. Reviewers: #cycles, brecht Reviewed By: #cycles, brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D1925
2016-04-16Cleanup: Move texture definitions to util, to avoid bad level include.Thomas Dinges
2016-04-15Fix T48139: Checker texture strange behavior in cyclesSergey Sharybin
Seems particular CUDA implementations has some precision issues, which made integer coordinate (which was expected to always be positive) to go negative.
2016-04-13Cleanup string includes after versioning commitsThomas Dinges
2016-04-13Show version number in UI as wellThomas Dinges
2016-04-13Tweaks to the version string formationSergey Sharybin
Couple of things: - No need to use string streams to format the version string, we can do it at compile time and don't bother with anything at runtime. - Function declaration was wring and would have caused linking conflicts in cases when util_version.h was included from multiple places. We should have an utility function to get Cycles version so applications which are linked to Cycles dynamically can query the version, but that can't be done as an inlined function in header and would need to be a function properly exported to a global symbol table (aka, be implemented in a .cpp file).
2016-04-13Add a version number to Cycles standaloneThomas Dinges
Now Cycles has its own versioning, that is mainly interesting for external projects, which integrate the engine. We start with version 1.7.0. Reasons for that: * The engine is too mature for a 1.0 release. * We assume that Cycles inside of Blender 2.61 was version 0.1. We count upwards in 0.1 steps, therefore Cycles inside of Blender 2.77 would be 1.7. We use a common versioning scheme here, with 3 decimals for the major, minor and patch level. At the moment cycles --version can be used to display the version, easy to parse for external projects. The info will be added to the UI later aswell.
2016-04-13Cycles: Minor cleanup, whitespace around keyword and preprocessor indentSergey Sharybin
2016-04-10Cycles: Fix rare dead-locks on TaskScheduler::exit()Sergey Sharybin
When the Moon is full it was possible to have a dead-lock in task scheduler's exit() method. Similar problem was fixed in Blender's task scheduler 3 years ago in bae2a2c.
2016-04-04Cycles: Solve possible issues with running out of stack memory allocatorSergey Sharybin
Policy here is a bit more complicated, if tree becomes too deep we're forced to create a leaf node and size of that leaf wouldn't be so well predicted, which means it's quite tricky to use single stack array for that. Made it more official feature that StackAllocator will fall-back to heap when running out of stack memory. It's still much better than always using heap allocator.
2016-04-04Cycles: Log overall time spent on building object's BVHSergey Sharybin
We had per-tree statistics already, but it's a bit tricky to see overall time because trees could be building in parallel. In fact, we can now print statistics for any TaskPool.
2016-04-01Fix T47505: Cycles OpenCL rendering crash on Windows.Brecht Van Lommel
Restore the boost bug workaround, but without changing the locale.
2016-04-01Cycles: Report thread ID from worker thread to callbacksSergey Sharybin
Main use case of this ID will be to emulate TLS which otherwise would require having some platform-specific implementations which is not always really optimal. See notes about the argument in util_task.h.
2016-04-01Cycles: Fix for missing pthread's spin on OSXSergey Sharybin
2016-03-31Cycles: Add easy to use spin lock primitiveSergey Sharybin
Currently unused, but will be handy for an upcoming changes. It'll also be nice to be able to do scoped_lock() for both Mutex and Spin, but currently it's not really easy to do, need some changes in typedefs and such, will happen as a separate commit.
2016-03-31Cycles: Expose array's capacity via getter functionSergey Sharybin
This way it's possible to query capacity of an array, which then could be used for some smart re-allocation and reserve policies.
2016-03-31Cycles: Add STL allocator which uses stack memorySergey Sharybin
At this point we might want to rename allocator files to util_allocator_foo.c so the stay nicely grouped in the folder.
2016-03-31Cycles: Move non-vectorized bitscan() to utilSergey Sharybin
This way we can use bitscan() from both vectorized and non-vectorized code, which applies to both kernel and host code.
2016-03-31Cycles: Aligned vector was not covered by guarded statSergey Sharybin
This was making stats printed by the logging being wrong: they did not include such memory as BVH storage.
2016-03-25Cycles: Add an option to build single kernel only which fits current CPUSergey Sharybin
This seems quite useful for the development, so you don't need to wait all the kernels to be re-compiled when working on a new feature, which speeds up re-iteration. Marked as an advanced option, so if it doesn't work so well in practice it's safe to revert anyway.
2016-03-25Cycles: Cleanup, indent nested preprocessor directivesSergey Sharybin
Quite straightforward, main trick is happening in path_source_replace_includes(). Reviewers: brecht, dingto, lukasstockner97, juicyfruit Differential Revision: https://developer.blender.org/D1794
2016-03-23Fix T47856: Cycles problem when running from multi-byte pathSergey Sharybin
This is a mix of regression and old unsupported configuration. Regression was caused by some checks added on Blender side which was checking whether python function returned error or not. This made it impossible to enable Cycles when running from a file path which can't be encoded with MBCS codepage. Non-regression issue was that it wasn't possible to use pre-compiled CUDA kernels when running from a path with non-ascii multi-byte characters. This commit fixes regression and CUDA parts, but OSL still can't be used from a non-ascii location because it uses non-widechar API to work with file paths by the looks of it. Not sure we can solve this just from our side by using some codepage trick (UTF-16?) since even oslc fails to compile shader when there are non-ascii characters in the path.
2016-02-27Cleanup: Update Cycles standalone copyright info.Thomas Dinges
2016-02-20Cycles: Avoid re-definition of math cnstants with MSVCSergey Sharybin
2016-02-17Cycles: Don't silence unused macro, remove the macro insteadSergey Sharybin
It's not really handy to silence something unused hoping for it'll be used in the future. We can end up with quite some silencing then. Also made this flag which i find rather useless to NOT cause -Werror in Cycles code.
2016-02-17Cleanup: unused define warningCampbell Barton
2016-02-16Cycles: Some cleanup, should be no functional changesSergey Sharybin
Addressing meaningful feedback from coverity.
2016-02-16Fix T47427: Crash caused by OSLSergey Sharybin
2016-02-15Cycles: Make guarded allocator compatible with MSVC2015Sergey Sharybin
2016-02-15Cycles: Fix guarded allocator issues on WindowsSergey Sharybin
The issue was caused by static vectors allocating some internal data using rebound element allocator for them, which was causing access to a non-initialized statistics objects and was failing a lot when switching Blender to a fully guarded allocation. Additionally, we were not able to free that internal memory before Blender exits, which was causing false-positive memory leak prints. Now we're not using GuardedAllocator for those proxy containers. Ideally this should be done as a GuardedAllocator::rebind, but it didn't work for vector<bool> because it seems some internal parts are converting bool to char32_t, which either makes it so we can't use GuardedAllocator for those vectors or the compiler get's confused when we're trying explicitly allow GuardedAllocator for rebind<char32_t>. This with current approach we should be fine for the release.
2016-02-14Cycles: Fix infinite recursion of md5 calculation on WindowsSergey Sharybin
Was caused by some safety things of making sure we've for NULL terminator for the buffer when doing mbs<->wcs conversion, but it turns out this simply confuses str::string and it can no longer have proper .size(). Let's assume behavior of string allocation is same all over the std, and we can avoid having that extra null-terminator allocated.
2016-02-13Cleanup: Move Cycles sky model data to util.Thomas Dinges
2016-02-13Cycles: Fix compilation error on WindowsSergey Sharybin
2016-02-13Cycles: Fix crash caused by the guarded allocation commitSergey Sharybin
C++ requires specific alignment of the allocations which was not an issue when using GCC but uncovered issue when using Clang on OSX. Perhaps some versions of Clang might show errors on other platforms as well.
2016-02-12Cycles: Fix compilation error with MinGWSergey Sharybin
Was using some C++0 which we don't officially enabled yet.
2016-02-12Cycles: Always use guarded allocator of vectorsSergey Sharybin
We don't have vectors re-allocation happening multiple times from inside a loop anymore, so we can safely switch to a memory guarded allocator for vectors and keep track on the memory usage at various stages of rendering. Additionally, when building from inside Blender repository, Cycles will use Blender's guarded allocator, so actual memory usage will be displayed in the Space Info header. There are couple of tricky aspects of the patch: - TaskScheduler::exit() now explicitly frees memory used by `threads`. This is needed because `threads` is a static member which destructor isn't getting called on Blender's exit which caused memory leak print to happen. This shouldn't give any measurable speed issues, reallocation of that vector is only one of fewzillion other allocations happening during synchronization. - Use regular guarded malloc (not aligned one). No idea why it was made to be aligned in the first place. Perhaps some corner case tests or so. Vector was never expected to be aligned anyway. Let's see if we'll have actual bugs with this. Reviewers: dingto, lukasstockner97, juicyfruit, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1774
2016-02-12Cycles: Make Blender importer more forward compatibleSergey Sharybin
Basically the idea is to make code robust against extending enum options in the future by falling back to a known safe default setting when RNA is set to something unknown. While this approach solves the issues similar to T47377, but it wouldn't really help when/if any of the RNA values gets ever deprecated and removed. There'll be no simple solution to that apart from defining explicit mapping from RNA value to Cycles one. Another part which isn't so great actually is that we now have to have some enum guards and give some explicit values to the enum items, but we can live with that perhaps. Reviewers: dingto, juicyfruit, lukasstockner97, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1785
2016-02-06Cycles: Re-implement some utilities to avoid use of boostSergey Sharybin
The title says it all actually, the idea is to make Cycles only requiring Boost via 3rd party dependencies like OIIO and OSL. So now there are only few places which still uses Boost: - Foreach, function bindings and threading primitives. Those we can easily get rid with C++11 bump (which seems inevitable sooner or later if we'll want ot use newer LLVM for OSL), - Networking devices There's no quick solution for those currently, but there are some patches around which improves serialization. Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto Reviewed By: brecht, dingto Differential Revision: https://developer.blender.org/D1764
2016-02-06Cycles: Remove workaround for MSVC2010 and BoostSergey Sharybin
We've upgraded to Boost-1.60 and MSVC2013 since the workaround was originally committed. After checks with current compiler and libraries the original bug is no longer happening. This will make string comparison much faster in Windows, solving synchronization bottlenecks of fewzillion objects. Thanks Martin Felke (aka scorpion81) for the tests!
2016-02-06Code cleanup: resolve minor Cycles todo's.Brecht Van Lommel
2016-02-06Code cleanup: remove unused Cycles code from BVH cache.Brecht Van Lommel
2016-02-03Cycles: Cleanup, indentation and bracesSergey Sharybin
2016-01-23Cycles: Make Clang 3.6 happy with const debug flags referenceSergey Sharybin
For some reason it did not like the explicit const qualifier for a custom type.
2016-01-21MS Visual Studio 2015 does not find std::inserterMartijn Berger
2016-01-19Cycles: Add a debug flag to disable QBVHSergey Sharybin
2016-01-14Cycles: One more attempt to fix issue mentioned in previous commitSergey Sharybin
2016-01-14Cycles: Fix typo in the debug panel commitSergey Sharybin
2016-01-12Cycles: Use special debug panel to fine-tune debug flagsSergey Sharybin
This panel is only visible when debug_value is set to 256 and has no affect in other cases. However, if debug value is not set to this value, environment variables will be used to control which features are enabled, so there's no visible changes to anyone in fact. There are some changes needed to prevent devices re-enumeration on every Cycles session create. Reviewers: juicyfruit, lukasstockner97, dingto, brecht Reviewed By: lukasstockner97, dingto Differential Revision: https://developer.blender.org/D1720
2016-01-10Cycles: Fix Uninitialized Value compiler warning in the scoped_timerLukas Stockner
Although the code made it impossible to use time_start_ uninitialized, at least GCC did still produce multiple warnings about it. Since time_dt() is an extremely cheap operation and functionality does not change in any way when removing the check in the constructor, this commit removes the check and therefore the warning.
2016-01-10Cycles: Adding Hilbert Spiral as a tile order for renderingLukas Stockner
This patch adds the "Hilbert Spiral", a custom-designed continuous space-filling curve, as a tile order for rendering in Cycles. It essentially works by dividing the tiles into tile blocks which are processed in a spiral outwards from the center. Inside each block, the tiles are processed in a regular Hilbert curve pattern. By rotating that pattern according to the spiral direction, a continuous curve is obtained, which helps with cache coherency and therefore rendering speed. The curve is a compromise between the faster-rendering Bottom-to-Top etc. orders and the Center order, which is a bit slower, but starts with the more important areas. The Hilbert Spiral also starts in the center (unless huge tiles are used) and is still marginally slower than Bottom-to-Top, but noticeably faster than Center. Reviewers: sergey, #cycles, dingto Reviewed By: #cycles, dingto Subscribers: iscream, gregzaal, sergey, mib2berlin Differential Revision: https://developer.blender.org/D1166