Commit Graph

4279 Commits

Author SHA1 Message Date
Dennis Brakhane 224ed34fe9 backlog: fix potential deadlock in a different way (#1014)
The current implementation works insofar as that there is no deadlock,
but unfortunately the `entries` data can become corrupted enough for
the program to crash in the C++ stdlib.

For the new solution we use a shared_timed_mutex, allowing shared read
access to `entries`, and only acquire a unique lock for writing. Since
this can run into a deadlock if an error happens during rendering of
the backlog itself, we only wait 33ms to acquire it (1 frame @ 30 fps).

If we can't get it by that time, we still write to debug output, but not
into `entries`.

The shared_timed_mutex also allows us to wait for a read lock at the
end of the program, so we now wait for 1s instead of giving up immediately.

This commit also fixes a missing synchronization when accessing `history`
that was accidentially removed.
2025-01-12 19:27:26 +01:00
Turánszki János 1a91ab93af documentation updates (#1013) 2025-01-12 14:23:16 +01:00
Dennis Brakhane 9b7e102e05 use Zstd for wiHelper::Compress (#1012) 2025-01-12 07:40:12 +01:00
Phil Schumann acd31d6dfc cmake: allow static PIC builds with new optional WICKED_PIC_CODE (#1010) 2025-01-11 22:16:41 +01:00
Turánszki János 93b351a727 Shader dump compression 2025-01-11 13:50:25 +01:00
Dennis Brakhane 7f60d7a35b main_sdl2: don't allocate Editor object on stack (#1008)
It became too big for the stack, causing segmentation faults.

Also fix this for the samples and tests.
2025-01-11 09:21:45 +01:00
Turánszki János 959f9bbbed GUI highlight effect (#1007) 2025-01-10 17:15:04 +01:00
Turánszki János 95e357f73f Improved safety features to avoid GPU crashes 2025-01-09 17:27:24 +01:00
Turánszki János fd7f1fd89a Nvidia vulkan nan fix 2025-01-08 17:35:59 +01:00
Turanszki Janos fa0a2fea0a vulkan aliasing resource fix 2025-01-08 17:19:02 +01:00
Dennis Brakhane 65005e6d91 robin-hood.h: add check from last released version (#1003)
this gets rid of a warning when compiling with clang
2025-01-08 08:35:36 +01:00
Dennis Brakhane dc1b346b39 GitHub actions: replace deprecated save-always (#1002) 2025-01-08 08:33:36 +01:00
Dennis Brakhane 64c83c73a0 backlog: fix deadlock and an wi_assert logic error, add deprecation (#1001)
* When rendering the backlog, a GPU call might fail, causing
  wilog_assert to write to the backlog. This would then try
  to acquire the `entriesLock` (formerly `logLock`) but deadlock since
  the thread already holds it. Fix it by replacing SpinLock with
  std::recursive_lock.

  Reduce the time for how long the lock is held to only apply
  to when `entries` is accessed.

  Ensure we will not hang on destruction of LogWriter, even if
  the program aborts while another thread holds the entriesLock.

* wi_assert: Add parenthesis around if condition to ensure it works
  correctly in edge cases, like `i >= 0`

* add deprecation attribute to `input`, `acceptInput`, `deleteFromInput`
  so people who still reference them can remove the now pointless calls.
2025-01-07 19:12:47 +01:00
Turánszki János 3b779d8d3e volumetric clouds frame mismatch fix 2025-01-07 11:39:38 +01:00
Turánszki János 39ef56b439 ssgi improvements 2025-01-05 15:21:47 +01:00
Turánszki János a9e10580d6 volumetric cloud shadow improvements 2025-01-05 12:11:22 +01:00
Turánszki János 1d4839080e enabled conservative rasterization + depth for lightmaps 2025-01-04 16:38:35 +01:00
Turánszki János bf47f6c29d license update 2025-01-04 11:11:30 +01:00
Turánszki János 252722243b graphics error logging (#999) v0.71.645 2025-01-02 17:27:36 +01:00
Turánszki János 0bf18892ef gpu driver crash workarounds 2025-01-01 16:03:26 +01:00
Turánszki János 5aa4c1ce54 editor fix: mesh merging will retain tangents 2024-12-30 16:47:00 +01:00
Turánszki János 2e9d3bac90 scripting documentation formatting fixes 2024-12-30 16:46:37 +01:00
Turánszki János 947bccf35f fix: fall back to full precision UVs when the model has a very large UV layout 2024-12-30 12:13:17 +01:00
Turánszki János aa292dfaa7 ao aliasing fix 2024-12-29 17:07:15 +01:00
Turánszki János dfcc61bd6d gui: auto window sizing to fit all widgets; editor: object lightmap preview, windows sizing updates; 2024-12-29 11:15:50 +01:00
Jason Andersen 2a4bb4be3c Fix IMGUI Demo with HDR10 (#997)
IMGUI leaves the scissor in a random state.  This messes up the color normalization in HDR10, where the scissor needs to include the whole viewport.  Restore the scissor after IMGUI is done drawing stuff.
2024-12-28 18:29:54 +01:00
Turanszki Janos b78e42eb85 scripting fix 2024-12-28 12:53:25 +01:00
Turanszki Janos b0c8979af1 AMD: half precision interpolation was not enough for lightmap uv 2024-12-28 11:33:25 +01:00
Turánszki János ac6fc30963 lightmap improvements 2024-12-27 16:01:52 +01:00
Turánszki János 9f11982eed gui: added flag for disabling window title bar 2024-12-25 10:17:00 +01:00
Turánszki János 30bb9e10d5 fixed lightmap atlas generation for soft body and 8-influence skinned mesh 2024-12-23 17:13:15 +01:00
Dennis Brakhane 4db6c94b22 get rid of compiler warning (#995) 2024-12-23 09:25:52 +01:00
Turánszki János ce9619601b editor: added gui scaling combo box #992 2024-12-22 12:47:17 +01:00
Turánszki János 3e369a6f83 vulkan lightmap fix 2024-12-21 16:22:45 +01:00
Turánszki János 2fda798086 lightmap leak fixes; updated xatlas; ortho shader fixes; (#993) 2024-12-21 16:02:42 +01:00
Turanszki Janos fa5fc4b21d ortho projection shader fixes 2024-12-19 18:11:33 +01:00
Turanszki Janos c4fdd60ab0 test script fix 2024-12-19 12:34:30 +01:00
Turánszki János 9a9e953c05 texture streaming: faster rate for mipmap unload; volumetric cloud multithreading fix; 2024-12-16 20:17:41 +01:00
Turánszki János e46bb6d62c added missing keyboard button lua bindings 2024-12-16 09:09:41 +01:00
Turánszki János f5bdf9c712 added alt and altgr to input system 2024-12-16 09:02:30 +01:00
Turánszki János 97e08abfe5 impostor fix, character controller script fix, and some other refactors 2024-12-14 12:13:57 +01:00
Turánszki János e2d59974be make the build compatible with cpp20 (#990) 2024-12-13 14:28:08 +01:00
Turánszki János 163a94ca4e adjoint matrix fix (#989) 2024-12-13 10:49:12 +01:00
Turánszki János 275e5f3791 using adjoint matrix for normal transform 2024-12-13 08:30:27 +01:00
Turánszki János 901686bee4 fp16 normal transform (#988) 2024-12-13 07:50:55 +01:00
Turánszki János c8b84f09a9 changed location of vulkan shader cache and logging to be the application directory 2024-12-12 08:50:20 +01:00
Turánszki János f11486081c lightmap leaking fixes, optimizations (#986) 2024-12-10 09:59:54 +01:00
Turánszki János 842e2a0478 fp16 optimizations (#985) 2024-12-08 17:45:28 +01:00
CitroenGames 765fd549d4 fixing template windows cmake (#983)
* Update CMakeLists.txt

* improved build speed for windows
2024-12-08 10:28:07 +01:00
Turánszki János 17928bae94 some optimizations 2024-12-07 18:25:48 +01:00