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
path: root/intern
AgeCommit message (Collapse)Author
2015-03-13Add an option to mesh.calc_tessface() to get rid of polygons and loopsSergey Sharybin
The purpose of this change is to add extra possibility to render engines and export scripts to reduce peak memory footprint during their operation. This new argument should be used with care since it'll leave mesh in not really compatible with blender format, but it's ok to be used on temp meshes. Unfortunately, it's hard to get scene where it'll show huge benefit because in my tests with cycles peak memory is reached in MEM_printmemlist_stats(). However, in the file with sintel dragon it gives around 1gig of memory benefit after removing the polys which would allow other heavy to compute stuff such as hair (or even pointiness calculation) to not be a peak memory usage. In any case, this change is nice to have IMO, and only means more parts of scene export code should be optimized memory-wise. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1125
2015-03-13Cycles: Free caches used by the synchronized objectsSergey Sharybin
Issue this commit is addressed to is that particle system and particle modifier will contain caches once derived mesh was requested and this cached data will never be freed. This could easily lead to unwanted memory peaks during synchronization stage of rendering. The idea is to have RNA function in object which would free caches which can't be freed otherwise. This function is not intended to deal with derived final since it might be used by other objects (for example by object with boolean modifier). This cache freeing is only happening in the background rendering and locked interface rendering. From quick tests with victor file this change reduces peak memory usage by command line rendering by around 6% (1780MB vs. 1883MB). For rendering from the interface it's about 12% (1763MB vs. 1998MB). Reviewers: campbellbarton, lukastoenne Differential Revision: https://developer.blender.org/D1121
2015-03-13Initial compilation support with C++11 featureset enabledSergey Sharybin
This commit makes some preliminary fixes and tweaks aimed to make blender compilable with C++11 feature set. This includes: - Build system attribute to enable C++11 featureset. It's for sure default OFF, but easy to enable to have a play around with it and make sure all the stuff is compilable before we go C++11 for real. - Changes in Compositor to use non-named cl_int structure fields. This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL does not use named fields in this case. - Changes to TYPE_CHECK() related on lack of typeof() in C++11 This uses decltype() instead with some trickery to make sure returned type is not a reference. - Changes for auto_ptr in Freestyle This actually conditionally switches between auto_ptr and unique_ptr since auto_ptr is deprecated in C++11. Seems to be not strictly needed but still nice to be ready for such an update anyway/ This all based on changes form depsgraph_refactor branch apart from the weird changes which were made in order to support MinGW compilation. Those parts of change would need to be carefully reviewed again after official move to gcc49 in MinGW. Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and likely needs some more tweaks. Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3 Differential Revision: https://developer.blender.org/D1089
2015-03-13Cycles: Optimization for CMJ in CUDA kernelsSergey Sharybin
Two things: - Use intrinsics for clz/ctz (ctz is implemented via ffs()). - Use faster sqrt() function which precision is enough for integer values.
2015-03-13Cycles: Simplify volume light connect code.Thomas Dinges
2015-03-13Cleanup: Use differential helper class.Thomas Dinges
2015-03-12Revert "Fix T43865: Cycles: Watertight rendering produces artifacts on a ↵Sergey Sharybin
huge plane" The fix was really flacky, in terms during speed benchmarks i had abort() in the fallback block to be sure it never runs in production scenes, but that affected on the optimization as well. Without this abort there's quite bad slowdown of 5-7% on the renders even tho the Pleucker fallback was never run. This is all weird and for now reverting the change which affects on all the production scenes and will look into alternative fixes for the original issue with precision loss on huge planes. This reverts commit 9489205c5c0b9b432d02be4a3d0d15fc62ee6cb9.
2015-03-12Partial fix for T43967: Background is wrong in 2.74Sergey Sharybin
Was missing do-versions code after rotation order change in Cycles. This is a regression and to be ported to the final release branch.
2015-03-12Cycles / Decoupled Ray Marching: Skip consecutive empty steps.Thomas Dinges
This merges consecutive empty steps in the decoupled record function, which can lead to fewer iterations in the scatter functions. Only helps slightly though (1%), but doesn't hurt to have this. Differential Revision: https://developer.blender.org/D873
2015-03-12Cycles: Make Background MIS building threadedThomas Dinges
Use multiple threads for building the MIS table, if the resolution is higher than 512. Also replace division by cdf_total, with a inverse multiplication by cdf_total_inv. This gives further speedup. On my Macbook (8 CPU threads) this improves the time to build the table: Resolution 4096: From 0.16s to 0.03s Resolution 8096: From 0.61s to 0.11s This especially helps to reduce the scene update time, when tweaking world shader while viewport rendering is running. Patch by Sergey and myself. Differential Revision: https://developer.blender.org/D1159
2015-03-12GuardedAlloc: safer MEM_SAFE_FREECampbell Barton
only instantiate the argument once, so MEM_SAFE_FREE(array[i++]), won't cause incorrect behavior.
2015-03-09Fix T43484: Motion blur fails in certain circumstancesSergey Sharybin
The issue was caused by mismatch in how aligned triangles storage was filled in during BVH construction and how it was used during rendering. Basically, i was leaving uninitialized storage for triangles when there was deformation motion blur detected for the mesh. Was likely some sort of optimization, but in fact it's still possible that regular triangles would be needed for rendering. So now we're storing aligned storage for all triangle primitives and only skipping motion triangles (the deformation motion blur flag from mesh is now ignored).
2015-03-09Cycles: Improve logging in object motion detectionSergey Sharybin
Reporting mesh name is not really useful, since it's name does not any relation with the original object/mesh names.
2015-03-07Cycles: add better specializations for SSE shuffle function and few more ↵Sv. Lockal
wrappers.
2015-03-07Fix T41066: An actual fix for curve intersection on FMA-enabled CPUsSv. Lockal
2015-03-05Fix T43865: Cycles: Watertight rendering produces artifacts on a huge planeSergey Sharybin
The issue was caused by numerical instability whrn having ray origin close to a huge triangle, which could have aused bad ray distance check. Watertight Woop intersection isn't really addressing such cases, it's dealing with small triangles far away from the ray origin instead, so it's a bit tricky yo make it working reliably. While we're quite close to the release it's safer to do check in Pleaucker coordinates if ray close to a huge triangle. Likely this additional check combined with some other tweaks to the code doesn't cause measurable slowdown in the scenes tested here. After the release we can play a bit more with this code in order to make it more stable without Pleucker fallback.
2015-03-05Recent changes broke SDL/GHOSTCampbell Barton
2015-03-05Fix T43672: Cycles preview stalls when out of viewCampbell Barton
2015-03-03Cycles: Fix embarrassing type remained after getting rid of utility SWAP()Sergey Sharybin
2015-03-03Cycles: Fix/workaround for toggling world MIS causing CUDA to failSergey Sharybin
Seems it's just another issue with the compiler, worked around by explicitly telling not to inline some function. In theory we can unify this with CPU, but we're quite close to the release so better be safe than sorry.
2015-02-27cleanup: use GHOST_PRINT instead of stdioMike Erwin
Mostly from my own NDoF stuff.
2015-02-27cleanup: ghost Win32 event processing functionsMike Erwin
Removed window arg from key conversion functions. Removed processModifierKeys declaration since that function was apparently never implemented. Using Win32-specific classes instead of their generic superclass -- this helps in a few cases like WinTab.
2015-02-27Compile fixes for mingw64Joshua Leung
* m_hDC was always included after m_hWnd in all the constructors and other functions, but the order was reversed in the struct, meaning that they would not get initialised correctly * Got rid of the gotos for the error handling case in initializeDrawingContext() This was causing "jump to label ... crosses initialisation" errors for the calls to get GL version string info (i.e. const char *vendor = ...; etc.) I wasn't sure if those glGetString calls needed the rest of the context to be defined first, so I decided to leave them where they are now, and got rid of the gotos (which were making this particular piece of code a bit confusing) instead. TODO: There are still a bunch of warnings about around 660, which I haven't managed to solve (but at least they won't prevent Blender from compiling) narrowing conversion of '(stereoVisual ? 1063 : 1061)' from 'int' to 'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
2015-02-27cleanup: ghost Win32 IMEMike Erwin
Took out lots of redundant function calls (getters). Also wrapped more code in WITH_INPUT_IME guards.
2015-02-26cleanup: spelling & typosMike Erwin
Comments only, no functional change.
2015-02-26Revert "Cleanup: Simplify camera sample motion blur code."Thomas Dinges
This reverts commit 8197f0bb645f73f41071daaccf205a7583e695f5.
2015-02-26Cleanup: Simplify camera sample motion blur code.Thomas Dinges
2015-02-25Minor message fixes - thanks to S.J.Bennett for the heads upAntony Riakiotakis
2015-02-25Fix silly mistake with flags which would make stereo buffers unsupportedAntony Riakiotakis
2015-02-25Make the message even more clear in case someone does not know what GPUAntony Riakiotakis
is (we are talking about people who won't have installed a driver - anything is possible)
2015-02-25Warning messagebox for windows when an unsupported implementation ofAntony Riakiotakis
OpenGL is detected: Hoping to decrease the frequency of by far one of the most frequent bug reports by windows users. There is some reorganization of the GHOST API to allow easy addition of further OpenGL options in the future. The change is not propagated too deep to keep the size of the patch managable. We might reorganize things here later. For OpenGL we do two checks here: One is a combination of GDI generic renderer or vendor microsoft corporation and OpenGL version 1.1. This means the system does not use GPU acceleration at all. We warn user to install a graphics driver and of cases where this might happen (remote connection, using blender through virtual machine) The other one just checks if OpenGL version is less than 1.4 (we can easily change that in the future of course) and warns that it is deprecated. Both cases will still let blender startup correctly but users should now have a clear idea of the system being unsupported. A user preference flag is provided to turn the warning off. Now stop posting those bug reports without installing a driver first - please?
2015-02-25CMake: error making get_blender_version a functionCampbell Barton
Incorrect use of PARENT_SCOPE meant the vars would be used uninitialized elsewhere.
2015-02-24Fix T43783: Cycles clipping doesn't match viewport when camera is inside volumeSergey Sharybin
Ray length adjustment got lost in some refactor commit back to 2.71 days.
2015-02-23Disable Bake Jitter code (recently added)Dalai Felinto
The following commits were supposed to add anti-alias and help with OSL baking: 7b16fda3799d5b7167ef7ffe533d654810f44e36 1b92dfa96160f8151972d73337d5a927d8b89297 However they introduced other issues (artifacts mostly), see T43550 . Leaving the code ifdef'ed for now.
2015-02-23Cleanup: Simplify brick texture code a bit.Thomas Dinges
2015-02-23Debug GPU functionality from soc-viewport_fx by Jason WilkinsAntony Riakiotakis
patch number D706 with changes: - WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging system functions) but leaves the checks we had intact. Old patch added the debug functionality only if we had the flag on to save some performance. Rationale here is that we might not want to recompile blender just to get the extra information, and having users start blender with a -d flag to get the extra information is also useful for bug reports. Those checks already existed and most expensive ones are hidden behind a debug mode check so performance should not be that bad. - Did some cleanup of existing functionality: When things go wrong blender side, just print the error, don't check for GL errors first. - Did not port changes needed for GLES to regular glew.h - Got rid of duplicate or very similar new functionality. Generally, code is more moving things around/cleanup and should work exactly as before apart from the debug context, so it's safe to add even now. It also provides a nice substitute function for glu error descriptions
2015-02-21Cycles: Make it survive if preview_cycles.blend uses persistent dataSergey Sharybin
Currently should be no functional changes, but nice thing to have fixed for some further experiments.
2015-02-21Cycles: Add note about autodiff in OSL wireframe shaderSergey Sharybin
2015-02-21Cycles: Use lower progressive update timeout for preview renderingSergey Sharybin
This ways previews are refreshing with the same ratio as job was expecting this to happen, giving more instant feedback on the changes.
2015-02-21Fix T43755: Wireframe attribute doesn't work with displaceSergey Sharybin
This attribute missed derivatives calculation. Not totally sure what's the proper approach for algebraic derivative calculation, so calculating them by definition. This isn't fastest way to do it in this case and could be replaced with some smarter magic in the wireframe calculation loop. At least currently implemented approach is better than nothing.
2015-02-21Cleanup: Put all Bump dx/dy code in the beginning here, same as with other ↵Thomas Dinges
nodes.
2015-02-21Cycles: Workaround for NVidia OpenCL compilationSergey Sharybin
It was complaining about explicit __constant to __private memory conversion, which is now worked around using implicit conversion. It's not a real fix i'm afraid and i'm still failing to build OpenCL kernel with latest Linux drivers, but maybe it'll let someone else to investigate what causes compiler to run out of memory?
2015-02-20Fix T43550: Bug in Cycles Bake TextureSergey Sharybin
Issue was caused by the changes in 7b16fda which changed the initial state for rng. This commit makes it so the same initial hash is used (which solves the regression without distorting AA-looking image. It also makes it so OpenCL compiler is happy about this code (before this change it'll complain about trying to cast private variable to global one).
2015-02-20Fix T43651: New pointiness attribute doesn't work with displacementSergey Sharybin
Simple fix: just make pointiness aware of bump offset.
2015-02-19Cycles: Use size_t for aligned allocatorSergey Sharybin
Seems it got changes by accident to int during guarded allocation work, causing bad memory allocations.
2015-02-19Cycles: Cleanup for indentation in device_cpu.cppSergey Sharybin
Perhaps became broken after rather recent change about which entry point to kernel to use.
2015-02-19Cycles: Free memory used by intermediate BVH vectors earlierSergey Sharybin
Ideally we should get rid of those temporary vectors anyway, but it's not so trivial because of the alignment. For untl then we'll just have a bit worse solution. This part of code is not the root of the issue of memory spikes for now anyway. But since we're getting rid of temporary memory earlier actual spike is a bit smaller as now. For example in franck_sheep file it's now 5489.69MB vs. previously 5599.90MB.
2015-02-19Cycles: Reduce memory used by background light updateSergey Sharybin
Simple change: just get rid of intermediate data a bit earlier, before final pixels array is being allocated. This gives around 30% of memory save during light update (this is about 60meg in the frank sheep file i'm using here). This isn't really visible by artists a lot, because actual spike happens on BVH construction. But it doesn't mean we shouldn't be accurate with memory usage in other areas.
2015-02-19Cleanup: Restructure curve settings code a bit.Thomas Dinges
This is a bit more logical, as it better represents the 3 primitive types we have.
2015-02-19Guardedalloc: Reset peak memory should set peak to currently allocated memorySergey Sharybin
Otherwise statistics could be really funny looking.