Commit Graph

11845 Commits

Author SHA1 Message Date
rdb 9784d46e95 pstats: Fix off-by-one error in frame number counting
The frame number for CPU frames was one ahead of the real one, which did show up correctly for GPU frames
2022-12-07 14:42:29 +01:00
rdb 507ca7f7ac display: Remove some unused variables 2022-12-07 13:53:44 +01:00
rdb c82f95ad6b Merge branch 'release/1.10.x' 2022-12-06 20:02:35 +01:00
rdb 619050bb32 cocoadisplay: Fix fullscreen issues on M1 macs
The OpenGL-on-Metal drivers used on these machines don't support CGLSetFullScreenOnDisplay, so we need to disable it on those machines.  This also applies when running a x86_64 app through Rosetta 2, hence the sysctlbyname check.

Furthermore, we need to set the appropriate shielding level, which need not be `NSMainMenuWindowLevel+1`.

Fixes #1316

Co-authored-by: LD <laurent.deru@gmail.com>
2022-12-06 16:59:55 +01:00
rdb 45ac5029c0 glgsg: Fix compile error with OpenGL ES 1
Introduced by 2c9deaaaf0
2022-12-06 16:53:51 +01:00
rdb ff9ff688be tform: Fix "without" event generation when mouse leaves window
Fixes #1400
2022-12-06 13:48:23 +01:00
rdb 8a46c3dc64 windisplay: Only release capture when last mouse button is released
This fixes issues with lost up events when dragging out of the window with multiple buttons held

Fixes #1396
2022-12-06 13:36:14 +01:00
rdb 2c9deaaaf0 glgsg: Fix 1 texture stage limit when setting `gl-version 3 2` or higher
Fixes #1404
2022-12-06 12:57:45 +01:00
rdb 7a55c723ba Merge branch 'release/1.10.x' 2022-12-04 19:28:03 +01:00
rdb 59eb1510b9 pstats: Fix compilation without HAVE_THREADS or with SIMPLE_THREADS 2022-12-04 19:26:22 +01:00
rdb 41f0c9d48d pgraph: Support None as second arg of replace_texture/replace_material
This removes the relevant texture or material
2022-12-04 19:24:04 +01:00
rdb 8ca804086f pgraph: Fix a compiler warning in renderEffects.I
Initialization is unnecessary, but harmless
2022-12-04 16:58:49 +01:00
rdb 0866d485b1 pstats: Set default value for `pstats-max-queue-size` to 4
Otherwise any multithreaded application is dropping frames like mad, since the packets for different frames may be added to the same queue at roughly the same time.
2022-12-04 16:57:55 +01:00
rdb 550aad7024 Fix some uses of `AtomicAdjust::Pointer` to use `patomic<T *>` 2022-12-04 00:36:41 +01:00
rdb 05b3fe2170 dtoolbase: Use `patomic<size_t>` for memory usage counters 2022-12-03 22:42:03 +01:00
rdb bb530435e8 pstats: Offload more work to separate PStats thread
This improves performance of PStats client when a lot of data is being sent per frame.

Also increase the value of pstats-max-queue-size, since otherwise we're constantly dropping frames when using multiple threads.
2022-12-03 22:27:46 +01:00
rdb 863a38e901 pipeline: Display error if joining thread failed
This can occur if a thread tries to call join on itself
2022-12-03 21:48:34 +01:00
rdb 76677e5c00 pstats: Deprecate `PStatClient::resume_after_pause()`
It creates a clock skew in the PStats timing information that cannot be corrected for in the server.  If we want to bring this back, we should either have a global `pause()` and `resume()` (so we can properly pause collection in the meantime, and have a time to reset to, but we'd need to think about how to handle threading) or we should add a `drop_frame()` to drop the current frame.  If we must bring it back in its current form, then we need to communicate the clock reset to the server, so that it can properly take it into account.
2022-12-02 22:19:43 +01:00
rdb 60acf82f04 x11: Support desktop startup notification
This lets the window manager know when a program has finished launching, to stop showing a spinning cursor

Can be disabled with `x-send-startup-notification false`
2022-12-01 15:52:15 +01:00
rdb f593026061 x11: Support _NET_WM_PING 2022-12-01 15:18:45 +01:00
rdb d4c30bb4e7 tform: Add `@since` to doc of `MouseWatcher::is_raw_button_down()` 2022-11-30 14:02:51 +01:00
rdb b5e92e29f5 tform: Add `MouseWatcher::is_raw_button_down()` 2022-11-29 23:43:50 +01:00
rdb a5610f217e Merge branch 'release/1.10.x' into incoming 2022-11-29 20:58:51 +01:00
rdb 867f60dcca pstats: Rename "Show code" collector to "Tasks"
Also remove outdated definitions from pStatProperties.cxx
2022-11-29 20:50:18 +01:00
rdb adc324bbde pstats: Fix assorted compile issues in more esoteric configurations 2022-11-29 20:11:59 +01:00
rdb 50cfdebd9c pstats: Integrate Python profiler with PStats
Enabled with `pstats-python-profiler 1`, requires recent version of PStats server.

Currently, it is limited to the main thread only.  Support for other threads may be added at a later date.
2022-11-29 16:00:09 +01:00
rdb 7b9f2cd854 pstats: Support nested start/stop pairs in the server, accept 3.1
Currently, the client doesn't send nested start/stop pairs, but there is no good reason not to handle this case in the server, and in some cases it is useful to send them (I will soon make changes on master to take advantage of this).

Client version 3.1 indicates that the client may send nested start/stop pairs.
2022-11-29 15:48:02 +01:00
rdb d00d4a44a0 gobj: Properly initialize Texture object on all stages
Previously, forward stages would be uninitialized, resulting in cryptic errors with ahead-of-time preparation (although arguably ahead-of-time preparation is a bug in and of itself)
2022-11-26 16:56:07 +01:00
rdb f02a3156ca pipeline: Avoid dynamic allocation in PipelineCycler when using 1 stage
Eliminates a level of indirection at cost of 8 bytes per cycler
2022-11-21 20:23:03 +01:00
rdb 9bd66baa1c Merge branch 'release/1.10.x' 2022-11-21 19:02:50 +01:00
rdb 1f9f6a618f vision: Fix use of wrong delete operator in ARToolKit code 2022-11-21 18:33:35 +01:00
rdb 09f8634433 pipeline: Minor optimizations in cycler copy constructor
When copying a dirty cycler, don't use two separate lock-grabbing calls to add to the clean set, then remove from clean set and move to dirty set

Short-cut the cdata copy loop for the common case of only 1 stage
2022-11-21 18:31:54 +01:00
rdb 8a48c3b711 pgraph: Remove recursive lock grab in `Light.set_color()`
Harmless, but unnecessary
2022-11-21 18:26:19 +01:00
rdb fcfa1d2c99 gobj: Fix `ShaderBuffer.prepare()` not actually doing anything 2022-11-21 18:25:46 +01:00
rdb 7505112f1d shader: Fix compiler warning 2022-11-19 13:05:27 +01:00
rdb 76b9df0e53 tform: Change `MouseWatcher::get_mouse()` to return copy of LPoint2
Instead of a reference, which is very unintuitive and a common stumbling block for comparisons
2022-11-14 13:13:50 +01:00
rdb 592f2b7d6e Merge branch 'release/1.10.x' 2022-11-14 12:47:28 +01:00
rdb e92d993cea glgsg: Fix failure to unset divisor after rendering w/ instancing
This would normally be done by `disable_shader_vertex_arrays()` but it apparently isn't called between shader changes
2022-11-14 10:25:34 +01:00
rdb d801e00c0f CMake: don't re-export symbols from libharfbuzz.a
To match 84a69e1689 (fix for #1391)
2022-11-13 12:10:43 +01:00
rdb e961ea99ac Merge branch 'release/1.10.x' 2022-11-13 12:10:38 +01:00
rdb fe94e43bc4 pgraph: Fix issues with flattening TexMatrixAttrib
If multiple texture stages reference the same texcoord set, Panda wouldn't flatten the tex matrices even if they were the exact same

Fixes #1392
2022-11-13 11:11:32 +01:00
rdb 0220a43ce0 shader: Fix support for `#pragma include <example.glsl>` in GLSL 2022-11-09 17:20:11 +01:00
rdb 63017864ab pgraph: Support any number of attribs in `RenderState::make()` in Python 2022-11-07 18:17:48 +01:00
rdb 68111b2c42 Merge branch 'release/1.10.x' 2022-11-07 18:05:03 +01:00
rdb 8965741fcf tinydisplay: Don't reimplement process_events from base class
Reduces code duplication, makes it possible to inherit bug fixes from the base class, and also handles resizes more efficiently now (only when this would actually require a framebuffer reallocation).
2022-11-07 12:56:56 +01:00
rdb 0a827cf65c x11display: Time out waiting for ConfigureNotify event
Fixes #1087
2022-11-07 12:56:03 +01:00
rdb 70e86c46ed audio: Code formatting fixes in nullAudioManager.cxx
[skip ci]
2022-11-06 11:22:10 +01:00
rdb 502607e450 pgraph: Make CullTraverserData.view_frustum settable from Python
Perhaps useful for in cull callbacks
2022-11-06 11:19:56 +01:00
rdb 9d73c9b786 pgraph: Fix a missed `std::move` opportunity in ScissorEffect 2022-11-06 11:19:04 +01:00
rdb 2ec147f3b0 audio: Add positional property getter to AudioSound
Fixes #1257
Closes #1282

Co-authored-by: morganmliang <morganmliang@users.noreply.github.com>
2022-11-06 11:16:29 +01:00