Commit Graph

11976 Commits

Author SHA1 Message Date
rdb f0a4e61fd9 Revert "general: Add headers explaining the renamed config_*.h"
This reverts commit 47f7d3f297.

These header files have been deprecated for years and can be safely removed now.
2023-07-26 20:02:49 +02:00
rdb 115a716a7d Implement support for custom TypedWritable subclasses in Python
Fixes #1495
2023-07-26 19:55:40 +02:00
rdb 71ee57bc92 linmath: Unroll LVecBase4 less-than operator implementation 2023-07-26 19:33:43 +02:00
rdb f5827963a3 pgraph: Refactor RenderAttrib return_new code a little bit
- Allows the compiler to devirtualize the get_hash_impl call, in theory
- Reduces the overhead of checking the configuration variables every time in return_new
- Avoids recalculating the hash on calling get_unique
2023-07-26 19:18:22 +02:00
rdb c6f930a379 Merge branch 'release/1.10.x' 2023-07-21 19:42:39 +02:00
rdb 787e14fade egg2pg: Fix infinite recursion when `<Collide>` used with `<Line>`
Fixes #1515
2023-07-19 11:10:49 +02:00
rdb 07f9f9d897 (multiview) texture preparation changes:
Multiview textures are now handled as a single texture context instead of as one texture context per view. This should be marginally more efficient, but more importantly, it paves the way for implementing multiview textures as subviews of an array texture down the line, which paves the way for hardware-accelerated stereo rendering (where the left and right views get rendered simultaneously to different layers of an array texture).

The difference between a multiview texture done this way and an array texture is that the views of a multiview texture will still be treated as individual textures from the shader's point of view, only the views will be sharing the same storage on the GPU.  This can be done by using a feature offered by graphics APIs that is (serendipitously) also called "texture views", where it's possible to create multiple texture objects that point to layer ranges of a bigger array texture.

That part has not yet been done as doing this in OpenGL will be a little tricky due to texture views being an optional feature (so both paths would need to be implemented), but texture views are native in Vulkan (and D3D10+ for that matter), so doing this now allows me to implement multiview textures natively on the Vulkan end right from the start, and OpenGL can follow later if desired.

Furthermore, this commit includes:
- OpenGL: Overhaul texture creation and binding
- OpenGL: Change how reloading a texture with mipmaps works
- OpenGL: Use DSA in a couple of places
- OpenGL ES: Add support for buffer textures
- OpenGL: Remove support for bindless textures for now; this was never implemented in a very useful way, not used to my knowledge, and it is better to re-implement it later after the new shader pipeline lands
- DirectX9: All views of a texture are uploaded at the same time
- TinyDisplay: Support multiview textures natively (consecutive storage in memory)
- General: Per-page texture update tracking is working properly now for multiview textures
2023-06-13 13:51:19 +02:00
rdb c3e9f1738e Merge branch 'release/1.10.x' 2023-06-13 13:45:51 +02:00
rdb 94ebd7c953 pstats: Fix exception when `__module__` is a descriptor
This comes up when using metaclasses

Fixes #1505
2023-06-12 09:54:25 +02:00
rdb b79d8efce6 Don't use RTTI features when building with `-fno-rtti`
This should make it possible to use `-fno-rtti` in a C++ application even when Panda has been compiled with RTTI enabled.
2023-05-25 14:11:51 +02:00
rdb d2e93cc185 gobj: Fix post_load_store_cache field being uninitialized on cycle
This is randomly causing textures to be downloaded, which can be a significant performance drain
2023-05-25 13:55:22 +02:00
rdb 7fb9942fc3 tinydisplay: Fix crash on window close on macOS
Fixes #1485
2023-05-16 18:14:57 +02:00
rdb cdc95acf81 Merge branch 'release/1.10.x' 2023-05-08 20:08:48 +02:00
rdb dee48cc201 CMake: Fix error linking OpenAL as framework 2023-05-08 20:01:22 +02:00
rdb c958919037 Make API documentation for Filename and VirtualFileSystem clearer
Mention specifically that Filename methods act on the physical disk whereas VirtualFileSystem methods act on the VFS

Fixes #1493

[skip ci]
2023-05-08 11:19:03 +02:00
max cc74efa79a Fix assorted instances of leftover Python 3 syntax
Closes #1490
2023-05-05 11:08:17 +02:00
rdb 45fbfab094 pgraph: Add file_version property to BamFile (like BamReader/Writer) 2023-05-05 10:52:46 +02:00
rdb 749e297a02 putil: Add file_version property to BamWriter (mirroring BamReader) 2023-05-05 10:51:24 +02:00
rdb 86804b3ed1 putil: Fix a faulty docstring in BamReader 2023-05-05 10:48:04 +02:00
rdb eb82dbc765 putil: Accept bytes in DatagramOutputFile::write_header() 2023-05-05 10:47:14 +02:00
rdb 87b46a61ed display: minor doc fix and code cleanup 2023-05-05 10:45:26 +02:00
rdb f5d5340ad3 egldisplay: make pbuffers resizeable 2023-04-08 10:37:13 +02:00
rdb 21d7a83bfc egldisplay: Fix GL_INVALID_OPERATION with headless pbuffer 2023-03-29 16:33:33 +02:00
LD 53f32e440e cocoadisplay: Fix compilation errors due to missing includes 2023-03-24 17:24:05 +01:00
rdb 52dc6dbd28 cocoadisplay: Remove accidentally checked-in file
[skip ci]
2023-03-23 08:57:02 +01:00
rdb a5fe1fa4bd tinydisplay: Add Cocoa-based backend
Adds support for tinydisplay rendering on macOS

Fixes #1285
2023-03-22 13:15:06 +01:00
rdb 545ede9d94 cocoa: Split out GL-specific code into new cocoagldisplay module
This makes it possible to create subclasses for tinydisplay and vulkandisplay without having to duplicate code
2023-03-21 23:16:36 +01:00
rdb 389b24e695 windisplay: Fix issues switching fullscreen while maximized
Fixes #1469
2023-03-13 10:53:47 +01:00
rdb 05436a749f Merge branch 'release/1.10.x' 2023-03-09 11:23:19 +01:00
rdb c5d6bae1c3 glgsg: Work around Panfrost driver bug with wireframe mode 2023-03-09 10:58:10 +01:00
rdb 316b8e96eb pgraphnodes: Fix compile warning on 32-bit in SceneGraphAnalyzer 2023-02-24 23:11:55 +01:00
rdb eee10c9feb pnmimagetypes: Recognize .bw as extension for SGI images 2023-02-24 22:41:59 +01:00
rdb 32c73763e2 Merge branch 'release/1.10.x' into incoming 2023-02-24 22:40:53 +01:00
rdb b3730bf707 downloader: Use built-in MD5 implemention for HTTPDigestAuthorization
This code is only compiled when OpenSSL is enabled at the moment, but this will change when webgl-port is merged
2023-02-24 22:35:21 +01:00
rdb a5be6fa5ff pnmimagetypes: Fix compile error with some versions of png.h
Some define these as macros, which interferes with these definitions
2023-02-24 22:21:27 +01:00
rdb 126cd374e9 pipeline: Fix compile warning with pipelining disabled 2023-02-24 09:48:12 +01:00
rdb eefb51f510 dtoolutil: Add small_vector implementation and use it
This vector implementation does is optimized for the case of having only a small number of elements, which are stored directly on the vector object rather than being allocated from the heap.  If the capacity exceeds this small number, then a heap allocation is done.

This should improve performance in a couple of cases where vectors typically store 1 element and rarely more than that.
2023-02-22 16:48:11 +01:00
rdb 35348fd74a express: Do not rely on OpenSSL for MD5 hash support
These hashes are used in various places in the Panda codebase (for integrity checks, not for crypto), so using an internal implementation allows retaining this functionality when building Panda without OpenSSL.

Based on the following public domain implementation:
https://github.com/B-Con/crypto-algorithms
2023-02-22 16:47:14 +01:00
rdb 17242e9a0a gobj: Fix compiler warnings in TexturePool 2023-02-20 20:54:16 +01:00
rdb 9c4d08f589 gsgbase: Switch gsg list to use patomic instead of AtomicAdjust 2023-02-20 19:46:20 +01:00
rdb 818ed819f9 pgraph: Fix compiler warning for uninitialized variable 2023-02-20 19:05:05 +01:00
rdb 92bdaed4d4 linmath: Fix regression with LVecBase4 in #1453 / 87b5aa9
LVecBase4 was no longer trivially copyable as of that change
2023-02-20 19:02:54 +01:00
Brian Lach 52d59b2df7 add sRGB support to egg-palettize, sluminance to egg 2023-02-14 11:34:24 +01:00
git2323 518d4777fa
do not prefer framebuffer configs with excessive multisamples (#1456)
Co-authored-by: user1 <user1@user1.org>
2023-02-12 23:04:46 +00:00
rdb d2444132b2 opencv: Use correct headers for videoio C interface 2023-02-12 18:18:20 +01:00
rdb 5e26aae1ff cleanup: Fix assorted issues uncovered by clang-tidy 2023-02-12 18:17:03 +01:00
John C. Allwein 81f7a21845 openal: fix potential iterator invalidation in OpenALAudioManager::update
OpenALAudioManager::update iterates through all currently playing sounds
via a std::set / phash_set object, _sounds_playing.

If a stream queue corruption was detected during OpenALAudioSound::pull_used_buffers,
the logic added in a895890 would call cleanup() on
the sound if we could not successfully locate the target buffer and log an error.

However, the act of calling OpenALAudioSound::cleanup would lead to calling
stop() (since the sound was actively playing). In OpenALAudioSound::stop(),
we would then proceed to call _manager->stopping_sound which would erase
the current sound from _sounds_playing (while we still held an iterator
to it). Per STL standard and real-world observation, std::set::erase
will invalidate the current iterator held in update (https://en.cppreference.com/w/cpp/container/set/erase).
This leads to a segmentation fault when we attempt the next iteration on the loop.

To resolve this, let's ensure we don't hold onto invalid iterators during the updating of playing sounds.

Fixes #1452
2023-02-12 14:13:02 +01:00
rdb 1c37522026 Merge branch 'release/1.10.x' into master 2023-02-12 14:07:49 +01:00
rdb aaabb6a652 Fix assorted issues uncovered by clang-tidy 2023-02-12 13:55:59 +01:00
rdb 914993f31b putil: Fix SimpleHashMap error reporting at static init time 2023-02-12 13:49:44 +01:00