Change some big functions from __device_inline to __device, which
makes CPU kernel compilation much faster when using MSVC.

Sideeffect of this change is that CPU rendering is few percent
faster now. CUDA rendering is the same speed.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53791 954f8c5b-7b00-dc11-b283-0030488c597c
Remove usage WITH_CYCLES_CUDA_BINARIES in code, use check for
precompiled cubins instead,

Logic here is following now:
- If there're precompiled cubins, assume CUDA compute is available,
  otherwise
- If cuda toolkit found, assume CUDA compute is available
- In all other cases CUDA compute is not available

For windows there're still check for only precompiled binaries,
no runtime compilation is allowed.

Ended up with such decision after discussion with Brecht. The thing
is, if we'll support runtime compilation on windows we'll end up
having lots of reports about different aspects of something doesn't
work (you need particular toolkit version, msvc installed, environment
variables set properly and so) and giving feedback on such reports
will waste time.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53792 954f8c5b-7b00-dc11-b283-0030488c597c
Cuda binaries workaround for buildbot shall no longer be needed.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53793 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles: enable lamp multiple importance sampling on the GPU, seems to be
working ok with sm_20 and sm_21.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53794 954f8c5b-7b00-dc11-b283-0030488c597c
optimize BM_face_exists(), was doing a lot of redundant checks.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53795 954f8c5b-7b00-dc11-b283-0030488c597c
For non-windows systems, check for CUDA compiler during runtime

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53796 954f8c5b-7b00-dc11-b283-0030488c597c
remove NULL checks for BM_iter_new() element iterators. replace checks with assert().


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53797 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#33831] "Alt" key is "Alt Window Deactivated"
Patch from Patrick Zulke (pazul)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53798 954f8c5b-7b00-dc11-b283-0030488c597c
displace modifier incorrectly had mid-level set as a 'distance' subtyped property.
also change the minimum texture contrast to 0.0 (was 0.01).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53799 954f8c5b-7b00-dc11-b283-0030488c597c
Some fixes:
* handle nicely multiple empty lines in po files (still have to figure out why po writer sometime output two lines instead of one!)
* fix rtl processing!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53800 954f8c5b-7b00-dc11-b283-0030488c597c
vertex slide was using flipped value, wasnt so noticable unless you types in a value.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53801 954f8c5b-7b00-dc11-b283-0030488c597c
replace vertex slide with the transform operator. (MESH_OT_vert_slide -> TRANSFORM_OT_vert_slide)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53802 954f8c5b-7b00-dc11-b283-0030488c597c
fix issue reported in '[#33876] bpy.path.ensure_ext adds extension twice / extra period if filename empty, just a period or equal to extension'

For python operators that used the ExportHelper mix-in class, an empty file field would become '.ext', entering and existing the text field would become '.ext.ext',
Now only add an extension if the filename part of the path is set, so '.ext' will still become '.ext.ext' but having only the extension isn't so likely to happen in the first place now.

This is a different fix then the changes suggested in the report but I'd prefer to keep path functions stupid+predictable.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53803 954f8c5b-7b00-dc11-b283-0030488c597c
write 16 bit PNG files even when there is no float buffer,
the existence of a float buffer can depend on the image being used in the compositor for example, so better give the user what they expect - 16bit png if its selected from the UI.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53804 954f8c5b-7b00-dc11-b283-0030488c597c
Two threading issues:

- Drawing masks in image editor requires LOCK_DRAW_IMAGE around
  ED_space_image_get* functions since they'll acquire image buffer.

  Lock is needed because viewers will be modified directly in
  compositor (see commend in draw_image_main)

- Seems that was wrong order of invalidating render result and
  viewer image invalidation happened in Composite node, which
  could easily lead to thread lock.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53805 954f8c5b-7b00-dc11-b283-0030488c597c
Spelling corrections

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53806 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#33781] Confusing units in displacement modifier parameters

16bit PNG images were not doing any conversions when saving linear float buffers, but would always load them as SRGB.
apply the same method used for 16bit images from floats as used in jpeg2000.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53807 954f8c5b-7b00-dc11-b283-0030488c597c
Minor UI message fix (from [#33101] Minor interface typo in User Preferences > Themes > Add Preset, patch by gdh, on IRC).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53808 954f8c5b-7b00-dc11-b283-0030488c597c
Follow general mathutils rules for naming straight<->premul functions

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53809 954f8c5b-7b00-dc11-b283-0030488c597c
Jpeg2000 should be saved with straight alpha

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53810 954f8c5b-7b00-dc11-b283-0030488c597c