40 Commits

Author SHA1 Message Date
4ba4558cf6 CommandQueueMT: Reduce lock contention in cases of single flusher 2025-11-21 11:11:30 +01:00
70a2ce974b Merge pull request #110060 from BlueCube3310/betsy-rgb
Betsy: Convert RGB to RGBA on the GPU for faster compression
2025-10-21 15:11:09 -05:00
cc2fdc3937 Merge pull request #111015 from Alexofp/texture-compression-build-option
Scons option to enable CVTT and Betsy compression in export templates
2025-10-21 15:10:56 -05:00
885904ef2f Betsy: Convert RGB to RGBA textures on the GPU 2025-10-21 17:49:35 +02:00
04860bb41a Betsy: Generate BC1 tables once during compression 2025-10-09 00:02:44 +02:00
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
9fbf5808a0 Rename server "free" functions to "free_rid" to match exposed API 2025-09-30 16:52:25 -07:00
5a0f29f316 Option to enable cvtt and betsy compression in exported builds 2025-09-30 09:19:59 +03:00
e366471fdc Add GDSOFTCLASS to deeper inheritors of Object 2025-09-24 19:15:56 +01:00
cd3a6c88fd Merge pull request #106200 from BlueCube3310/image-16-u16
Image: Implement 16-bit unorm and uint formats
2025-09-23 12:08:46 -05:00
782b9e328c Ensure that threads only process one pump task.
This is necessary because we will always deadlock if a thread takes on multiple pump tasks since pump tasks never return.

This means when using separate threads for certain systems (like physics or rendering), we need to be sure that there are enough threads to have at least one per system (to ensure forward progress).
2025-07-29 07:15:34 -07:00
16b9ee6f50 Image: Implement 16-bit unorm and uint formats 2025-06-28 00:30:52 +02:00
2b36c79f7b Use Span<uint8_t> in RenderingDevice allocation APIs to avoid intermediary arrays on calls. 2025-06-18 12:31:48 +02:00
affa27d188 Betsy: Remove OGRE aliases 2025-04-22 14:54:57 +02:00
040cc3d5ec Fix corrupted negative values for signed BC6 2025-03-29 17:26:54 +02:00
face3caf6a Force multiple of 4 sizes for Betsy compressor. 2025-03-18 15:39:53 +02:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
3f1594ab90 Delete rendering device on the same thread it was created 2025-03-04 09:18:35 +01:00
ceea97fc05 Betsy: Consolidate documentation in module folder and cleanup SCsub
Also remove unused `UavCrossPlatform_piece_all.glsl`.
2025-01-31 23:45:37 +01:00
03c83cea1e Style: Enable clang-format's InsertBraces config
This was part of our style guide since we started using clang-format
but the feature was only added in clang-format 15, and we hadn't
noticed it yet.
2025-01-09 16:46:51 +01:00
cccd2432c3 Refactor CommandQueueMT to use vararg templates
In order to make CommandQueueMT more maintainable this PR changes the
previous macro hell with variadic templates instead. This makes the
class far more explicit and will allow us to more easily change the way
the class functions in the future.

Furthermore this refactoring has allowed for some optimizations. In
particular by using std::forward to delay the decision of decaying the
type to as late as possible we are able to move the data from the
callsite into our Command buffer and later move it to the call.

In practice what this means is that compared to the old version instead
of copying values 3 times, we can now get away with 1 copy, and 1 move
for lvalues, and just 2 moves for rvalues. This saves quite a few
operations in a hot codepath.

We also now test to make sure that the amount of copies and moves are
what we expect. This way we can spot performance regressions in this
code easily.

Somewhat unscientifically, running TPS-demo by pressing enter and not
touching the controls average mspf, repeatable across many runs:

before: 6.467
after : 6.202
2025-01-02 15:35:08 +01:00
b447eaa6a8 Betsy: Fix stack-use-after-scope when using BC3 and BC5 2024-12-19 08:42:21 +08:00
f4f6f5fb55 Merge pull request #99537 from BlueCube3310/betsy-bc1-bc5
Betsy: Add BC3 and BC5 support
2024-11-29 22:02:06 +01:00
88ffe07de9 Betsy: Add BC3 and BC5 support 2024-11-27 12:27:05 +01:00
e8a4b45ce4 Style: Add 19.1.0 LLVM options to .clang-format 2024-11-22 09:24:32 -06:00
89a311205f Style: Apply clang-tidy fixes
• `modernize-use-default-member-init` and `readability-redundant-member-init`
• Minor adjustments to `.clang-tidy` to improve syntax & remove redundancies
2024-11-04 12:11:06 -06:00
52bbbd4338 Merge pull request #98247 from TCROC/fix-headless-graphics-driver-and-shader-crash
Don't create rendering device or parse glsl shader in headless mode
2024-10-24 13:22:53 -05:00
2e1fc241f9 fix headless import attempting to load graphics driver 2024-10-22 16:17:09 -04:00
a1e768c508 Merge pull request #97295 from BlueCube3310/betsy-bc4
Betsy: Implement BC4 compression
2024-10-14 14:09:56 -05:00
9f9ee0c813 SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
95fd45d9a5 Betsy: Implement BC4 compression 2024-09-22 10:16:37 +02:00
74a1c85ba3 Add CommandQueue to Betsy 2024-09-12 13:54:24 -07:00
606eedb0c9 Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
9bcb9adad9 Merge pull request #96444 from clayjohn/Betsy-print-error
Print shader compiler error when betsy shader fails to compile
2024-09-04 18:55:39 +02:00
6de2d31a61 Merge pull request #96351 from stuartcarnie/sgc/metal_light_betsy
Metal: Enable for betsy and lightmapper modules in compatibility mode
2024-09-03 11:43:42 +02:00
30c42b3a3f Betsy: Add signed mode for BC6 2024-09-02 09:49:14 +02:00
b8933a4d95 Print shader compiler error when betsy shader fails to compile 2024-09-01 13:39:00 -07:00
a7a245de92 Metal: enable for betsy and lightmapper modules
To support this, the rendering_context_driver_metal.h header was updated
to recognise when it is included in non-Objective-C source files.
2024-08-31 08:29:07 +10:00
76c8211653 Image: Add a method for detecting signed values 2024-08-27 09:23:17 +02:00
394ea653aa Add Betsy to speed up BC6 compression 2024-08-18 11:14:05 +02:00