Commit Graph

24 Commits

Author SHA1 Message Date
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