http://www.miikahweb.com/feed.php MiikaHweb - Blender Commits By Sergey http://www.miikahweb.com/ MiikaHweb - Blender Commits By Sergey fi Mon, 20 Sep 21 19:31:53 +0000 MiikaHweb RSS contact at miikahweb.com <![CDATA[[e8df8da] cycles-x: Cycles X: Remove dead resumable render code]]> http://www.miikahweb.com/en/blender/git-logs/commit/e8df8dac034a6f9ed042736264b86c169e37e8c6 e8df8da
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Remove dead resumable render code

It will be implemented differently by specifying an EXR file.

Remove the command line arguments to avoid false perception
that the resumable render still works.

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

----------------------------------------
4 Paths Changed]]>
Mon, 20 Sep 2021 15:59:55 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e8df8dac034a6f9ed042736264b86c169e37e8c6Sergey Sharybin
<![CDATA[[a9ad15a] cycles-x: WIP: Cycles X: Schedule work based on occupancy]]> http://www.miikahweb.com/en/blender/git-logs/commit/a9ad15a88f129a0593432e1217610ac840687497 a9ad15a
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
WIP: Cycles X: Schedule work based on occupancy

Sacrifice refresh interval and increase GPU occupancy, lowering the
final render time.

Lowers `Blender 2.80 - Spring` demo file form predicted 30min
measured 3 min to render 1/10th of samples) to about 7.5min.

It is still considerably higher than the master branch, which finishes
the file in just below 3 min, but it is already a better results.

The timing is from RTX 5000.

The viewport and CPU rendering should stay unaffected by this change.

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

----------------------------------------
9 Paths Changed]]>
Mon, 20 Sep 2021 15:43:57 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/a9ad15a88f129a0593432e1217610ac840687497Sergey Sharybin
<![CDATA[[2413da2] cycles-x: Cycles X: Re-implement tile highlight]]> http://www.miikahweb.com/en/blender/git-logs/commit/2413da215160403d026d776bdbe0b883de5516ae 2413da2
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Re-implement tile highlight

Since the GPUDisplay usage for offline rendering we've lost tile
highlight functionality. This change brings it back.

Introduced new RenderEngine API call to manipulate highlight state
without acquiring RenderResult (so that we don't allocate passes).

Not fully ideal since the last tile will be highlighted after render
is done until first full-frame is done, but is a cosmetic thing we
can improve in the future.

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

----------------------------------------
8 Paths Changed]]>
Mon, 20 Sep 2021 15:35:30 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/2413da215160403d026d776bdbe0b883de5516aeSergey Sharybin
<![CDATA[[c36e748] cycles-x: Cycles X: Improve progress report while processing files from...]]> http://www.miikahweb.com/en/blender/git-logs/commit/c36e74892ee8fd829e6d1ef4050f360ff9ed651a c36e748
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Improve progress report while processing files from disk

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

----------------------------------------
3 Paths Changed]]>
Mon, 20 Sep 2021 14:51:47 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/c36e74892ee8fd829e6d1ef4050f360ff9ed651aSergey Sharybin
<![CDATA[[adf85cd] cycles-x: Cycles X: Real memory saving when using tiled rendering]]> http://www.miikahweb.com/en/blender/git-logs/commit/adf85cd552d3d3319b095397f95fecc0c8961bc5 adf85cd
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Real memory saving when using tiled rendering

The general idea is to delay reading EXR files for until after all
view layers are rendered. Once they are all rendered, BlenderSession
frees up as much memory as possible, and initiates processing of the
on-disk files.

The processing includes reading the file, optional denoising of the
full frame (if the denoising is enabled), and writing the result via
the write callback.

The processing is done as a state-machine which routes specific calls
to a full-frame processing, which allows to re-use same tile write
callback in the software integration.

In order to be able to know which view layer and render view is being
written the API has been extended to write layer and view names. Done
via BufferParams, as layer and view concepts are quite typical for the
EXR files.

The BufferParams also contains all fields needed for buffers access
outside of the scene graph.

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

----------------------------------------
18 Paths Changed]]>
Fri, 17 Sep 2021 09:18:12 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/adf85cd552d3d3319b095397f95fecc0c8961bc5Sergey Sharybin
<![CDATA[[adccc4c] cycles-x: Fix Cycles X crash viewing render result prior rendering]]> http://www.miikahweb.com/en/blender/git-logs/commit/adccc4ce4575918e9725abe32e515544bfcdba5a adccc4c
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix Cycles X crash viewing render result prior rendering

----------------------------------------
1 Path Changed]]>
Fri, 17 Sep 2021 09:51:24 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/adccc4ce4575918e9725abe32e515544bfcdba5aSergey Sharybin
<![CDATA[[e5f51c6] cycles-x: Fix wrong display when rendering multiple view layers in Cycles...]]> http://www.miikahweb.com/en/blender/git-logs/commit/e5f51c684bf94476864f736aaf6ea25059c345b7 e5f51c6
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix wrong display when rendering multiple view layers in Cycles X

The issue was that the texture used by GPUDisplay was never cleared and
was only used for partial updates.

The actual reasoning of that is a bit more tricky than it looks on a
first glance since the GPUDisplay was re-created together with session
via session_reset so one would think it is weird to have a texture from
previous view layer to appear in the new GPUDisplay. Probably caused by
the fact that OpenGL is the same for all view layers, and texture ID is
happened to be the same.

Anyhow, the way texture is created is considered to have an undefined
behavior by the standard when is attempted to be used without explicit
data assignment.

This change makes it so new texture is always guaranteed to be zeroed
and that the GPU display is cleared when rendering multiple views from
within the same session.

The clearing is done by a GPUDisplay subclass, as the parent does not
know details of how to perform the zeroing. For the CPU the zeroing is
done on a mapped memory, as it makes it easy and does not require any
extra OpenGL requirements.

For the graphics interop things a bit more difficult as attempts to map
texture will make graphics interop to fail out (it really wants to be
an exclusive thing which takes care of the memory mapping). So for the
graphics interop clearing is done when memory is mapped by the interop
implementation.

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

----------------------------------------
9 Paths Changed]]>
Fri, 17 Sep 2021 08:56:08 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e5f51c684bf94476864f736aaf6ea25059c345b7Sergey Sharybin
<![CDATA[[e597e6a] cycles-x: Fix persistent data not allowing to change sample count and...]]> http://www.miikahweb.com/en/blender/git-logs/commit/e597e6aab28dd03f4a736ab9f324d6a7726842a0 e597e6a
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix persistent data not allowing to change sample count and time limit

The root cause was that `session->params` were never updated to the new
parameters.

Made it so `session->reset()` will make sure the session is fully up to
date with the desired parameters.

Investigation by @dingto, code by self.

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

----------------------------------------
3 Paths Changed]]>
Fri, 17 Sep 2021 08:38:30 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e597e6aab28dd03f4a736ab9f324d6a7726842a0Sergey Sharybin
<![CDATA[[d80d23e] cycles-x: Fix pass accessor with 0 samples]]> http://www.miikahweb.com/en/blender/git-logs/commit/d80d23e542f1e49d827f77b29e107057c1bc9a58 d80d23e
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix pass accessor with 0 samples

Avoid division by zero when calculating scale, and avoid multiplication
by inf later on.

The pixel processing functions are changed so that they return fully
transparent pixel for pixels where number of samples is 0. This allows
to have matched behavior of non-finished tiles with master, without
relying on non-finite math.

The extra condition when calculating scale is inevitable, and hopefully
the pixel processing function's if statement gets folded into it as
well ()due to force-inline).

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

----------------------------------------
1 Path Changed]]>
Fri, 17 Sep 2021 08:25:44 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/d80d23e542f1e49d827f77b29e107057c1bc9a58Sergey Sharybin
<![CDATA[[85f060d] cycles-x: Fix race condition between draw and render threads]]> http://www.miikahweb.com/en/blender/git-logs/commit/85f060dc94f141c195ec01fe68725807f4eb7908 85f060d
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix race condition between draw and render threads

Caused crashes like the one William was fixing in the D12498, or the
crash when rendering multiple view layers.

Need to guarantee that the render engine is not freed during drawing,
and that the external engine is not in the middle of re-allocation due
to `update()` which might cause session reset (happens in Cycles).

Had to introduce a separate lock. The reason for this comes from the
fact that we need to acquire the engine early on in the draw manager,
and release it only when drawing is done. However, some other engines
(like overlay) might be requesting ImBuf for the image space, so that
they know dimensions. Such acquisition is guarded by the resultmutex.
This means reusing `resultmutex` for the `RenderEngine::draw()` would
cause a recursive lock.

Not entirely happy with implicit release in the external engine code,
but not sure there is an existing way of making it explicit without
introducing new draw engine callback.

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

----------------------------------------
7 Paths Changed]]>
Fri, 17 Sep 2021 08:14:36 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/85f060dc94f141c195ec01fe68725807f4eb7908Sergey Sharybin
<![CDATA[[5b92af3] cycles-x: Fix invalid address error in Cycles X GPUDisplay update]]> http://www.miikahweb.com/en/blender/git-logs/commit/5b92af33b03085efc21e1ae774d1c295d8ae4934 5b92af3
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix invalid address error in Cycles X GPUDisplay update

Make sure no display update happens after full buffer was written.
Makes it possible to free memory used by path trace works without
causing issues.

----------------------------------------
2 Paths Changed]]>
Thu, 16 Sep 2021 11:00:07 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/5b92af33b03085efc21e1ae774d1c295d8ae4934Sergey Sharybin
<![CDATA[[b537b28] cycles-x: Cleanup: Naming]]> http://www.miikahweb.com/en/blender/git-logs/commit/b537b28382d9704078759b44a9f0895d86b57573 b537b28
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cleanup: Naming

----------------------------------------
2 Paths Changed]]>
Thu, 16 Sep 2021 09:23:17 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/b537b28382d9704078759b44a9f0895d86b57573Sergey Sharybin
<![CDATA[[d7ecd44] cycles-x: Fix missing mutex lock for viewport OpenGL context]]> http://www.miikahweb.com/en/blender/git-logs/commit/d7ecd44fb1979d70ee9376ce709b53767c500814 d7ecd44
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix missing mutex lock for viewport OpenGL context

A mistake in D12468: the viewport uses GHOST to operate on contexts,
bypassing draw manager state,

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

----------------------------------------
2 Paths Changed]]>
Wed, 15 Sep 2021 18:04:17 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/d7ecd44fb1979d70ee9376ce709b53767c500814Sergey Sharybin
<![CDATA[[e432ce1] cycles-x: Render: Introduce render_frame_finish RenderEngine callback]]> http://www.miikahweb.com/en/blender/git-logs/commit/e432ce12a8574f40c72d5d155a241bd80b05d93c e432ce1
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Render: Introduce render_frame_finish RenderEngine callback

Allows to inform the engine that nothing else will be rendered for the
current frame and that the engine can perform post-processing of any
pending result.

For example, this allows the engine to free its memory, read all files
from disk and write them to Blender.

Currently no functional changes, just preparing API for the further
development of Cycles on-disk tile storage.

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

----------------------------------------
7 Paths Changed]]>
Wed, 15 Sep 2021 17:51:25 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e432ce12a8574f40c72d5d155a241bd80b05d93cSergey Sharybin
<![CDATA[[48d6a49] cycles-x: Cleanup: Typo fix in a comment]]> http://www.miikahweb.com/en/blender/git-logs/commit/48d6a491fcd33c7e484aa3a0256ba40c3ba3bab9 48d6a49
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cleanup: Typo fix in a comment

----------------------------------------
1 Path Changed]]>
Wed, 15 Sep 2021 17:52:38 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/48d6a491fcd33c7e484aa3a0256ba40c3ba3bab9Sergey Sharybin
<![CDATA[[ae61e81] cycles-x: Cycles X: Keep track of passes list in BufferParams]]> http://www.miikahweb.com/en/blender/git-logs/commit/ae61e816c6a8d12058b63c83c4c228875f22b7ab ae61e81
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Keep track of passes list in BufferParams

Currently should no functional changes.

The goal is to completely decouple BufferParams from Scene graph for
pass accessing.

This is needed for the on-disk tiled storage when EXR is to be read
from disk after the session got freed. Also, will make animation
denoising easier to implement.

----------------------------------------
2 Paths Changed]]>
Wed, 15 Sep 2021 17:33:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/ae61e816c6a8d12058b63c83c4c228875f22b7abSergey Sharybin
<![CDATA[[b09b5bc] cycles-x: Cycles X: Switch PassAccessor to BufferPass]]> http://www.miikahweb.com/en/blender/git-logs/commit/b09b5bccf3223a1563c1f3212512a828cc265e1f b09b5bc
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Switch PassAccessor to BufferPass

Moving towards pixels access from only Buffers, without access to
the scene graph.

Should be no functional changes.

----------------------------------------
7 Paths Changed]]>
Wed, 15 Sep 2021 17:33:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/b09b5bccf3223a1563c1f3212512a828cc265e1fSergey Sharybin
<![CDATA[[0c82c0c] cycles-x: Fix missing shadow catcher pass in viewport]]> http://www.miikahweb.com/en/blender/git-logs/commit/0c82c0c75880814cd12bb9c349e95b7c6fc440e6 0c82c0c
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Fix missing shadow catcher pass in viewport

The regression was caused by changes related on GPUDisplay used for
an offline rendering.

----------------------------------------
3 Paths Changed]]>
Wed, 15 Sep 2021 17:33:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/0c82c0c75880814cd12bb9c349e95b7c6fc440e6Sergey Sharybin
<![CDATA[[7c57f98] cycles-x: Ensure unique names of tile buffer files in Cycles X]]> http://www.miikahweb.com/en/blender/git-logs/commit/7c57f980f8ceea5ba5b6a52644b595929094c53f 7c57f98
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Ensure unique names of tile buffer files in Cycles X

It is possible that processing and deletion of tile buffer from disk
will happen after tile manager was re-allocated. This happens, for
example, when rendering multiple view layers in Blender: each view
layer will reset session (which re-creates the tile manager).

----------------------------------------
1 Path Changed]]>
Wed, 15 Sep 2021 17:33:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/7c57f980f8ceea5ba5b6a52644b595929094c53fSergey Sharybin
<![CDATA[[e89fb44] cycles-x: Cycles X: Switch TileManager to use BufferPass]]> http://www.miikahweb.com/en/blender/git-logs/commit/e89fb443169a798c492da8e8d9e0433342c9f9b0 e89fb44
Branches : cycles-x
Author : Sergey Sharybin (sergey)
----------------------------------------
Cycles X: Switch TileManager to use BufferPass

Continuation of work related on making buffers a sufficient entity
to properly access pass pixels.

For the ease of (de)serialization the buffer pass and parameters
are now subclass of Node. Can try looking into adding an explicit
Serializable API, but it will be outside of this patch and not
currently sure it will make things more clear.

----------------------------------------
5 Paths Changed]]>
Wed, 15 Sep 2021 17:35:35 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/e89fb443169a798c492da8e8d9e0433342c9f9b0Sergey Sharybin