defvert_find_index() & co now assert when '-1' invalid vgroup index is passed.
We used to rely on NULL value returned in this case, but with the assert...
The assert completely stalls blender actually (repeated for every vertex!).
So much better to not call that func when vgroup index is invalid.
It was always only using the flags from the first source layer of a given type, not from
the layer actually being handled.
This was (probably) more or less harmless for the CD_FLAG_NOCOPY test,
but could be really bad when checking CD_FLAG_NOFREE, and when
copying the flags over to new copied data!
Correcting the paths for buildinfo to point to the real header,
ended up breaking buildinfo (by not running every build).
It turns out we relied on the output _never_ existing,
so CMake generates a new buildinfo each time.
This is quite bad, but I didn't see a way for CMake to do this,
so explicitly point to a missing file and comment whats going on.
Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card
The issue is basically caused by graphics card driver which crashes when
querying OpenCL platforms. This isn't something we can really solve from
the CLEW side, because opencl.dll does exist in old driver and even has
all the needed symbols, but first ever call to clGetPlatformIDs crashes.
While rest of the blender works fine with those older ATI/AMD cards it's
really needed to solve crashes of OpenCL device enumeration.
Solution here is to force disable OpenCL platforms if we've detected that
display card is using old ATI/AMD driver. It's not really proper solution
so it's done in the python side where it's easy to do tweaks. Reasoning
behind this change is:
- If one uses really old driver it's likely because it's the latest one
he/she can ever to install (because of discontinued support from AMD).
- If old card is used it's likely to not have dedicated GPUs for rendering.
- Even if there's a dedicated GPU device enumeration is likely to crash
because of attempt to query OpenCL from the old card.
There are still some tweaks needed likely, but this commit should make
some of the configurations to work.
extensions, once to get final context extensions.
Not so nice because we get a warning on startup from GLEW, but at least
it GL extensions should work now.
Several class member variables were removed (at the cost of computing their values
when retrieved) or changed to a type of smaller size. Also fixed whitespace.
There was possible race condition in the point density sampling caused
by access to the same data in particle system from sampling thread and
sampling initialization.
Could have happened when two different point density textures were using
same particle system
This commit implements point density texture for Cycles shading nodes.
It's done via creating voxel texture at shader compilation time, Not
totally memory efficient, but avoids adding sampling code to kernel
(which keeps render time as low as possible), In the future this will
be compensated by using OpenVDB for more efficient storage of sparse
volume data.
Sampling of the voxel texture is happening at blender side and the
same code is used as for Blender Internal's renderer.
This texture is controlled by only object, particle system and radius.
Linear falloff is used and there's no turbulence. This is because
falloff is expected to happen using Curve Mapping node. Turbulence
will be done as a distortion on the input coordinate. It's already
possible to fake it using nose textures and in the future we can add
more proper turbulence distortion node, which then could also be used
for 2D texture mapping.
Particle color support is done by Lukas, thanks!
The idea of this node is to sampling of 3D voxels at a given coordinate
supporting different mapping strategies (world space mapping, object
local space etc).
Currently not in use, it's a preparation step for supporting point density
textures.
The idea is to give artists a simplier way to control memory usage in such
scenes as grass fields by doing automatic object culling based on whether
object is visible in the frame or not.
This is controlled on per-object level. In order to use this option few steps
are required:
- Enable Simplify in scene settings
- Enable Camera Cull option in the Simplify panel
- Set camera cull margin (measured in relative value to the render resolution)
This setting is used to avoid possible flickering caused by changes in shadow
which are cast by objects outside of the frame.
- Enable Camera Cull for objects which are desired to be culled
(object culling option could be found in Option panel in object buttons).
There is still room for improvements, but this worked quite well during
Gooseberry open movie project, so think it's useful feature even in it's current
non-ideal state.
This means render devices now might skip building baking kernels in cases when
only actual render-related functionality is used.
For now it's only implemented for OpenCL split kernel device and mainly needed
to work around some compiler-specific bugs which crashes on building the kernel.
Using OpenCL for baking might still crash the driver, but at least there is now
higher probability of that GPU will be usable to render the scene.
Real fix should actually be done in the driver side.
The idea is to make all kernels as small as possible to work around possible
issues with buggy drivers which might fail building feature-complete kernels.
It's indeed just a workaround to make at last simple test scenes to render
on OpenCL. Real fix should happen from the driver side.