17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 05:49:13 +01:00

Walk the shadow passes and the culled model groups on worker threads in the Vulkan renderer

This commit is contained in:
2026-10-27 20:56:11 +01:00
parent c44b243698
commit 1447dcf075
55 changed files with 4114 additions and 427 deletions

View File

@@ -1830,6 +1830,26 @@ global_settings::ConfigParse_gfx( cParser &Parser, std::string_view const Token
Parser >> gfx_threads;
gfx_threads = std::clamp(gfx_threads, 0, 64);
}
else if (Token == "gfx.vulkan.asyncresources")
{
Parser.getTokens(1);
Parser >> gfx_vulkan_asyncresources;
}
else if (Token == "gfx.vulkan.parallelpasses")
{
Parser.getTokens(1);
Parser >> gfx_vulkan_parallelpasses;
}
else if (Token == "gfx.vulkan.parallelmodels")
{
Parser.getTokens(1);
Parser >> gfx_vulkan_parallelmodels;
}
else if (Token == "gfx.vulkan.asynccompute")
{
Parser.getTokens(1);
Parser >> gfx_vulkan_asynccompute;
}
else if (ConfigParse_gfx_sky(Parser, Token))
{
@@ -2362,6 +2382,10 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "gfx.vulkan.framesinflight", gfx_vulkan_framesinflight );
export_as_text( Output, "gfx.vulkan.renderthread", gfx_vulkan_renderthread );
export_as_text( Output, "gfx.threads", gfx_threads );
export_as_text( Output, "gfx.vulkan.asyncresources", gfx_vulkan_asyncresources );
export_as_text( Output, "gfx.vulkan.parallelpasses", gfx_vulkan_parallelpasses );
export_as_text( Output, "gfx.vulkan.parallelmodels", gfx_vulkan_parallelmodels );
export_as_text( Output, "gfx.vulkan.asynccompute", gfx_vulkan_asynccompute );
export_as_text( Output, "gfx.shadow.angle.min", gfx_shadow_angle_min );
export_as_text( Output, "gfx.shadow.rank.cutoff", gfx_shadow_rank_cutoff );
export_as_text( Output, "gfx.shadow.sdsm", gfx_shadow_sdsm );

View File

@@ -425,6 +425,17 @@ struct global_settings {
bool gfx_vulkan_renderthread { true };
// threads recording the command buffers of the vulkan renderer; 0: the cores less two, 1: one thread records them all
int gfx_threads { 0 };
// (vulkan) the pipelines and the textures a draw needs first made by the background threads, the draw left out till then (the
// cab waits for them); the pipelines of the last session made ahead at the start
bool gfx_vulkan_asyncresources { true };
// (vulkan) the cascades of the sun shadows and the shadow maps of the lamps and the headlights walked by threads of their own while
// the main thread walks the colour pass
bool gfx_vulkan_parallelpasses { true };
// (vulkan) the submodel trees of the instances culled on the gpu walked by the threads of gfx.threads, model by model
bool gfx_vulkan_parallelmodels { true };
// (vulkan) the passes of the sky and the weather run on the compute queue, at the same time as the sun shadows, where the gpu has a
// compute family of its own; off until a measurement on such a gpu shows what it gains
bool gfx_vulkan_asynccompute { false };
bool vr = false;
std::string vr_backend;