blender.git
4 years agoDraw Manager: Fix blended color.
Clément Foucault [Tue, 11 Apr 2017 14:13:09 +0000 (16:13 +0200)]
Draw Manager: Fix blended color.

4 years agoDraw Manager: Fix Background sets not being drawn.
Clément Foucault [Tue, 11 Apr 2017 14:11:45 +0000 (16:11 +0200)]
Draw Manager: Fix Background sets not being drawn.

4 years agoRenaming: sl > scene_layer
Dalai Felinto [Tue, 11 Apr 2017 14:09:30 +0000 (16:09 +0200)]
Renaming: sl > scene_layer

4 years agoCleanup: remove no longer needed BASE_ defines
Dalai Felinto [Tue, 11 Apr 2017 13:51:18 +0000 (15:51 +0200)]
Cleanup: remove no longer needed BASE_ defines

4 years agoBring snapping back (Base / BaseLegacy)
Dalai Felinto [Tue, 11 Apr 2017 13:14:49 +0000 (15:14 +0200)]
Bring snapping back (Base / BaseLegacy)

4 years agoUse immediate mode API for OpenColorIO
Sergey Sharybin [Tue, 11 Apr 2017 13:28:35 +0000 (15:28 +0200)]
Use immediate mode API for OpenColorIO

4 years agoMove cage_manipulator.c to new GL code.
Bastien Montagne [Tue, 11 Apr 2017 13:16:53 +0000 (15:16 +0200)]
Move cage_manipulator.c to new GL code.

Note: I’d assume gawain equivalent to glDrawArrays would be batches? But
for two lines drawn twice this looks totally overkill anyway, so
switched back to basic immediate-mode-like API.

A bit frustrating to work on this code, since afaict you cannot check
the results in Blender, being mostly unused currently...

4 years agoFIx copy/paste mistake in own previous commit.
Bastien Montagne [Tue, 11 Apr 2017 12:30:23 +0000 (14:30 +0200)]
FIx copy/paste mistake in own previous commit.

4 years agoGL/WIP: fix crash drawing text object
Campbell Barton [Tue, 11 Apr 2017 12:46:56 +0000 (22:46 +1000)]
GL/WIP: fix crash drawing text object

Note that this doesn't set the normal as it should (noted as a TODO),
just committing to avoid the crash.

4 years agoDraw Manager: replace varargs with a pointer array
Campbell Barton [Tue, 11 Apr 2017 11:19:23 +0000 (21:19 +1000)]
Draw Manager: replace varargs with a pointer array

Allows to ensure correct number of args

4 years agoGet rid of last deprecated OpenGL calls in arrow_manipulator.c
Bastien Montagne [Tue, 11 Apr 2017 10:47:38 +0000 (12:47 +0200)]
Get rid of last deprecated OpenGL calls in arrow_manipulator.c

Hope that makes sense...

4 years agoMove arrow2d_manipulator to new immediate mode GL.
Bastien Montagne [Tue, 11 Apr 2017 10:46:49 +0000 (12:46 +0200)]
Move arrow2d_manipulator to new immediate mode GL.

4 years agoUncomment deselected center point color
Campbell Barton [Tue, 11 Apr 2017 05:48:10 +0000 (15:48 +1000)]
Uncomment deselected center point color

4 years agoDraw Manager: Add center-color for linked/multiuser objects
Campbell Barton [Tue, 11 Apr 2017 04:05:39 +0000 (14:05 +1000)]
Draw Manager: Add center-color for linked/multiuser objects

Draws a blue center circle for library objects.
As with regular drawing, this uses a hard-coded color.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 11 Apr 2017 00:59:31 +0000 (10:59 +1000)]
Merge branch 'master' into blender2.8

4 years agoRemove redundant glColor call
Campbell Barton [Tue, 11 Apr 2017 00:47:00 +0000 (10:47 +1000)]
Remove redundant glColor call

4 years agoCycles: Fix the AO replacement option in the split kernel
Lukas Stockner [Mon, 10 Apr 2017 22:53:31 +0000 (00:53 +0200)]
Cycles: Fix the AO replacement option in the split kernel

Currently the code for it was inside the hair-specific part, so it wouldn't be enabled in hairless renders.

4 years agoUI: Add missing UV tools in the UV/Image Editor Window > Tools tab
Aaron Carlisle [Mon, 10 Apr 2017 22:37:03 +0000 (18:37 -0400)]
UI: Add missing UV tools in the UV/Image Editor Window > Tools tab

Original Author: @xrg
Changes By @blendify

Image of patch: {F284237}

4 years agoUI: Do not put walk navigation settings inside an if statement
Aaron Carlisle [Mon, 10 Apr 2017 21:44:03 +0000 (17:44 -0400)]
UI: Do not put walk navigation settings inside an if statement

The issue here is that the preferences are still used because both can be accessed from the 3D View, view menu. In the future, it is likely that the old mode will be removed (maybe 2.8?) but for now we want to keep both operational.

Differential revision: https://developer.blender.org/D2320

4 years agoObject Engine: Fix Selected Group Objects color.
Clément Foucault [Mon, 10 Apr 2017 20:23:33 +0000 (22:23 +0200)]
Object Engine: Fix Selected Group Objects color.

4 years agoObject Engine: Ported Force Field object drawing.
Clément Foucault [Mon, 10 Apr 2017 20:22:37 +0000 (22:22 +0200)]
Object Engine: Ported Force Field object drawing.

4 years agoGawain: remove PRIM_QUADS_XXX
Mike Erwin [Mon, 10 Apr 2017 20:20:24 +0000 (16:20 -0400)]
Gawain: remove PRIM_QUADS_XXX

Thanks @mont29 for finishing off the last few QUADS in blender.

4 years agoGet rid of last PRIM_QUAD usage, in blf_font.c/blf_glyph.c.
Bastien Montagne [Mon, 10 Apr 2017 19:21:38 +0000 (21:21 +0200)]
Get rid of last PRIM_QUAD usage, in blf_font.c/blf_glyph.c.

4 years agoNuke three remaining uages of PRIM_QUAD in drawobject.c
Bastien Montagne [Mon, 10 Apr 2017 18:33:09 +0000 (20:33 +0200)]
Nuke three remaining uages of PRIM_QUAD in drawobject.c

This was slightly less obvious, especially particle billboard drawing.
That one now requires 1.5 times more space in VBOs and ParticleDrawData
buffers, since we have to draw two triangles per particle, instead of a
single quad... And diagonal of each quad is now drawn in wire mode, not
sure how much we consider this an issue (as in, will this particle draw
code change a lot in future?).

From quick check on the web seems there is no other way to do anyway. :/

4 years agoMinor cleanup/fix for own rB45f3150c9844326 merge.
Bastien Montagne [Mon, 10 Apr 2017 16:52:35 +0000 (18:52 +0200)]
Minor cleanup/fix for own rB45f3150c9844326 merge.

4 years agoGL: use imm* module for 2D cage manipulator
Campbell Barton [Mon, 10 Apr 2017 16:32:53 +0000 (02:32 +1000)]
GL: use imm* module for 2D cage manipulator

4 years agoGL/playanim: use immediate mode wrapper, replace glDrawPixels
Campbell Barton [Mon, 10 Apr 2017 15:21:15 +0000 (01:21 +1000)]
GL/playanim: use immediate mode wrapper, replace glDrawPixels

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 10 Apr 2017 15:34:31 +0000 (17:34 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/editors/space_view3d/drawobject.c

4 years agoFix stereoscopic camera volume drawing.
Bastien Montagne [Mon, 10 Apr 2017 15:31:39 +0000 (17:31 +0200)]
Fix stereoscopic camera volume drawing.

Not sure how we got to that point, but code was drawing twice one side
of the camera volume, and not at all another side!

4 years agoOpenGL: Fix textureXd deprecated calls.
Clément Foucault [Mon, 10 Apr 2017 14:58:08 +0000 (16:58 +0200)]
OpenGL: Fix textureXd deprecated calls.

4 years agoDraw Manager: Add Manipulator Back.
Clément Foucault [Mon, 10 Apr 2017 13:02:25 +0000 (15:02 +0200)]
Draw Manager: Add Manipulator Back.

4 years agoGPencil 2D Drawing: get rid of PRIM_QUAD_XXX.
Bastien Montagne [Mon, 10 Apr 2017 14:54:21 +0000 (16:54 +0200)]
GPencil 2D Drawing: get rid of PRIM_QUAD_XXX.

Here we can easily use a PRIM_TRIANGLE_STRIP instead!

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 10 Apr 2017 14:53:12 +0000 (16:53 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/editors/gpencil/drawgpencil.c

4 years agoCycles: Fix race condition in shader attribute for real now
Sergey Sharybin [Mon, 10 Apr 2017 14:53:01 +0000 (16:53 +0200)]
Cycles: Fix race condition in shader attribute for real now

Ended up moving lock in the more centralized space since multiple shaders
can access this map.

4 years agoGPencil 2D drawing code: minor optimization.
Bastien Montagne [Mon, 10 Apr 2017 14:28:40 +0000 (16:28 +0200)]
GPencil 2D drawing code: minor optimization.

Do not recompute both points's 2D coordinates for each segments, we can
copy over from previous one... Does not gives any measurable speedup off
hands, though.

4 years agoFix compilation error with strick flags caused by missing abort()
Sergey Sharybin [Mon, 10 Apr 2017 14:20:18 +0000 (16:20 +0200)]
Fix compilation error with strick flags caused by missing abort()

4 years agoFix T51158: Motion Tracking Movie clip editor graph
Sergey Sharybin [Mon, 10 Apr 2017 14:16:12 +0000 (16:16 +0200)]
Fix T51158: Motion Tracking Movie clip editor graph

4 years agoTracking: Fix use-after-free bug
Sergey Sharybin [Mon, 10 Apr 2017 14:01:58 +0000 (16:01 +0200)]
Tracking: Fix use-after-free bug

4 years agoInstall deps: Fix compilation error of Alembic
Luca Rood [Mon, 10 Apr 2017 13:53:37 +0000 (15:53 +0200)]
Install deps: Fix compilation error of Alembic

Couple of things here:

- Boost is not necesserily compiled into your /opt/lib and system-wide
  version might have been used. The recent change in Alembic did not
  take this into account.

- Alembic needs some extra component of Boost.
  This part might be missing now for other distros than DEB.

4 years agoFix glCheckFramebufferStatusEXT
Dalai Felinto [Mon, 10 Apr 2017 13:50:08 +0000 (15:50 +0200)]
Fix glCheckFramebufferStatusEXT

4 years agoCycles: Apparently board name could be an empty string
Sergey Sharybin [Mon, 10 Apr 2017 13:31:21 +0000 (15:31 +0200)]
Cycles: Apparently board name could be an empty string

4 years agoFirst batch of PRIM_QUAD_XXX replacement by PRIM_TRIANGLES.
Bastien Montagne [Mon, 10 Apr 2017 13:16:59 +0000 (15:16 +0200)]
First batch of PRIM_QUAD_XXX replacement by PRIM_TRIANGLES.

4 years agoUpgrade glew to v2.0
Dalai Felinto [Mon, 10 Apr 2017 12:47:01 +0000 (14:47 +0200)]
Upgrade glew to v2.0

4 years agoCycles: Workaround cubic volume filtering crashing on Linux
Sergey Sharybin [Mon, 10 Apr 2017 12:42:17 +0000 (14:42 +0200)]
Cycles: Workaround cubic volume filtering crashing on Linux

The issue was caused by recent change in inline policy.

There is some sort of memory corruption happening here, ASAN suggests
it's stack overflow issue. Not quite sure why it is happening tho and
was not able to solve anything here yet in the past hours.

Committing fix which works with a big TODO note.

The issue is visible on AVX2 machine when rendering cycles_reports_test.

4 years agoCycles: Fix compilation error of AVX2 kernels with SSE optimization disabled
Sergey Sharybin [Mon, 10 Apr 2017 11:37:19 +0000 (13:37 +0200)]
Cycles: Fix compilation error of AVX2 kernels with SSE optimization disabled

4 years agoCycles: Cleanup, indentation and trailing whitespace
Sergey Sharybin [Mon, 10 Apr 2017 08:59:31 +0000 (10:59 +0200)]
Cycles: Cleanup, indentation and trailing whitespace

4 years agoPyAPI: Fast buffer access to id property arrays
Jacques Lucke [Mon, 10 Apr 2017 11:06:00 +0000 (21:06 +1000)]
PyAPI: Fast buffer access to id property arrays

Support Python's buffer protocol for ID-properties.

4 years agoEevee: First Shadows implementation
Clément Foucault [Mon, 10 Apr 2017 10:06:17 +0000 (12:06 +0200)]
Eevee: First Shadows implementation

Using Texture Arrays to store shadow maps so less texture slots are used when shading. This means a large amount of shadows can be supported.

Support Projection Shadow Map for sun like in old BI/BGE.

Support Cube Shadow Map for Point/Spot/Area lights. the benefit of using it for spot light is that the spot angle does not change shadow resolution (at the cost of more memory used). The implementation of the cubemap sampling is targeted for 3.3 core. We rely on 2D texture arrays to store cubemaps faces and sample the right one manualy. Significant performance improvement can be done using Cubemap Arrays on supported hardware.

Shadows are only hardware filtered. Prefiltered shadows and settings comming next.

4 years agoDraw Manager: Use Texture flag in Framebuffer init.
Clément Foucault [Wed, 5 Apr 2017 10:57:32 +0000 (12:57 +0200)]
Draw Manager: Use Texture flag in Framebuffer init.

4 years agoGPUTextures: Work on cubemap support and array textures
Clément Foucault [Tue, 4 Apr 2017 12:48:42 +0000 (14:48 +0200)]
GPUTextures: Work on cubemap support and array textures

4 years agoEevee: Fix spot lights
Clément Foucault [Tue, 4 Apr 2017 10:08:42 +0000 (12:08 +0200)]
Eevee: Fix spot lights

4 years agoMake build with GL 3.3 again
Dalai Felinto [Mon, 10 Apr 2017 10:21:13 +0000 (12:21 +0200)]
Make build with GL 3.3 again

This is a workaround while the PRIM_QUADS_XXX are still in the code

4 years agoLayers unittest: layer_cyncing test was not being called
Dalai Felinto [Mon, 10 Apr 2017 08:08:29 +0000 (10:08 +0200)]
Layers unittest: layer_cyncing test was not being called

4 years agoUnitettesting: Force python errors to show as error
Dalai Felinto [Mon, 10 Apr 2017 08:03:02 +0000 (10:03 +0200)]
Unitettesting: Force python errors to show as error

4 years agoGL stubs: no need to assert when calling deprecated calls
Dalai Felinto [Mon, 10 Apr 2017 07:33:57 +0000 (09:33 +0200)]
GL stubs: no need to assert when calling deprecated calls

4 years agoExpand OpenGL stubs to allow for breakpoints
Dalai Felinto [Mon, 10 Apr 2017 06:59:05 +0000 (08:59 +0200)]
Expand OpenGL stubs to allow for breakpoints

4 years agoAdd stubs to build WITH_GL_PROFILE_CORE
Dalai Felinto [Mon, 10 Apr 2017 06:30:09 +0000 (08:30 +0200)]
Add stubs to build WITH_GL_PROFILE_CORE

This is an auto-generated list, crossing gl-deprecated.h, glew.h and the
Blender code. It allows Blender to build with core profile.

WITH_OPENGL_LEGACY=ON: nothing changes

WITH_OPENGL_LEGACY=OFF and WITH_GL_PROFILE_CORE=OFF:
It stubs deprecated legacy calls.

WITH_OPENGL_LEGACY=OFF and WITH_GL_PROFILE_CORE=ON:
It stubs deprecated legacy calls thus allowing Blender to build with
core profile only.

Technically you only want to use WITH_OPENGL_LEGACY=OFF when
WITH_GL_PROFILE_CORE=ON. But it doesn't hurt to have it working for both
scenarios.

Reviewed by: merwin

Differential Revision: https://developer.blender.org/D2610

4 years agoMerge branch 'master' into blender2.8
Julian Eisel [Sun, 9 Apr 2017 20:51:38 +0000 (22:51 +0200)]
Merge branch 'master' into blender2.8

4 years agoCleanup: glsl indentation
Campbell Barton [Sun, 9 Apr 2017 06:34:15 +0000 (16:34 +1000)]
Cleanup: glsl indentation

4 years agoCleanup: use doxy code block
Campbell Barton [Sun, 9 Apr 2017 06:26:04 +0000 (16:26 +1000)]
Cleanup: use doxy code block

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 9 Apr 2017 06:09:12 +0000 (16:09 +1000)]
Merge branch 'master' into blender2.8

4 years agoListBase: Add insert-replace function
Campbell Barton [Sun, 9 Apr 2017 06:07:09 +0000 (16:07 +1000)]
ListBase: Add insert-replace function

Handy to replace an existing link
(without having to store before/after links)

Use for id-props

4 years agoCycles: Fix building of CUDA kernels with compilers where C++11 is disabled
Mai Lavelle [Sat, 8 Apr 2017 11:12:04 +0000 (07:12 -0400)]
Cycles: Fix building of CUDA kernels with compilers where C++11 is disabled

4 years agoAdd helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.
Bastien Montagne [Sat, 8 Apr 2017 09:06:44 +0000 (11:06 +0200)]
Add helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.

Doing this in a fully 'clean' way is far from obvious, especially
unregister, you often end up leaving nasty 'orphanned' keymap items
referring to unregistered operators...

4 years agoGPU lib support for WITH_LEGACY_OPENGL
Mike Erwin [Sat, 8 Apr 2017 06:34:30 +0000 (02:34 -0400)]
GPU lib support for WITH_LEGACY_OPENGL

For early testing of core profile:
- GPU_legacy_support = false
- GPU_display_list_support = false
- GPU_geometry_shader_support = true

Relates to T49012

4 years agoOpenGL: drop support for EXT_geometry_shader4
Mike Erwin [Sat, 8 Apr 2017 06:21:13 +0000 (02:21 -0400)]
OpenGL: drop support for EXT_geometry_shader4

See gpu_shader.c for the main changes.

EXT_geometry_shader4 brought this feature to GL versions < 3.2, but now it's just cluttering up our code.

Soon all platforms will be on version 3.3 so we won't even have to check support at runtime!

4 years agoGawain: remove GL enum from primitive API
Mike Erwin [Sat, 8 Apr 2017 05:19:25 +0000 (01:19 -0400)]
Gawain: remove GL enum from primitive API

Callers now have to use Gawain's PRIM enum to specify geometric primitives.

This makes the API more bullet-proof (at least less vulnerable) since GLenum covers waaay more than GL_POINTS, GL_LINES, etc.

Also prepares us for Vulkan.

4 years agoOpenGL: use PRIM instead of GL enum everywhere else
Mike Erwin [Sat, 8 Apr 2017 04:50:36 +0000 (00:50 -0400)]
OpenGL: use PRIM instead of GL enum everywhere else

Well, everywhere that uses Gawain for drawing. Places that call OpenGL directly still use GL enums.

Part of T49043

4 years agoCorrect constraint manipulator colors
Campbell Barton [Sat, 8 Apr 2017 02:08:51 +0000 (12:08 +1000)]
Correct constraint manipulator colors

Widget show as color of constrained axis

4 years agoFix WITH_LEGACY_OPENGL=ON
Campbell Barton [Sat, 8 Apr 2017 02:00:46 +0000 (12:00 +1000)]
Fix WITH_LEGACY_OPENGL=ON

This wasn't working outside of gpu module.

4 years agoOpenGL: use PRIM instead of GL enum for immBegin
Mike Erwin [Fri, 7 Apr 2017 20:31:26 +0000 (16:31 -0400)]
OpenGL: use PRIM instead of GL enum for immBegin

Getting ready for a Gawain API change...

Part of T49043

4 years agoGawain: remove GL enum from vertex format API
Mike Erwin [Fri, 7 Apr 2017 20:00:03 +0000 (16:00 -0400)]
Gawain: remove GL enum from vertex format API

Callers now have to use Gawain's COMP enum to specify vertex attributes.

This makes the API more bullet-proof (at least less vulnerable) since GLenum covers waaay more than component types.

Also prepares us for Vulkan.

4 years agouse COMP instead of GL enum to construct vertex format
Mike Erwin [Fri, 7 Apr 2017 19:51:39 +0000 (15:51 -0400)]
use COMP instead of GL enum to construct vertex format

I converted all other files a day or two ago; this file was part of a recent merge.

4 years agoOpenGL: remove UI_reinit_gl_state function
Mike Erwin [Fri, 7 Apr 2017 19:10:48 +0000 (15:10 -0400)]
OpenGL: remove UI_reinit_gl_state function

All line & point drawing is responsible for setting its own state (as of January 2016) making this redundant.

4 years agoOpenGL: transition away from GL_QUADS
Mike Erwin [Fri, 7 Apr 2017 19:03:24 +0000 (15:03 -0400)]
OpenGL: transition away from GL_QUADS

Single quads are drawn as a TRIANGLE_FAN, with 4 verts in the same order.

Multiple quads now use PRIM_QUADS_XXX and will need further work. Only 8 places still use this.

Part of T49043

4 years agoGawain: append XXX to PRIM_QUADS to make it scary
Mike Erwin [Fri, 7 Apr 2017 18:21:10 +0000 (14:21 -0400)]
Gawain: append XXX to PRIM_QUADS to make it scary

Quads are not part of modern GL or Vulkan, so we should avoid them. XXX makes coders think "hmm how could I draw this without using quads?"

Quads will be removed during the transition to core profile.

Part of T49043

4 years agofix use of uninitialized variable
Mike Erwin [Fri, 7 Apr 2017 17:48:11 +0000 (13:48 -0400)]
fix use of uninitialized variable

Bug crawled in via 2944438e9a276e48d7eabb5bb88ecec9b2f1e7dc as part of custom manipulators.

4 years agoshrink fixed-size internal GLSL string buffers
Mike Erwin [Fri, 7 Apr 2017 17:28:42 +0000 (13:28 -0400)]
shrink fixed-size internal GLSL string buffers

We concatenate #defines and #extensions into these, and can count the max string lengths needed. 256 is enough to hold today's strings; we can adjust later if needed.

4 years agouse best GPU matrix function for the job
Mike Erwin [Fri, 7 Apr 2017 17:24:00 +0000 (13:24 -0400)]
use best GPU matrix function for the job

Follow-up to 204e067111af9346fccea9981a0a7962ec8ef906 which coverted manipulators' legacy GL matrix calls to new ones.

part of T49450

4 years agoOpenGL: support GLSL 3.3 core profile
Mike Erwin [Fri, 7 Apr 2017 16:50:44 +0000 (12:50 -0400)]
OpenGL: support GLSL 3.3 core profile

When WITH_LEGACY_OPENGL = OFF.

This is our final target for Blender 2.8, all previous versions will be dropped in the future. GLSL 3.3 is richer so we don't require as many extensions.

4 years agoCycles: Fix warning with MSVC
Sergey Sharybin [Fri, 7 Apr 2017 16:28:16 +0000 (18:28 +0200)]
Cycles: Fix warning with MSVC

4 years agoCycles: Fix compilation error with certain CUDA and host compiler configuration
Sergey Sharybin [Fri, 7 Apr 2017 16:27:07 +0000 (18:27 +0200)]
Cycles: Fix compilation error with certain CUDA and host compiler configuration

This seems to happen on Windows only, happened to Thomas and Nathan already.

Similar patch Thomas was showing, but i do not see it committted. So comitting
now in order to get more developers and users happy.

4 years agoTests: Compare vectors with epsilon
Sergey Sharybin [Fri, 7 Apr 2017 16:26:39 +0000 (18:26 +0200)]
Tests: Compare vectors with epsilon

SOlves the test false-positively failing in 32 bit environment.

4 years ago[Cycles/msvc] Get cycles_kernel compile time under control.
lazydodo [Fri, 7 Apr 2017 16:25:54 +0000 (10:25 -0600)]
[Cycles/msvc] Get cycles_kernel compile time under control.

Ever since we merged the extra texture types (half etc) and spit kernel the compile time for cycles_kernel has been going out of control.

It's currently sitting at a cool 1295.762 seconds with our standard compiler (2013/x64/release)

I'm not entirely sure why msvc gets upset with it, but the inlining of matrix near the bottom of the tri-cubic 3d interpolator is the source of the issue, this patch excludes it from being inlined.

This patch bring it back down to a manageable 186 seconds. (7x faster!!)

with the attached bzzt.blend that @sergey  kindly provided i got the following results with builds with identical hashes

58:51.73 buildbot
58:04.23 Patched

it's really close, the slight speedup could be explained by the switch instead of having multiple if's (switches do generate more optimal code than a chain of if/else/if/else statements) but in all honesty it might just have been pure luck (dev box,very polluted, bad for benchmarks) regardless, this patch doesn't seem to slow down anything with my limited testing.

{F532336}

{F532337}

Reviewers: brecht, lukasstockner97, juicyfruit, dingto, sergey

Reviewed By: brecht, dingto, sergey

Subscribers: InsigMathK, sergey

Tags: #cycles

Differential Revision: https://developer.blender.org/D2595

4 years agoWorkaround for weightpoint not working
Dalai Felinto [Fri, 7 Apr 2017 16:00:39 +0000 (18:00 +0200)]
Workaround for weightpoint not working

Kudos to Germano Cavalcante for spotting the issue, the real fix is to pass SL to the function though

4 years agoLibmv: Correction to previous commit
Sergey Sharybin [Fri, 7 Apr 2017 15:57:48 +0000 (17:57 +0200)]
Libmv: Correction to previous commit

We do need to make a copy of the values.

4 years agoSimplified some test code in render_layer_common.py
Sybren A. Stüvel [Fri, 7 Apr 2017 15:51:23 +0000 (17:51 +0200)]
Simplified some test code in render_layer_common.py

4 years agoNo more need to alter sys.path in each and every render_layer unit test.
Sybren A. Stüvel [Fri, 7 Apr 2017 15:50:47 +0000 (17:50 +0200)]
No more need to alter sys.path in each and every render_layer unit test.

I tried the clean way, by setting the PYTHONPATH environment variable for
CTest, using SET (CTEST_ENVIRONMENT blablab), but that didn't seem to
work.

4 years agoTests: import blendfile without modifying sys.path
Sybren A. Stüvel [Fri, 7 Apr 2017 15:25:09 +0000 (17:25 +0200)]
Tests: import blendfile without modifying sys.path

4 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Fri, 7 Apr 2017 15:28:22 +0000 (17:28 +0200)]
Merge branch 'master' into blender2.8

# Conflicts:
# source/blender/alembic/intern/abc_exporter.h
# source/blender/alembic/intern/abc_util.cc

4 years agoLibmv: Fix crash of keyframe selection on 32bit linux
Sergey Sharybin [Fri, 7 Apr 2017 15:10:44 +0000 (17:10 +0200)]
Libmv: Fix crash of keyframe selection on 32bit linux

4 years agoOpenGL: Get rid of PRIM_QUADS usage in manipulators code
Julian Eisel [Fri, 7 Apr 2017 15:04:14 +0000 (17:04 +0200)]
OpenGL: Get rid of PRIM_QUADS usage in manipulators code

4 years agoBuildbot: List freetype for OIIO libraries
Sergey Sharybin [Fri, 7 Apr 2017 15:01:07 +0000 (17:01 +0200)]
Buildbot: List freetype for OIIO libraries

OIIO in release environment is compiled with Freetype support.

This fixes compilation error of static unit tests.

4 years agoBuildbot: Link statically against freetype
Sergey Sharybin [Fri, 7 Apr 2017 15:00:43 +0000 (17:00 +0200)]
Buildbot: Link statically against freetype

4 years agoCMake: Fix detection of idiff program
Sergey Sharybin [Fri, 7 Apr 2017 15:00:06 +0000 (17:00 +0200)]
CMake: Fix detection of idiff program

4 years agoOpenGL / Outliner: QUADS are not supported in core
Dalai Felinto [Fri, 7 Apr 2017 14:42:56 +0000 (16:42 +0200)]
OpenGL / Outliner: QUADS are not supported in core

4 years agoTests: Fix compilation error with static OpenMP
Sergey Sharybin [Fri, 7 Apr 2017 14:06:05 +0000 (16:06 +0200)]
Tests: Fix compilation error with static OpenMP

4 years agoFix drawing of planar transfrom manipulators, update matrix code
Julian Eisel [Fri, 7 Apr 2017 14:02:45 +0000 (16:02 +0200)]
Fix drawing of planar transfrom manipulators, update matrix code

4 years agoAlembic import: prevent crash when cancelling import.
Sybren A. Stüvel [Fri, 7 Apr 2017 14:03:16 +0000 (16:03 +0200)]
Alembic import: prevent crash when cancelling import.

It's possible that cancellation occured between the creation of the reader
and the creation of the Blender object, in which case reader->object()
returns a NULL pointer.

4 years agoAlembic import: prevent double user decrement when cancelling import.
Sybren A. Stüvel [Fri, 7 Apr 2017 14:02:51 +0000 (16:02 +0200)]
Alembic import: prevent double user decrement when cancelling import.

BKE_libblock_free_us() was called on the object data, which decrements
its user count, after which the same function was called on the object,
which decrements the user count of the object data again. This double
decrement was too much.