Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
AgeCommit message (Collapse)Author
2022-06-21Cleanup: use full names for generated wayland headers, use own directoryCampbell Barton
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.
2022-06-21Fix error in GHOST_ASSERT under WaylandCampbell Barton
2022-06-20Cleanup: renaming and consistency for kernel dataBrecht Van Lommel
* 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.
2022-06-20Cleanup: avoid duplicate lookups when setting the cursorCampbell Barton
Also use `const char *` for cursor names as there isn't an advantage in using `std::string`.
2022-06-20Fix setting the custom cursor for Hi-DPI displays in WaylandCampbell Barton
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.
2022-06-20GHOST/Wayland: refactor cursor handling & fix errors hiding the cursorCampbell Barton
- 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.
2022-06-18GHOST/Wayland: implement getAllDisplayDimensionsCampbell Barton
2022-06-18Fix initial window size being scaled down for Hi-DPI displays in WaylandCampbell Barton
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.
2022-06-18GHOST/Wayland: support displaying custom software cursorsCampbell Barton
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.
2022-06-18Fix crash in wayland when closing a windowCampbell Barton
The focus_pointer only pointer was only cleared when the window existed, which caused a dangling focus_pointer when closing a window.
2022-06-18Fix T98793: Wayland clamps cursor movement fails with gnome-shellCampbell Barton
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.
2022-06-18GHOST: add GHOST_Rect.clampPoint methodCampbell Barton
Method for clamping a point inside a rectangle.
2022-06-17Cleanup: add verbose logging category names instead of numbersBrecht Van Lommel
And use them more consistently than before.
2022-06-17Cleanup: replace uint4 by AttributeMap structBrecht Van Lommel
2022-06-17Fix T98944: Uninitialized XRFrameState can prevent VR/OpenXR viewingPeter Kim
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.
2022-06-17GHOST/Wayland: skip cursor surface operations when hiding the cursorCampbell Barton
Also set the buffer scale before setting the cursor (matching SDL).
2022-06-17Cleanup: use booleans for GHOST C-APICampbell Barton
Also use GHOST_ prefix for public functions.
2022-06-17Cleanup: clang-tidy for GHOSTCampbell Barton
2022-06-17Cleanup: spelling in commentsCampbell Barton
2022-06-16GHOST/Wayland: workaround inability to access window positionCampbell Barton
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.
2022-06-16Fix memory leak plugging in new keyboards in waylandCampbell Barton
2022-06-16Cleanup: return const vector for system & window outputs() methodCampbell Barton
Move the enter/leave logic into methods so the method can return a const vector which isn't to be manipulated from other functions.
2022-06-16Fix error selecting the window scale in waylandCampbell Barton
Regression in [0] caused all output to be considered when updating after monitor outputs changed. [0]: ac2a56d7f3d6d20a0ed24ece11eea33e23d42f2c
2022-06-16GHOST/Wayland: acquire locks before freeing data on exitCampbell Barton
2022-06-16Fix missing free for drag & drop data with GHOST/WaylandCampbell Barton
2022-06-16GHOST/Wayland: account for fractional scale when picking the outputCampbell Barton
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.
2022-06-15Cleanup: remove redundant key entry from key_repeat_payload_tCampbell Barton
2022-06-15Cleanup: internalize struct members for internal wayland typesCampbell Barton
Missed from 9978689595f87a6b4d8244ee3d014c8fb239e38d.
2022-06-15GHOST/Wayland: add NULL pointer checks on window accessCampbell Barton
There were a few callers that missed checking a NULL return value which can happen in rare cases.
2022-06-15Cleanup: avoid static_cast when accessing wayland windowsCampbell Barton
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.
2022-06-15Cleanup: various minor changes to wayland internal conventionsCampbell Barton
- 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.
2022-06-15GHOST/Wayland: fractional scaling supportCampbell Barton
GHOST_GetDPIHint now returns a value that takes fractional scaling into account. Otherwise the integer scale is used since Wayland's API's use integer scale values exclusively. Use the same method as SDL to calculate the fractional scale.
2022-06-15Cleanup: use `int32_t[2]` for Wayland display size variablesCampbell Barton
2022-06-14Fix use after free error in 827fa8176737f822b7f8d2354b05e59976c7101aCampbell Barton
2022-06-14Fix crash in 827fa8176737f822b7f8d2354b05e59976c7101aCampbell Barton
Missing null pointer check.
2022-06-14Fix cursor coordinates being quantized to the window scale in WaylandCampbell Barton
- Apply the scale before converting cursor coordinates to int. - Store sub-pixel cursor coordinates internally since this is what Wayland uses. - Use `wl_fixed_t xy[2]` for storing coordinates as it simplifies assigning/passing x/y coordinates to an argument / variable. - Also fix drag-and-drop coordinates which ignored scale.
2022-06-14Cleanup: don't define wayland window methods as privateCampbell Barton
This meant the system couldn't call window methods unless the window was cast to GHOST_Window.
2022-06-14GHOST/Wayland add tablet supportCampbell Barton
Add support for tablet pressure, tilt and type detection (eraser, pen.. etc). There is currently an inconsistency where the tablets cursor is scaled larger than the mouse cursor (when the UI is scaled). Although there doesn't seem to be a way to control this from the client.
2022-06-13Cycles: MetalDeviceQueue - capture of multiple dispatches, and some tidyingMichael Jones
This patch adds a new mode of gpu capture (env var `CYCLES_DEBUG_METAL_CAPTURE_SAMPLES`) to capture a block of dispatches between "reset" calls. It also fixes member data naming inconsistencies and adds some missing OS version checks. Screenshot showing .gputrace capture in Xcode 14.0 beta (using `CYCLES_DEBUG_METAL_CAPTURE_SAMPLES="1"` and `CYCLES_DEBUG_METAL_CAPTURE_LIMIT="10"`): {F13155703} Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D15179
2022-06-12Fix T98714: Cursor grab restores to the initial location in WaylandCampbell Barton
While Wayland can't warp the cursor, it can set a hint for the cursor restore location when removing the lock.
2022-06-12GHOST/Wayland: set the minimum window sizeCampbell Barton
Setting Blender's window 1x1 can happen by accident & causes problems, set the minimum size as all other GHOST implementations do.
2022-06-12Fix GHOST/Wayland setting the window sizeCampbell Barton
Zoom in the animation player wasn't working: - The internal window size value wasn't being updated. - The window size event wasn't being sent.
2022-06-12Fix GHOST/Wayland accessing Ctrl & Alt modifier keysCampbell Barton
Only the Shift key was working with GHOST's getModifierKeys method. Now all modifiers are accessible, since there is no way of detecting left/right modifiers both are set.
2022-06-12Fix GHOST/Wayland display glitches on startupCampbell Barton
Address two glitches on window creation: - The DPI was zero until the `surface_enter` callback ran which happens after redrawing, causing the splash to display with incorrect scale before refreshing once the callback had run. - The window scale was always 1, even when all outputs were HI-DPI. Now the maximum scale of all outputs is used. This isn't fool proof in the case of multiple monitors having different scales, however it doesn't seem possible to detect the scale used ahead of time (details in code-comment).
2022-06-12Cleanup: use int[2] for window size & pending window sizeCampbell Barton
Also store 'size_pending' with scale applied as it's confusing to only apply scale to one of the size values.
2022-06-11Cleanup: minor changes to GHOST/Wayland window output accessCampbell Barton
- Use a window method to handle updating the window after scale changes. This avoids the need for methods that return mutable references to DPI & scale. - Remove window.outputs() method that returned window->system->outputs as it is misleading to expose these as window outputs when the outpurs returned are all known outputs. - Use a vector instead of an unordered_set to store window outputs, while a 'set' does make sense, it means the outputs can't be accessed in the order they're added which may be useful for further changes. - Use early returns.
2022-06-10Cleanup: inconsistent naming with recent locking checks in WaylandCampbell Barton
2022-06-10Fix T98758: Crash setting the clipboard in WaylandCampbell Barton
Accessing the clipboard in wayland wasn't thread safe, use locks for the clipboard, drag & drop data access and when setting the systems clipboard.
2022-06-10Fix dropping files in WaylandCampbell Barton
There were two problems dropping files into blender: - The inputs `focus_pointer` was NULL, causing a crash. - The wl_data_device_manager version was set to 1, causing the Blender window to close (when dropping files in gnome-shell 42). Resolve by storing the drop surface separately from the pointer surface and bump the device manager version to 3.
2022-06-10GHOST/Wayland: define a log handler to help tracking down errorsCampbell Barton
Many errors involving mis-use or unexpected situations report an error and close Blender's window buy don't crash, making it difficult to track down when the error occurs. Define an error handler prints the error and a back-trace, it can also be useful for setting a break-point