blender.git
2 years agoClay Engine: Mode engine templates.
Clément Foucault [Sun, 12 Mar 2017 20:16:03 +0000 (21:16 +0100)]
Clay Engine: Mode engine templates.

Standard Engine layout easy to extend.

Note that most of the work will also happen in mesh_render.c to create geometry batches.

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Sat, 11 Mar 2017 20:09:15 +0000 (21:09 +0100)]
OpenGL: Convert drawobject.c (cont)

All remaining 28 deprecated calls are derivedMesh related.

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Sat, 11 Mar 2017 16:13:49 +0000 (17:13 +0100)]
OpenGL: Convert drawobject.c (cont)

Edit Particle mode.

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Sat, 11 Mar 2017 15:10:03 +0000 (16:10 +0100)]
OpenGL: Convert drawobject.c (cont)

Particle system (not edit mode)

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Fri, 10 Mar 2017 17:55:52 +0000 (18:55 +0100)]
OpenGL: Convert drawobject.c (cont)

This commit have a serrious perf issue when drawing nurbs (+5 times slower) but it gets rid of deprecated functions.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 11 Mar 2017 16:00:06 +0000 (03:00 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: code style & cmake
Campbell Barton [Sat, 11 Mar 2017 15:40:04 +0000 (02:40 +1100)]
Cleanup: code style & cmake

2 years agoAdd support for Objects in Drive variable `Rotational Difference`
Germano Cavalcante [Sat, 11 Mar 2017 13:43:23 +0000 (10:43 -0300)]
Add support for Objects in Drive variable `Rotational Difference`

Thus it is according to the Manual
https://docs.blender.org/manual/en/dev/animation/drivers/drivers_panel.html#driver-variables

2 years agoBMesh: Fix BM_face_loop_separate_multi
Campbell Barton [Sat, 11 Mar 2017 12:21:37 +0000 (23:21 +1100)]
BMesh: Fix BM_face_loop_separate_multi

When the loop region passed in had no loops to edge-split from,
it was assumed nothing needed to be done.

This ignored the case where loops share a vertex
without any shared edges.

Now BM_face_loop_separate_multi behaves like BM_face_loop_separate.

Fixed error where faces remained connected by verts in BM_mesh_separate_faces.

2 years agoCorrect recent bmesh separate addition
Campbell Barton [Sat, 11 Mar 2017 12:19:49 +0000 (23:19 +1100)]
Correct recent bmesh separate addition

- Was setting flag incorrectly to avoid re-use.
- Check edge has loops before accessing.

2 years agoFix T50888: Numeric overflow in split kernel state buffer size calculation
Mai Lavelle [Sat, 11 Mar 2017 10:23:11 +0000 (05:23 -0500)]
Fix T50888: Numeric overflow in split kernel state buffer size calculation

Overflow led to the state buffer being too small and the split kernel to
get stuck doing nothing forever.

2 years agoBMesh: add BM_mesh_separate_faces
Campbell Barton [Sat, 11 Mar 2017 09:39:28 +0000 (20:39 +1100)]
BMesh: add BM_mesh_separate_faces

Fast-path for bmesh split operator which duplicates and deletes.
Use when only separating faces, currently used by the intersect tool.

2 years agoMakefile: set tab width=4
Campbell Barton [Sat, 11 Mar 2017 06:14:39 +0000 (17:14 +1100)]
Makefile: set tab width=4

2 years agoFix text and icon positioning issue on high DPI, after recent changes in 32c5f3d.
Brecht Van Lommel [Sat, 11 Mar 2017 03:46:27 +0000 (04:46 +0100)]
Fix text and icon positioning issue on high DPI, after recent changes in 32c5f3d.

2 years agoFix OpenCL warnings about doubles on some platforms.
Brecht Van Lommel [Fri, 10 Mar 2017 23:55:23 +0000 (00:55 +0100)]
Fix OpenCL warnings about doubles on some platforms.

2 years agoBreakdowner - Constrain Transform and Axis
Joshua Leung [Fri, 10 Mar 2017 22:52:58 +0000 (11:52 +1300)]
Breakdowner - Constrain Transform and Axis

This commit adds new features to the breakdowner, giving animators more
control over what gets interpolated by the breakdowner. Specifically:

   "Just as G R S let you move rotate scale, and then X Y Z let you do that
   in one desired axis, when using the Breakdower it would be great to be
   able to add GRS and XYZ to constrain what transform / axis is being
   breakdowned."

As requested here:
https://rightclickselect.com/p/animation/csbbbc/breakdowner-constrain-transform-and-axis

Notes:
* In addition to G/R/S, there's also B (Bendy Bone settings and C (custom properties)
* Pressing G/R/S/B/C or X/Y/Z again will turn these constraints off again

2 years agoCleanup: Add comment about use of ID pointer in TreeStoreElem
Julian Eisel [Fri, 10 Mar 2017 22:29:32 +0000 (23:29 +0100)]
Cleanup: Add comment about use of ID pointer in TreeStoreElem

2 years agoFix unwanted expanding/collapsing of collections using drag & drop
Julian Eisel [Fri, 10 Mar 2017 22:11:58 +0000 (23:11 +0100)]
Fix unwanted expanding/collapsing of collections using drag & drop

Turned out to be a quite easy fix. I thought the issue was that we
couldn't identify the TreeStoreElem when (re)creating its TreeElement item
correctly, because for non-ID elements that would be index dependent (=
bad for drag & drop). Turns out that we're actually allowed to store
custom data within the TreeStoreElem, the thing is just that it gets
stored as ID pointer (highly ugly and highly misleading).
Anyway, seems to work now so I won't complain too much :)

2 years agoOuliner drag&drop: Correct/increase margin for triggering insert into
Julian Eisel [Fri, 10 Mar 2017 20:06:10 +0000 (21:06 +0100)]
Ouliner drag&drop: Correct/increase margin for triggering insert into

2 years agoInsert into master collection when dragging above it
Julian Eisel [Fri, 10 Mar 2017 20:01:10 +0000 (21:01 +0100)]
Insert into master collection when dragging above it

2 years agoOutliner: Support dragging objects into different collections
Julian Eisel [Fri, 10 Mar 2017 19:47:48 +0000 (20:47 +0100)]
Outliner: Support dragging objects into different collections

Doing so will remove the object from the old collection and insert it
into the new one.

2 years agoOutliner drag&drop: Do generic check if no custom poll callback is defined
Julian Eisel [Fri, 10 Mar 2017 17:23:22 +0000 (18:23 +0100)]
Outliner drag&drop: Do generic check if no custom poll callback is defined

And quite some cleanup.

2 years agoLayers util function to move objects around
Dalai Felinto [Fri, 10 Mar 2017 17:12:47 +0000 (18:12 +0100)]
Layers util function to move objects around

This is required for outliner, so we can move an object from a collection into another

2 years agorBa81ea408367abe2f33b351ff6dcc6b09170fd088 "object" -> "target"
Germano Cavalcante [Fri, 10 Mar 2017 16:54:06 +0000 (13:54 -0300)]
rBa81ea408367abe2f33b351ff6dcc6b09170fd088 "object" -> "target"

2 years agofix T50899: Even though the Shrinkwrap options hide the possibility of using a non...
Germano Cavalcante [Fri, 10 Mar 2017 16:51:04 +0000 (13:51 -0300)]
fix T50899: Even though the Shrinkwrap options hide the possibility of using a non-mesh target, you can still circumvent this... Causing Crash

2 years agoImprove outliner drag&drop feedback by using drop poll callbacks
Julian Eisel [Fri, 10 Mar 2017 16:05:50 +0000 (17:05 +0100)]
Improve outliner drag&drop feedback by using drop poll callbacks

This way we can ensure the overlay to indicate where the item would be
placed if it was dropped now is always at the correct place and doesn't
mislead the user.

2 years agoCorrect glPixelTransfer function
Campbell Barton [Fri, 10 Mar 2017 16:02:03 +0000 (03:02 +1100)]
Correct glPixelTransfer function

2 years agoLayers: fix bug in move layer collection above/below
Dalai Felinto [Fri, 10 Mar 2017 15:48:09 +0000 (16:48 +0100)]
Layers: fix bug in move layer collection above/below

Reported by Julian Eisel (Severin)

2 years agoGaah, managed to undo a previous fix somehow...
Julian Eisel [Fri, 10 Mar 2017 15:03:50 +0000 (16:03 +0100)]
Gaah, managed to undo a previous fix somehow...

Somehow undid rBc70eb873057 in rB8e303aae255.

2 years agoDraw drag&drop feedback overlays with element indentation
Julian Eisel [Fri, 10 Mar 2017 14:58:08 +0000 (15:58 +0100)]
Draw drag&drop feedback overlays with element indentation

That way users can see better at which hierarchy level the element will
be inserted into.

2 years agoFix incorrect positioning of collection when dropping it after expanded one
Julian Eisel [Fri, 10 Mar 2017 14:56:41 +0000 (15:56 +0100)]
Fix incorrect positioning of collection when dropping it after expanded one

2 years agoFix T50900: Text-Blocks created from "Edit Source" have zero users.
Bastien Montagne [Fri, 10 Mar 2017 14:41:14 +0000 (15:41 +0100)]
Fix T50900: Text-Blocks created from "Edit Source" have zero users.

2 years agoFix useless allocation of edge_vectors in threaded case of loop split generation.
Bastien Montagne [Tue, 7 Mar 2017 13:19:14 +0000 (14:19 +0100)]
Fix useless allocation of edge_vectors in threaded case of loop split generation.

2 years agoCycles: Cleanup, extra semicolon and space
Sergey Sharybin [Fri, 10 Mar 2017 14:34:54 +0000 (15:34 +0100)]
Cycles: Cleanup, extra semicolon and space

2 years agoSupport drag & drop of collections across multiple hierarchy levels
Julian Eisel [Fri, 10 Mar 2017 14:03:06 +0000 (15:03 +0100)]
Support drag & drop of collections across multiple hierarchy levels

Two issues are remaining, they'll be fixed separately:
* Graphical feedback when dragging within the master collection is wrong
* There's some bug where collections swap places instead, Dalai will investigate

2 years agoFix lamp draw setting color without checking if its needed
Campbell Barton [Fri, 10 Mar 2017 13:45:18 +0000 (00:45 +1100)]
Fix lamp draw setting color without checking if its needed

2 years agoFix issues in outliner collection reordering function
Julian Eisel [Fri, 10 Mar 2017 12:59:03 +0000 (13:59 +0100)]
Fix issues in outliner collection reordering function

2 years agoAdjust kmi header
raa [Fri, 10 Mar 2017 12:10:40 +0000 (15:10 +0300)]
Adjust kmi header

2 years agoCleanup: struct flags for select picking
Campbell Barton [Fri, 10 Mar 2017 10:47:43 +0000 (21:47 +1100)]
Cleanup: struct flags for select picking

2 years agoCleanup: rename drawObjectSelect
Campbell Barton [Fri, 10 Mar 2017 10:27:33 +0000 (21:27 +1100)]
Cleanup: rename drawObjectSelect

After adding draw_object_select, noticed a similar name.
Rename drawObjectSelect to draw_object_selected_outline.

2 years agoFix T47690: Connected PET w/ individual origins
Campbell Barton [Fri, 10 Mar 2017 09:18:19 +0000 (20:18 +1100)]
Fix T47690: Connected PET w/ individual origins

- Connectivity length was overwritten by distance to closest selected.
- Vertices used the 'island' center of the closest vertex,
  even if it wasn't connected.

Now optionally keep track of the original index of used as the closest
connected distance.

To support this needed to add optional support for islands of 1 vertex.

2 years agoCycles: Enable SSS and volumes for CUDA and Nvidia OpenCL split kernel
Mai Lavelle [Fri, 10 Mar 2017 07:09:41 +0000 (02:09 -0500)]
Cycles: Enable SSS and volumes for CUDA and Nvidia OpenCL split kernel

2 years agoFix T50904: Imprecise timeline frame selection using mouse
Joshua Leung [Fri, 10 Mar 2017 00:38:02 +0000 (13:38 +1300)]
Fix T50904: Imprecise timeline frame selection using mouse

The changes introduced in rB3e628eefa9f55fac7b0faaec4fd4392c2de6b20e
made the non-subframe frame change behaviour less intuitive, by always
truncating downwards, instead of rounding to the nearest frame instead.
This made the UI a lot less forgiving of pointing precision errors
(for example, as a result of hand shake, or using a tablet on a highres scren)

This commit restores the old behaviour in this case only (subframe inspection
isn't affected by these changes)

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Fri, 10 Mar 2017 00:53:57 +0000 (01:53 +0100)]
OpenGL: Convert drawobject.c (cont)

- drawDispListwire_ex()
- removed primitive check in Batch_init()

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Thu, 9 Mar 2017 23:28:00 +0000 (00:28 +0100)]
OpenGL: Convert drawobject.c (cont)

removed draw_box

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Thu, 9 Mar 2017 21:10:18 +0000 (22:10 +0100)]
OpenGL: Convert drawobject.c (cont)

-Softbody matrix
-EditCurve/NURBS

2 years agoOpenGL: Convert drawobject.c (cont)
Clément Foucault [Thu, 9 Mar 2017 18:12:13 +0000 (19:12 +0100)]
OpenGL: Convert drawobject.c (cont)

Remove drawcircball
Convert texturespace, editfont, metaball (except for displist usage)

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 9 Mar 2017 19:16:15 +0000 (06:16 +1100)]
Merge branch 'master' into blender2.8

Manually merged viewport xray changes

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 9 Mar 2017 19:11:50 +0000 (06:11 +1100)]
Merge branch 'master' into blender2.8

2 years agoImmediate Mode: Updated commented out code from textview.c
Dalai Felinto [Thu, 9 Mar 2017 18:21:08 +0000 (19:21 +0100)]
Immediate Mode: Updated commented out code from textview.c

2 years agoImmediate Mode: Fix text color for Info and Console editors
Dalai Felinto [Thu, 9 Mar 2017 18:20:31 +0000 (19:20 +0100)]
Immediate Mode: Fix text color for Info and Console editors

Bug introduced in rB4b365064cfbd

2 years ago3D View: x-ray support for depth picking
Campbell Barton [Thu, 9 Mar 2017 16:15:58 +0000 (03:15 +1100)]
3D View: x-ray support for depth picking

Selection loop would draw the selection ignoring xray.
Now draw in a separate pass after clearing the depth buffer,
as with regular drawing.

Also disable depth sorting,
caller can sort the hit-list by depth if needed.

2 years agoImmediate Mode: Fix crash on text editor when going over suggestion list
Dalai Felinto [Thu, 9 Mar 2017 17:12:21 +0000 (18:12 +0100)]
Immediate Mode: Fix crash on text editor when going over suggestion list

2 years agoImmediate Mode: text_draw.c 2/2
Dalai Felinto [Thu, 9 Mar 2017 17:01:35 +0000 (18:01 +0100)]
Immediate Mode: text_draw.c 2/2

Tackle the remaining parts of the code, mainly the commented out
function `draw_documentation`.

2 years agoImmediate Mode: text_draw.c 1/2
Dalai Felinto [Thu, 9 Mar 2017 12:11:47 +0000 (13:11 +0100)]
Immediate Mode: text_draw.c 1/2

Note 1: renamed draw_cursor to draw_text_decoration, since it was drawing
cursor, margin, selection and line highlight

Note 2: commented out code update coming next

Part of T49043

2 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Thu, 9 Mar 2017 16:10:06 +0000 (17:10 +0100)]
Merge remote-tracking branch 'origin/master' into blender2.8

2 years agoCycles: add single program debug option for split kernel
Hristo Gueorguiev [Wed, 8 Mar 2017 16:56:06 +0000 (17:56 +0100)]
Cycles: add single program debug option for split kernel

Single program generally compiles kernels faster (2-3 times), loads faster,
takes less drive space (2-3 times), and reduces the number of cached kernels.

2 years agoCycles: split kernel_shadow_blocked to AO & DL parts
Hristo Gueorguiev [Wed, 8 Mar 2017 16:39:40 +0000 (17:39 +0100)]
Cycles: split kernel_shadow_blocked to AO & DL parts

Reduces memory allocation for split kernel.

This allows for faster rendering due to bigger global size,
specially when GPU memory is limited.

Perfromance results:

                         R9 290 total render time
                        Before    After   Change
BMW                      4:37      4:34   -1.1 %
Classroom               14:43     14:30   -1.5 %
Fishy Cat               11:20     11:04   -2.4 %
Koro                    12:11     12:04   -1.0 %
Pabellon Barcelona      22:01     20:44   -5.8 %
Pabellon Barcelona(*)   15:32     15:09   -2.5 %

(*) without glossy connected to volume

2 years agoCycles: Speedup transparent shadows in split kernel
Hristo Gueorguiev [Wed, 8 Mar 2017 15:26:39 +0000 (16:26 +0100)]
Cycles: Speedup transparent shadows in split kernel

This commit enables record-all transparent shadows rays.

Perfromance results:

               R9 290 render time (without synchronization), seconds
                        Before    After   Change
BMW                      261.5    262.5   +0.4 %
Classroom                869.6    867.3   -0.3 %
Fishy Cat                657.4    639.8   -2.7 %
Koro                    1909.8    692.8  -63.7 %
Pabellon Barcelona      1633.3   1238.0  -24.2 %
Pabellon Barcelona(*)   1158.1    903.8  -22.0 %

(*) without glossy connected to volume

2 years agoCycles: SSS and Volume rendering in split kernel
Hristo Gueorguiev [Wed, 8 Mar 2017 14:42:26 +0000 (15:42 +0100)]
Cycles: SSS and Volume rendering in split kernel

Decoupled ray marching is not supported yet.

Transparent shadows are always enabled for volume rendering.

Changes in kernel/bvh and kernel/geom are from Sergey.
This simiplifies code significantly, and prepares it for
record-all transparent shadow function in split kernel.

2 years agoRemove (ifdef) draw_documentation from text_draw.c
Dalai Felinto [Thu, 9 Mar 2017 16:02:32 +0000 (17:02 +0100)]
Remove (ifdef) draw_documentation from text_draw.c

This was no longer supported.

2 years agoBuilding 2.8 again after warning cleanup (696ed6d3ca)
Dalai Felinto [Thu, 9 Mar 2017 11:08:44 +0000 (12:08 +0100)]
Building 2.8 again after warning cleanup (696ed6d3ca)

2 years ago3D View: wrap GPU_select cache calls
Campbell Barton [Thu, 9 Mar 2017 09:47:37 +0000 (20:47 +1100)]
3D View: wrap GPU_select cache calls

Avoids including GPU_select and makes it more clear that the cache is
needed for view3d_opengl_select calls.

Also use typed enum for select mode.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 9 Mar 2017 05:47:31 +0000 (16:47 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: warnings
Campbell Barton [Thu, 9 Mar 2017 05:44:11 +0000 (16:44 +1100)]
Cleanup: warnings

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 9 Mar 2017 05:33:20 +0000 (16:33 +1100)]
Merge branch 'master' into blender2.8

2 years agoOpenGL immediate mode: graph_draw.c
Luca Rood [Wed, 8 Mar 2017 05:30:51 +0000 (02:30 -0300)]
OpenGL immediate mode: graph_draw.c

This also fixes a little bug, which caused `draw_fcurve_samples` to
never be called, and thus sampled curve range boundaries were not drawn.

Part of T49043

2 years agoOpenGL: drawobject.c (cont)
Clément Foucault [Thu, 9 Mar 2017 02:21:42 +0000 (03:21 +0100)]
OpenGL: drawobject.c (cont)

2 years agoEdit Mesh overlay: Ported Display Normals option
Clément Foucault [Thu, 9 Mar 2017 00:29:58 +0000 (01:29 +0100)]
Edit Mesh overlay: Ported Display Normals option

2 years agoEdit Mesh overlay: remove sizeNormal from ubo.
Clément Foucault [Thu, 9 Mar 2017 00:29:04 +0000 (01:29 +0100)]
Edit Mesh overlay: remove sizeNormal from ubo.

2 years agoDraw Manager: structural change
Clément Foucault [Wed, 8 Mar 2017 19:00:09 +0000 (20:00 +0100)]
Draw Manager: structural change

All engines are now called by the draw manager. Engines are separate entities that cannot interfer with each others.
Also separated draw_mode_pass.c into the mode engines.

2 years agoLayers: move LayerCollection
Dalai Felinto [Wed, 8 Mar 2017 16:21:43 +0000 (17:21 +0100)]
Layers: move LayerCollection

This is to be used from the Outliner, when dragging and dropping
collections from the Active Render Layer

It also includes a cleanup on the outliner so it calls the new
functions. Note: the outliner still needs fix to allow all the
functionality here exposed.

But this will be tackled by Julian Eisel later.

2 years agoLayers: move SceneCollection
Dalai Felinto [Fri, 3 Mar 2017 15:14:21 +0000 (16:14 +0100)]
Layers: move SceneCollection

This is to be used from the Outliner, when dragging and dropping.
It does not include moving LayerCollection (from Active Render Layer)

2 years agoNew util function: BLI_listbases_swaplinks
Dalai Felinto [Wed, 8 Mar 2017 19:55:42 +0000 (20:55 +0100)]
New util function: BLI_listbases_swaplinks

2 years ago3D View: use cache for armature select
Campbell Barton [Wed, 8 Mar 2017 22:22:56 +0000 (09:22 +1100)]
3D View: use cache for armature select

2 years agoCycles: Fix CUDA build error for some compilers
Mai Lavelle [Wed, 8 Mar 2017 21:44:43 +0000 (16:44 -0500)]
Cycles: Fix CUDA build error for some compilers

Needed to include `util_types.h` before using `uint`.

2 years ago3D View: new nethod of opengl selection
Campbell Barton [Wed, 8 Mar 2017 18:17:55 +0000 (05:17 +1100)]
3D View: new nethod of opengl selection

Intended to replace legacy GL_SELECT, without the limitations of
sample queries which can't access depth information.

This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL
which access the depth buffers to detect whats under the pointer,
so initial selection is always the closest item.

The performance of this method depends a lot on the OpenGL
implementations glReadPixels.

Since reading depth can be slow, buffers are cached for object picking
so selecting re-uses depth data, performing 1 draw instead of 3
(for 24, 18, 10 px regions, picking with many items under the pointer).

Occlusion queries draw twice when picking nearest,
so worst case 6x draw calls per selection.

Even with these improvements occlusion queries is faster on AMD hardware.

Depth selection is disabled by default, toggle option under select method.
May enable by default if this works well on different hardware.

Reviewed as D2543

2 years agoFix T50849: Transparent background produces artifacts in this compositing setup
Sergey Sharybin [Wed, 8 Mar 2017 14:56:50 +0000 (15:56 +0100)]
Fix T50849: Transparent background produces artifacts in this compositing setup

The issue was caused by sometimes negative color returned by the filter node.

Seems to be caused by precision issues. Don't see any reason why we would want
negative colors in output. Those only causing issues later on.

2 years agoOpenGl: Converted more of drawobject.c
Clément Foucault [Wed, 8 Mar 2017 14:02:41 +0000 (15:02 +0100)]
OpenGl: Converted more of drawobject.c

2 years agoCycles: Make it more obvious message which initialization failed
Sergey Sharybin [Wed, 8 Mar 2017 12:57:21 +0000 (13:57 +0100)]
Cycles: Make it more obvious message which initialization failed

2 years agoFix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~
Sergey Sharybin [Wed, 8 Mar 2017 12:38:01 +0000 (13:38 +0100)]
Fix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~

Patch by Bruno d'Arcangeli (@arcangeli), thanks!

2 years agoOpenGL Select: integer rect for passing region
Campbell Barton [Wed, 8 Mar 2017 12:22:42 +0000 (23:22 +1100)]
OpenGL Select: integer rect for passing region

2 years agoCleanup: replace short -> int for selection hits
Campbell Barton [Wed, 8 Mar 2017 12:15:12 +0000 (23:15 +1100)]
Cleanup: replace short -> int for selection hits

2 years agoRename BLI_rct*_init_pt_size -> radius
Campbell Barton [Wed, 8 Mar 2017 12:10:31 +0000 (23:10 +1100)]
Rename BLI_rct*_init_pt_size -> radius

2 years agoCycles: Use 1-based line number for #line directives
Sergey Sharybin [Wed, 8 Mar 2017 11:45:18 +0000 (12:45 +0100)]
Cycles: Use 1-based line number for #line directives

AMD CPU platform was complaining about #line 0 directives in the code.

2 years agoCycles: Log which device kernels are being loaded for
Sergey Sharybin [Wed, 8 Mar 2017 11:33:51 +0000 (12:33 +0100)]
Cycles: Log which device kernels are being loaded for

2 years agoOutliner fix: prevent segfault when there is no active layer collection
Dalai Felinto [Wed, 8 Mar 2017 10:25:20 +0000 (11:25 +0100)]
Outliner fix: prevent segfault when there is no active layer collection

2 years agoCycles: Make it possible to access KernelGlobals from split data initialization function
Sergey Sharybin [Wed, 8 Mar 2017 10:02:54 +0000 (11:02 +0100)]
Cycles: Make it possible to access KernelGlobals from split data initialization function

2 years agoCycles: Cleanup, remove residue of previous split kernel data
Sergey Sharybin [Wed, 8 Mar 2017 09:26:29 +0000 (10:26 +0100)]
Cycles: Cleanup, remove residue of previous split kernel data

This is all in split data state array.

2 years agoFix T50886: Blender crashes on render
Sergey Sharybin [Wed, 8 Mar 2017 08:41:38 +0000 (09:41 +0100)]
Fix T50886: Blender crashes on render

Was a mistake in one of the previous TLS commits.

See comment in the pool_create to see some details why it was crashing.

2 years agoupdate theme back to black re: T50869
meta-androcto [Wed, 8 Mar 2017 07:31:24 +0000 (18:31 +1100)]
update theme back to black re: T50869

2 years agoCycles: Fix indentation
Mai Lavelle [Tue, 7 Mar 2017 10:21:36 +0000 (05:21 -0500)]
Cycles: Fix indentation

2 years agoCycles: Fix strict warning about unused variable
Mai Lavelle [Tue, 7 Mar 2017 10:16:57 +0000 (05:16 -0500)]
Cycles: Fix strict warning about unused variable

2 years agoCycles: Calculate size of split state buffer kernel side
Mai Lavelle [Sat, 4 Mar 2017 11:29:01 +0000 (06:29 -0500)]
Cycles: Calculate size of split state buffer kernel side

By calculating the size of the state buffer in the kernel rather than the host
less code is needed and the size actually reflects the requested features.

Will also be a little faster in some cases because of larger global work size.

2 years agoCycles: Fix crash after failed kernel build
Mai Lavelle [Sat, 4 Mar 2017 08:29:03 +0000 (03:29 -0500)]
Cycles: Fix crash after failed kernel build

Pointers to kernels were uninitialized leading to freeing of random memory
addresses. Another reason it would be good to use smart pointers.

2 years agoCycles: Faster building of split kernel
Mai Lavelle [Fri, 3 Mar 2017 09:10:17 +0000 (04:10 -0500)]
Cycles: Faster building of split kernel

Simple change to make it so that only kernels that have been modified are
rebuilt. Might only be useful during development.

2 years agoCycles: Initialize rng_state for split kernel
Mai Lavelle [Fri, 3 Mar 2017 09:07:26 +0000 (04:07 -0500)]
Cycles: Initialize rng_state for split kernel

Because the split kernel can render multiple samples in parallel it is
necessary to have everything initialized before rendering of any samples
begins. The code that normally handles initialization of
`rng_state` (`kernel_path_trace_setup()`) only does so for the first sample,
which was causing artifacts in the split kernel due to uninitialized
`rng_state` for some samples.

Note that because the split kernel can render samples in parallel this
means that the split kernel is incompatible with the LCG.

2 years agoCycles: Remove sum_all_radiance kernel
Mai Lavelle [Wed, 1 Mar 2017 06:47:08 +0000 (01:47 -0500)]
Cycles: Remove sum_all_radiance kernel

This was only needed for the previous implementation of parallel samples. As
we don't have that any more it can be removed.

Real reason for removal tho is this: `per_sample_output_buffers` was being
calculated too small and artifacts resulted. The tile buffer is already
the correct size and calculating the size for `per_sample_output_buffers`
is a bit difficult with the current layout of the code. As
`per_sample_output_buffers` was only needed for `sum_all_radiance`,
removing that kernel and writing output to the tile buffer directly
fixes the artifacts.

2 years agoCycles: Split path initialization into own kernel
Mai Lavelle [Wed, 1 Mar 2017 06:05:55 +0000 (01:05 -0500)]
Cycles: Split path initialization into own kernel

This makes it easier to initialize things correctly in the data_init kernel
before they are needed by path tracing.

2 years agoCycles: Seperate kernel loading time from render time
Mai Lavelle [Fri, 30 Dec 2016 04:05:40 +0000 (23:05 -0500)]
Cycles: Seperate kernel loading time from render time