Age | Commit message (Collapse) | Author |
|
If there is an error we should stop rendering, instead of finishing with a
wrong render result or reporting a wrong benchmark time.
Ref T96519
Differential Revision: https://developer.blender.org/D15287
|
|
This implements client-side window decorations for moving and resizing
windows and HiDPI support.
This functionality depends on the external project 'libdecor' that is
currently a build option: WITH_GHOST_WAYLAND_LIBDECOR.
Reviewed by: brecht, campbellbarton
Ref D7989
|
|
Manta flow used the `__main__` namespace which it was executed in,
this caused a bug when calculating fluid from Python, which clears
it's `__main__` name-space after execution.
This caused Manta-flows name space to be cleared too.
Resolve this by creating a separate name-space for manta-flow.
Reviewed by: SonnyCampbell_Unity
Ref D15269
|
|
As grab already uses it's own virtual coordinates, cursor warping can
be used when grab is enabled.
Currently nothing depends on this however it could be useful in future.
|
|
|
|
|
|
|
|
GHOST_ASSERT now matches BLI_assert, which is only ignored for release
builds. Otherwise it prints or asserts when WITH_ASSERT_ABORT is enabled.
|
|
|
|
Accumulate tablet data before generating an event using the 'frame'
callback.
|
|
|
|
This change helps decrease Intel GPU binaries compile time by 5-10
minutes without impacting other backends.
Reviewed By: sergey, brecht
Differential Revision: http://developer.blender.org/D15273
|
|
This patch unifies the names of math functions for different data types and uses
overloading instead. The goal is to make it possible to swap out all the float3
variables containing RGB data with something else, with as few as possible
changes to the code. It's a requirement for future spectral rendering patches.
Differential Revision: https://developer.blender.org/D15276
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15268
|
|
Also remove NULL checks in keyboard enter/leave handlers,
as they didn't serve any purpose.
|
|
- Respect modifier keys (Shift press/release didn't change the case).
- Changing modifiers resets the timer instead of canceling key-repeat.
- Releasing keys (besides the key being repeated) resets the timer
instead of canceling key repeat.
This makes key-repeat behave the same way as GTK & WIN32 text input.
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15267
|
|
This patch suffixes Apple GPU device names with `(GPU - # cores)` so that variant GPUs with the same chipset can be distinguished. Currently benchmark scores for these M1 family GPUs are being incorrectly merged:
- M1: 7 or 8 cores
- M1 Pro: 14 or 16 cores
- M1 Max: 24 or 32 cores
- M1 Ultra: 48 or 64 cores
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D15257
|
|
Ensure wayland handlers run that clear the window immediately after
the window has been removed so dangling pointers to the window
aren't left set.
|
|
Instead of providing our own names for wayland headers, use the filename
component as the basis for the header names. This matches most reference
documentation for Wayland.
Also generate client protocols into a sub-directory `libwayland`,
instead of generating headers into the ghost directory. Making the
include path more specific & makes it easier to differentiate generated
headers from other build files.
|
|
|
|
* Rename "texture" to "data array". This has not used textures for a long time,
there are just global memory arrays now. (On old CUDA GPUs there was a cache
for textures but not global memory, so we used to put all data in textures.)
* For CUDA and HIP, put globals in KernelParams struct like other devices.
* Drop __ prefix for data array names, no possibility for naming conflict now that
these are in a struct.
|
|
Also use `const char *` for cursor names as there isn't an advantage
in using `std::string`.
|
|
Changing the cursor would intermittently close Blender's window
(without crashing).
This happened because the size of a cursor must be the a multiple of the
scale, for themed cursor this is always true but with custom cursors
it's not.
Separate theme scale from custom cursor scale to avoid this bug.
In the future we can support Hi-DPI custom cursors, for now they're
scale is always set to 1.
|
|
- Support showing & hiding the cursor without setting the buffer,
needed to switch between software and hardware cursor.
- Track the state of the software/hardware cursor.
This resolves glitches switching between cursors sometimes hiding the
cursor.
|
|
|
|
getMainDisplayDimensions return values were scaled by the UI-scale,
instead of returning pixel values.
Also correct an error accessing the rotated monitor size,
which happened to be harmless as the value isn't used at the moment.
|
|
Add a method to access the custom cursor from GHOST which is used
for drawing a software cursor. This means the knife tools cursor now
work as expected.
Although non-custom cursors are still not supported.
|
|
The focus_pointer only pointer was only cleared when the window existed,
which caused a dangling focus_pointer when closing a window.
|
|
The current gnome-shell (v42.2) has a bug where grabbing the cursor
doesn't scale the region when confining it to the window.
For Hi-DPI displays this means the cursor may be confined to a quarter
of the window, making grab unusable.
Even though this has been fixed up-stream the issue remains in the
latest release - so workaround the problem by implementing window
confined grab using a software cursor.
This is only used gnome-shell for displays that use Hi-DPI scaling.
|
|
Method for clamping a point inside a rectangle.
|
|
And use them more consistently than before.
|
|
|
|
This provides a workaround for the VR session stopping due to an error
in locating controller poses. The problem was that for the actions sync
on the first frame, the session's XrFrameState/predicted display time
had not been initialized yet, which led to an error in xrLocateSpace()
(the error was only observed for some OpenXR runtimes since the first
frame pose state would be inactive for other runtimes, skipping the
call to xrLocateSpace()).
The timing of action updates relative to frame state updates could be
reworked in the future, but for now simply check for a valid display
time to avoid an error on the first frame.
|
|
Also set the buffer scale before setting the cursor (matching SDL).
|
|
Also use GHOST_ prefix for public functions.
|
|
|
|
|
|
Wayland doesn't support accessing the position making functionality that
would map events to other windows fail, sometimes considering windows
overlapping when they weren't (as all window positions were zeroed).
Disable dragging between windows when accessing the window the position
isn't supported.
|
|
|
|
Move the enter/leave logic into methods so the method can return a const
vector which isn't to be manipulated from other functions.
|
|
Regression in [0] caused all output to be considered when updating
after monitor outputs changed.
[0]: ac2a56d7f3d6d20a0ed24ece11eea33e23d42f2c
|
|
|
|
|
|
Finding the output with the largest scale now checks fractional scaling.
While this is only a minor difference in most cases, it makes the scale
deterministic instead of depending on the order outputs are added.
|
|
|
|
Missed from 9978689595f87a6b4d8244ee3d014c8fb239e38d.
|
|
There were a few callers that missed checking a NULL return value
which can happen in rare cases.
|
|
Rename get_window to window_from_surface and return a
GHOST_WindowWayland instead of an GHOST_IWindow since most callers
needed to cast. It also makes sense that an call for accessing windows
would return the native type.
|
|
- Initialize values in the struct declarations
(help avoid accidental uninitialized struct members).
- Use `wl_` prefix for some types to avoid e.g. `output->output`.
- Use `_fn` suffix for locally defined function variables.
- Use `_handle_` as separator for handlers, making function names easier
to follow as this separates the handler name from the interface.
- Add doxy sections for listeners in GHOST_WaylandWindow.cpp.
|