Commit Graph

11767 Commits

Author SHA1 Message Date
rdb aea2d6ef45 display: Release lock before notifying render thread in GraphicsEngine
Otherwise the render thread will wake up only to be blocked by the mutex right away.
2022-02-17 12:48:36 +01:00
rdb 355cd5b4cd pstats: Remove unused field from PStatClient::InternalThread 2022-02-07 17:03:58 +01:00
rdb 77b0d2d6a7 pstats: Switch from AtomicAdjust to C++11-style atomics 2022-02-07 17:02:30 +01:00
rdb e27162df0b Merge branch 'release/1.10.x' 2022-02-06 15:32:24 +01:00
rdb 287b0d5a74 mathutil: Add proper `__repr__` for LPlane class
Fixes #1248
2022-02-06 15:29:25 +01:00
rdb 94570f20aa pgraph: Remove need for grabbing lock in RenderState destructor 2022-02-05 22:25:51 +01:00
rdb 46a1ad3544 pipeline: Improve performance of Thread::get_current_thread() substantially
Speedup is realised by using thread-local variables.  Note that on Windows we can't inline get_current_thread, but it's still faster this way than calling TlsGetValue.

In theory the cache line alignment should help avoid false sharing but I have not profiled that extensively.
2022-02-04 23:49:39 +01:00
rdb f6322d8c93 pipeline: De-inline ConditionVarDummyImpl methods
This is the only ConditionVar implementation to import thread.h directly
2022-01-30 02:03:18 +01:00
rdb c66ca2ece1 pstats: Report PStats overhead more honestly
Half the overhead was being missed due to the unfortunate collector placement
2022-01-30 02:03:18 +01:00
rdb c7c1c683da pstats: Disable "App:Show code:General" collector for now
It is generating negative values, needs further investigation - maybe we need to restructure the whole hierarchy
2022-01-30 02:03:18 +01:00
rdb 36edb22fd1 pstats: Include client pid with hello message
Useful for uniquely identifying the process in a situation where multiple clients on the same host connect with the same server.

New version bump is not necessary, as old servers should just ignore the extra field in the datagram.
2022-01-30 02:03:18 +01:00
rdb 8034cb5a92 dtoolbase: Introduce patomic<> as replacement for AtomicAdjust
This typedefs to std::atomic<> when building with true threading, and uses a dummy implementation without.

This lets us use the full range of atomic operations offered by C++11, including explicit specification of memory fences.  Using barriers lets the compiler generate more optimal code since currently we are using the quite strict sequential-consistent memory ordering for all operations.  ReferenceCount has been changed to use the correct barriers (I hope).  This may especially make a difference on weak ordering systems such as ARM.

Over time we should gradually replace the use of AtomicAdjust with the new patomic file.
2022-01-30 01:53:36 +01:00
rdb 692221cacb cocoadisplay: Invert direction of horizontal scroll
Now behaves consistent with other applications (tested with Logitech MX Master 3 for Mac on macOS 10.13 in unnatural scrolling configuration).

Set `cocoa-invert-wheel-x true` to revert to old behaviour.
2022-01-22 15:56:53 +01:00
rdb eaa182f310 Merge commit '38bea01dab8f4dedd5fce9f8b9e82cebbf663189' into release/1.10.x 2022-01-22 15:46:52 +01:00
rdb 38bea01dab device: Do not enumerate keyboard/mouse devices on macOS by default
This causes an annoying "this app would like to receive keystrokes from any application" alert to be shown

Enable iokit-scan-mouse-devices or iokit-scan-keyboard-devices to restore the old behavior
2022-01-22 15:45:00 +01:00
rdb a56ee57422 Merge branch 'release/1.10.x' 2022-01-14 10:50:10 +01:00
rdb be2f6a7c61 glgsg: Fix missing GR_adjacency geom rendering flag
I don't think this flag being missing currently affects any functionality, but it is meant to be set when geometry shaders (with adjacency) are supported.
2022-01-14 10:25:01 +01:00
rdb b518da99a6 windisplay: fix origin not respected when switching to windowed mode 2022-01-12 10:23:19 +01:00
rdb 440b2c48b8 egg2pg: Slight cleanup
[skip ci]
2022-01-10 15:40:06 +01:00
rdb 6fe21fd8bd egg2pg: Add support for texture matrices to bam2egg 2022-01-10 13:22:57 +01:00
rdb 992cbb0840 pgraph: optimizations for analyze() 2022-01-10 13:22:34 +01:00
rdb a1538b4f7c pnmimage: Add offset parameters to PNMImage::perlin_noise_fill() 2022-01-10 13:21:51 +01:00
rdb 6777f19162 pnmimage: Add an additive PNMPainter brush 2022-01-10 13:21:46 +01:00
rdb 40f54a766c Merge branch 'release/1.10.x' 2022-01-07 10:52:28 +01:00
rdb d66ef59ecc pgraph: Fix assertion in PythonLoaderFileType with debug Python build 2022-01-07 10:44:03 +01:00
rdb 2d77093398 gobj: Fix TexturePeeker docstrings for filter_* being incorrect about wrapping
Fixes #1195
2022-01-06 12:52:10 +01:00
rdb 340dea5261 gobj: Fix crash when trying to load directory as txo/dds/ktx file 2022-01-06 11:52:40 +01:00
rdb 7a2a83572c Merge branch 'release/1.10.x' 2022-01-05 08:50:11 +01:00
rdb d65ca1edd6 pgraph: Fix nodes with same key but diff value getting flattened
This was a regression from 69b3468b2c
2022-01-05 08:14:08 +01:00
rdb ce9d2e38bf android: Improve physical mouse and keyboard handling:
- Support scroll wheel
- Support middle click, forward and back buttons (mouse4 and mouse5)
- Fix handling of key repeat events
- Correctly map numpad keys

[skip ci]
2022-01-04 20:35:17 +01:00
rdb d46651c032 Merge branch 'release/1.10.x' 2022-01-04 16:35:19 +01:00
rdb 210f7aecfb x11: Support mouse buttons 4 and 5 2022-01-04 11:06:25 +01:00
rdb d1c756713d display: Handle raw event for key between Shift and Z on ISO keyboards
This key is called raw-< for lack of anything better, it's usually mapped as backslash on US keyboards but that would not allow distinguishing between the backslash key near the enter key.
2022-01-04 11:05:46 +01:00
rdb c358f09f85 windisplay: Support lmeta, rmeta, and menu keys 2022-01-04 10:10:27 +01:00
rdb 08628dc97e windisplay: Support horizontal scroll wheel 2022-01-04 10:09:36 +01:00
rdb 822d8ce4c4 Revert "pgraph: Don't dupe shared GeomVertexData when premunging Geom"
This reverts commit f058bad802.

Reverting because I realised the current behaviour is happening due to different mungers, which my fix ignores.

Unfixes #1185
2022-01-03 11:31:54 +01:00
rdb f8df5cac32 Merge branch 'release/1.10.x' 2022-01-02 20:11:41 +01:00
rdb 11d5a49d6f pgraph: Fix LightAttrib::replace_{on|off}_light()
Fixes #1153
2022-01-02 13:02:04 +01:00
rdb f058bad802 pgraph: Don't dupe shared GeomVertexData when premunging Geom
Fixes #1185
2022-01-02 11:45:33 +01:00
rdb e9c97535f7 framework: Support GUI under pixel2d by default (for C++ users)
Fixes #1222
2022-01-01 18:22:02 +01:00
rdb b53895aa3d Merge branch 'release/1.10.x' 2022-01-01 18:18:46 +01:00
rdb 2915c6e670 glgsg: Force transform_weight column to read (0, 0, 0, 1) if absent
On NVIDIA cards, this doesn't seem to happen automatically.

Fixes #1207
2022-01-01 16:49:41 +01:00
rdb 5caf0ff5d6 device: Correction to 0e9ea67066
Fixes #1218
2022-01-01 15:14:30 +01:00
rdb 0e9ea67066 device: Implement correct sign extension for Windows raw devices
Hopefully, fix for #1218
2022-01-01 12:15:00 +01:00
rdb 72bf9e7fd1 device: Map FrSky RC controller as flight stick instead of gamepad
Reverts f01399bba8
2022-01-01 12:09:19 +01:00
rdb 1e6569e678 dxgsg9: Fix issues with luminance textures and ATI1 compression
Fixes #1198
2021-12-31 22:59:01 +01:00
rdb ecc6fb6b0c dxgsg9: Implement ability to get screenshot from multisample backbuffer
Fixes #1225
2021-12-31 13:41:57 +01:00
rdb 953cf898bc x11: Fix doubled-up info print message 2021-12-26 14:13:32 +01:00
rdb 9598065641 Merge branch 'release/1.10.x' 2021-12-26 14:13:23 +01:00
rdb f01399bba8 device: Correct axis mappings for FrSky RC controller on Windows
See #1218
2021-12-26 12:30:05 +01:00