18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 23:57:09 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
b0ebd83475 Merge branch 'feat/gl46-migration' of https://github.com/MaSzyna-EU07/maszyna into feat/renderers-cleanup 2026-11-25 15:29:12 +01:00
43c46952ab perf(render): the Vulkan renderer resolves MSAA once a pass, keeps the window of the draw blocks and makes the multi draw shaders and ray tracing textures in the background 2026-11-25 10:27:31 +01:00
e0f07fde71 fix(render): the Vulkan renderer doesn't hang on exit, draw a minimized window with a NaN projection or quit on a lost surface 2026-11-25 09:34:58 +01:00
pol102
4ba8d508ca fix(gl46, vk14): keep the loading screen up while the shaders and pipelines are prepared, instead of a black window (#476)
* fix(gl46): the loading screen stays until the shaders are compiled, no black window at the first start of a new version

At the first start of a new build (the driver keeps the compiled shaders of each executable apart, and every build has a name of
its own) the window went black and didn't answer for about half a minute after the scenery was loaded. Measured on
calkowo_osobowy with a copy of the executable under a new name: 33 of those seconds were the first step of the water on the
windscreens, which compiled its nine programs (water_*.comp) in the first frame of the simulation.

- After the scenery is loaded the loader keeps its screen, with the bar going and the note on preparing the graphics, until the
  renderer says the programs are ready (gfx_renderer::Prewarm_Shaders(), about 50 ms a frame): the programs of the materials
  are drawn with once each into a small target of the formats of the colour pass, as the opaque things and as the translucent
  ones, then the programs of the windscreen water are compiled one a frame (opengl46_windscreen_water::prepare_next()), which
  gpu_init() then keeps. The window answers in between.
- The Vulkan renderer, which has its pipeline cache, says it's all done at once (the default of the interface).

Checked with a copy of the executable under a new name (nothing kept by the driver): the loading screen with the note from the
end of the loading (19 s) to the first frame (58 s), the window answering all the time; the first frame no longer stalls (the
water 12 ms instead of 33 s). With the shaders kept by the driver the preparing takes no time.

No asset changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(gl46): the missing program of the windscreen water found by find_if, which GCC 13 and MSVC 14.4x compile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(loading): the notice that the graphics are being prepared at the top of the screen

The notice stood at the bottom left, beside where the loading icon goes, over the trivia and the texts some
of the backgrounds carry at the bottom. It is now centred at the top of the screen on a dark plate, so it
reads on any background. The text and its translation are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(vk14): the loading screen stays until the pipelines of the scene are made, as with OpenGL 4.6

vulkan14_renderer::Prewarm_Shaders() lists the pipelines the loaded scenery draws with most: those of the
programs of its materials for the colour pass of the main view, opaque and blended, and those of the
shadows. With the background threads (gfx.vulkan.asyncresources) they are handed to them, made ahead and
not counted as made late; without them they are made on the main thread for about 50 ms a frame. The
loading screen, with its notice and progress bar, waits for them and for the pipelines of the last
session the background threads make ahead. Before, a pipeline first asked for by a draw either left the
draw out for a few frames or held the frame while it was made.

The images of a viewport are made by make_viewport_targets(), taken out of render_scene() unchanged, so
the main view's formats are known before the first frame. The key and the settings of a pipeline come
from the same helpers bind_scene_pipeline() uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(gl46, vk14): the review of #476: the multi draw variants prewarmed with a model block, the last session's list in the progress

OpenGL 4.6: with gfx.gpucull 1 and the multi draws on, Prewarm_Shaders() also draws the multi draw variants
of the material programs. Their shaders read the model block from the storage buffer at
MODEL_DRAW_SSBO_BINDING, which nothing bound before the first frame, so the draw was undefined. The
prewarm now binds a buffer of one model block there. With the default gfx.gpucull 0 there are no such
variants and nothing changes.

Vulkan: the loading screen waits for the background threads, and so for the list of the last session, up
to 4096 pipelines. With a cold cache the bar stood at n/(n+1) all that time and looked stuck. The
pipelines of that list are now counted in the progress as they are done with, made or not. The wait still
ends when the background threads are idle, as before.

make_viewport_targets() returns false without a context, which Sonar reported as a null pointer
dereference. Its callers checked the context already.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QRgQ1LqB4YXWorLDBBL6hD

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 05:14:33 +01:00
b8815a2455 Optimise raytracing and buffer building 2026-11-16 22:19:17 +01:00
053e4cacee Merge branch 'master' into feat/renderers-cleanup 2026-11-16 21:44:48 +01:00
ff2ff308ed Some optimalisations 2026-11-09 20:58:02 +01:00
acbea51f81 fix: the build after the merge of master 2026-11-07 16:46:11 +01:00
765153ad91 Merge remote-tracking branch 'origin/feat/switch-blades' into feat/renderers-cleanup 2026-10-29 23:55:04 +01:00
8bd41f431d Keep the slices of the ring caches within the window the shaders index from 2026-10-29 19:21:14 +01:00
e8a90507f0 Light the cab with the sun coming in through its windows 2026-10-28 12:19:43 +01:00
1447dcf075 Walk the shadow passes and the culled model groups on worker threads in the Vulkan renderer 2026-10-27 20:56:11 +01:00
c44b243698 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 17:11:06 +01:00
2a876befb0 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 16:02:36 +01:00
9dde5b0e5e Take the ambient occlusion into the lighting and add a probe of the cab 2026-10-27 13:23:52 +01:00
719c729929 Improve rain shader 2026-10-26 15:51:56 +01:00
a6bdeeaa2b Add DLSS Frame Generation (gfx.framegeneration x2/x3/x4) and Reflex (gfx.reflex) to the Vulkan renderer 2026-10-25 20:52:12 +01:00
1841e6d7b0 Add NVIDIA DLSS to the Vulkan renderer (gfx.antialiasing dlss/dlaa) and gfx.buffer.percent 2026-10-25 19:35:33 +01:00
f20b1a3071 Replace cubemap scenery reflections with SSR, add Vulkan ray traced reflections 2026-10-25 13:54:49 +01:00
252b9373ea Add gfx.antialiasing (off, msaax2/x4/x8, taa) with temporal anti-aliasing in the GL 4.6 and Vulkan renderers 2026-10-25 05:17:41 +01:00
c48c58776a Vulkan: parity with GL (P1–P7), shared GPU culling records (N6c), threaded command recording and render thread (M1, M4) 2026-10-25 03:06:01 +01:00
9b7d02e5fb Vulkan: scene rendering (D1–D7) on a scene walk shared with GL (N6a, N6b) 2026-10-24 20:10:24 +02:00