The OptiX implementation wasn't trying to allocate memory on the host if device allocation failed, while the CUDA implementation did. This copies the implementation over to OptiX to remedy that.
Differential Revision: https://developer.blender.org/D6068
Now local collections are fully working with cycles preview, while the
collection visibility bug is fixed.
Local collections were not working with cycles viewport even before the recent
commit to allow users to show collections that are hidden in the view layer.
It just got worse with said commit (0812949bbc3d).
Differential Revision: https://developer.blender.org/D6034
disabled and no world assigned to scene
BlenderSync::sync_world still relied on a blender world (mixes the world
viewport color with the studio light), for now just take black if no
world is present.
Maybe we should we use the theme color in the future here (seems eevee
does this in that case) -- we'd have to pass down `b_userpref` from
`BlenderSession::render` down to `sync_data > sync_shaders > sync_world`
then afaics.
Reviewed By: jbakker, brecht
Maniphest Tasks: T70573
Differential Revision: https://developer.blender.org/D6005
Adds a check when starting blender if your platform is supported. We use a blacklist
as drivers are updated more regular then blender (stable releases).
The mechanism detects if the support level changed or has been validated by the user previously.
Changes can happen due to users updating their drivers, but also when we change the support
level in our code base.
When the user has seen the limited support level message it is saved in the user config.
It would be better to have a system specific config section, but currently not clear
what could benefit from that.
When the platform is unsupported or has limited support a dialog box will appear including a link
to our user manual describing what to do.
**Windows**
Windows uses the MessageBox that is provided by the windows kernel.
**X11**
We use a very lowlevel messagebox for X11. It is very limited in use and can be fine tuned when needed.
**SDL/APPLE**
There is no implementation for SDL or APPLE at this moment as the platform support feature targets mostly Windows users.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5955
The clamp option in the Map Range node doesn't work correctly when the
inputs are linked. The code didn't put that into considration.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5987
For many users, this will make the File Browser window behave more like
what they would expect. It addresses the issue of the File Browser
becoming hidden behind the main window by clicking anywhere in the
latter. It communicates the interruptive, but temporary nature of the
operation a bit better.
Further, on tiling window managers the File Browser now opens as
floating by default, like in other applications.
Note that this also makes sure the File Browser is always opened as
separate window, so it doesn't re-use the Preferences, or any other
temporary window anymore. This seems to have been a common annoyance.
More concretely, this makes the File Browser window behave as follows:
* Stays on top of its parent Blender window, but not on top of
non-Blender windows.
* Minimizes with its parent window
* Can be moved independently
* Doesn't add an own item in task bars
* Doesn't block other Blender windows (we may want to have this though)
* Opens as floating window for tiling window managers (e.g. i3wm/Sway)
Further notes:
* When opening a file browser from the Preference window (or any
temporary window), the main window, as the file browsers parent is
moved on top of the Preferences, which makes it seem like the
Preferences were closed. This is the general issue of bad secondary
window handling as window activation changes. I made it so that the
window is moved back once the file browser is closed.
This behavior is confusing and would be nice to avoid. It's a separate
issue though.
* On most window managers on Linux the temporary window can not be
minimized and maximized, they disable that for dialog windows.
* On Windows and macOS, only minimizing is disabled, as there is no
decent way yet to restore a window if it's not shown in the taskbar.
Reviewed By: Brecht van Lommel, Campbell Barton, William Reynish
Edits and macOS implementation by Brecht.
Differential Revision: https://developer.blender.org/D5810
Part of T69652.
Rendering would produce invalid results or crash if the Vector pass was active but motion blur was inactive. This caused the OptiX BVH to be built with motion (because objects reported motion available), but the pipeline to be built without motion support (since with disabled motion blur this is not in the list of requested features). The two are not compatible and therefore caused issues. This patch fixes that by not building the BVH with motion if motion blur is not active (which makes sense).
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5968
Curves with motion blur produced wrong results with OptiX (T69801). This is because the AABBs for the motion steps were calculated from incorrect attribute data because the offset into the attribute data array was incorrect.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5961
The OptiX device only loads the denoising kernels when the "use_denoising" feature is active. This was not set by the calling code however and therefore they were never loaded and attempting to launch them failed (see T69801).
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5946
The "optix_devices" array was not freed on exit, which caused a memory leak (see T69801).
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5944
This adds the same high quality cursors on macOS as we have on Windows.
These are stored as 32*32 pt PDFs, same as the built-in OS cursors
Reviewed by: Brecht Van Lommel
Differential Revision: https://developer.blender.org/D5907
* Add more standard cursor types, that platforms can optionally support.
* Remove a few unused cursor types that were not properly supported and
would show the wrong cursor when used.
* Add native cursor files for Windows. These scale well with DPI and have
anti-aliasing. Designed by Duarte Farrajota Ramos.
Ref D5197
Cycles casts a pointer from ShaderDataTinyStorage to ShaderData, these structs by default had different alignments however (the former was 1-byte aligned, the latter 16-byte). This caused undefined behavior on at least the CUDA platform. Forcing both structs to use the same alignment fixes this.
CUDA toolkits newer than 10.1 run into this because of a compiler optimization.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5883
When doing simple scenes the displacement shading failed during final
rendering when the displacement method is set to `Displacement + Bump`.
When this option is enabled the shader uses the Vector math
node. This node is part of the node group level 1. When doing simple
shading only using nodes that are part of the node group level
0 the shading was rendered black.
This only happened in final rendering as there the OpenCL programs are
optimized to save registries. Viewport rendering rendered correctly
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5859
This was introduced in FFmpeg lavf 55.1.100 in 2013. For systems that are
still on LibAV or older FFmpeg there is a fallback implementation that
performs the same guess as we did before in `av_get_r_frame_rate_compat()`.
Small memory reduction change by only storing the pixels of the combined
pass when it is being shown in the viewport. Previously the combined pass
was always calculated and present in the output buffer. The combined pass
will still be calculated.
It is a limitation in Blender that Cycles always had a combined pass.
This patch will remove the limitation from the code base of Cycles.
Blender still has the limitation, but will always request the combined
renderpass when doing final rendering.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5784
Most of these calls were replaced with the successors as suggested
by Xcode's Fix-It. Functionality should not be affected.
This reduces the number of warnings when building on macOS.