In OpenGL the last vertex is the provoking vertex. In Vulkan the first
vertex is the provoking vertex. This PR uses `VK_EXT_provoking_vertex`
to use the last vertex as the provoking vertex.
Pull Request: https://projects.blender.org/blender/blender/pulls/131412
GPU and GHOST require to have identical checks to remove faulty drivers.
When not done GHOST can still select a device that isn't supported and
lead to freezing interfaces.
Pull Request: https://projects.blender.org/blender/blender/pulls/131241
Its not standard how `Present Engines` return images for presentation, and
currently is expected that they cycle between swap-chain images with each
`vkAcquireNextImageKHR` call.
However present engines could return any available image, that can mean
to reuse the last presented one if available. (This seem to be the behavior
using `Layered on DXGI Swapchain` the default `Present Method` used
with latest NVIDIA drivers on Windows).
Since resource pools expects to images to cycle in a sequential order, if any
present engine always return the same image for presentation only a single
resource pool would be used for each rendered frame, and since resources
are only released by cycling between resource pools, this resource pool would
overflow since it never releases any resource.
This changes makes resource pools to cycle each time a image is presented.
Pull Request: https://projects.blender.org/blender/blender/pulls/131129
On the Windows platform allow pasting an image into the Image Editor
based on a filepath in the clipboard. For example, selecting "copy" on
the context menu in the file system. This checks for CF_HDROP format
and should work for all image formats we support.
Pull Request: https://projects.blender.org/blender/blender/pulls/127782
When making a `headless` macOS build, linking would fail complaining
about missing `GHOST_ContextCGL` symbols, which are required by the Metal
backend. This commit fixes this issue by compiling the macOS CGL GHOST
Context if the Metal backend is enabled, instead of only depending on
`WITH_HEADLESS`, similarly to what's done on Linux/other *nix systems.
Pull Request: https://projects.blender.org/blender/blender/pulls/130847
When resizing window some platforms could freeze. The cause was that
depending on a platform the swap chain could get out of date when
acquiring the next swapchain image or when presenting the swap chain
image to the queue.
We only covered one scenario. This PR implements the scenario to
recreating the swap chain when the image could not be acquired.
Pull Request: https://projects.blender.org/blender/blender/pulls/130909
Dynamic rendering is a Vulkan 1.3 feature. Most platforms have support
for them, but there are several legacy platforms that don't support dynamic
rendering or have driver bugs that don't allow us to use it.
This change will make dynamic rendering optional allowing legacy
platforms to use Vulkan.
**Limitations**
`GPU_LOADACTION_CLEAR` is implemented as clear attachments.
Render passes do support load clear, but adding support to it would
add complexity as it required multiple pipeline variations to support
suspend/resume rendering. It isn't clear when which variation should
be used what lead to compiling to many pipelines and branches in the
codebase. Using clear attachments doesn't require the complexity
for what is expected to be only used by platforms not supported by
the GPU vendors.
Subpass inputs and dual source blending are not supported as
Subpass inputs can alter the exact binding location of attachments.
Fixing this would add code complexity that is not used.
Ref: #129063
**Current state**

Pull Request: https://projects.blender.org/blender/blender/pulls/129062
Shader draw parameters was enabled by query-ing the extension. The
feature is core in Vulkan 1.1, and our minimum requirement is Vulkan
1.2. In stead of querying the extension we should use enable the
feature via `VkPhysicalDeviceVulkan11Features`.
This was detected when working on !129062
Pull Request: https://projects.blender.org/blender/blender/pulls/130441
This implements the proposal from #124512. For that it contains the following
changes:
* Remove the global override of `new`/`delete` when `WITH_CXX_GUARDEDALLOC` was
enabled.
* Always use `MEM_CXX_CLASS_ALLOC_FUNCS` where it is currently used. This used
to be guarded by `WITH_CXX_GUARDEDALLOC` in some but not all cases. This means
that a few classes which didn't use our guarded allocator by default before,
are now using it.
Pull Request: https://projects.blender.org/blender/blender/pulls/130181
This commits fixes a bug where the new macOS Image Editor image copy
paste feature was correctly pasting images from macOS to Blender, but
wrongly copying image from Blender to other software upside-down.
This was fixed by porting the row inversion logic present in
GHOST_SystemCocoa::getClipboardImage to the putClipboardImage function.
Pull Request: https://projects.blender.org/blender/blender/pulls/129938
This commits fixes a bug where the new macOS Image Editor image copy
paste feature was correctly pasting images from macOS to Blender, but
wrongly copying image from Blender to other software upside-down.
This was fixed by porting the row inversion logic present in
GHOST_SystemCocoa::getClipboardImage to the putClipboardImage function.
Pull Request: https://projects.blender.org/blender/blender/pulls/129938
Running Xcode memory graphs and the Instruments tools revealed
memory leaks caused, in the main, by over-retained objects.
This removes the unnecessary 'retains' and adds some asserts
to guard against over-retaining in the future.
There are a few memory leaks remaining involving PyUnicode_DecodeUTF8
but I am unable to identify the cause of these at this time.
Authored by Apple: James McCarthy
Pull Request: https://projects.blender.org/blender/blender/pulls/129117
De-duplicate low level logic that reads the clipboard in a thread.
Instead, expand the utility function for reading from the clipboard
with arguments so it can be used for images & text.
In Objective-C, both the `Nil` and `nil` macros can be used to designate
Nullabity. However, only `nil` (with a lower case n) is commonly used,
as can be seen in documents such as the Google Objective-C Style Guide.
In this sense, this commits replaces instances of `Nil` with `nil` for
greater consistency.
Running in a headless weston session was asserting, then crashing,
causing WITH_UI_TESTS to fail.
Resolve by accounting for a wayland sessions without a seat.
Multiple threads can access the same device queue from different
threads. This could happen when doing a cycles preview render, baking
eevee volume probes or generating material previews.
This PR adds a mutex around access to the device queues.
Detected when researching #128608
Pull Request: https://projects.blender.org/blender/blender/pulls/128974
Dropping files could crash ~10% of the time on some systems,
although I wasn't able to reproduce the error.
The ownership of GWL_Seat::data_offer_dnd wasn't handled correctly,
where the value could be handled by both wl_data_device_listener::leave
& drop callbacks.
Resolve by ensuring the data-offer is handled by the drop callback.
getpwuid for accessing home wasn't used when looking up the path
for older Blender versions. There is no reason for the code-paths
to differ. Use a shared utility function to access home.
The tablet API become stable in wayland-protocol 1.35
NOTE: this was reverted [0] because I missed adding the files to lib.
The files have been included, so use the stable API.
No functional changes expected.
[0]: c525e4db83
This was already done in GHOST, but not BKE_appdir_folder_home.
Also null check the return value from getpwuid() as it's not
guaranteed to be non-null.