17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 23:16:22 +01:00

perf(gpucull): keep the walks of the submodel trees of the instances from frame to frame and make them again only when the model changes (gfx.gpucull.walkcache)

This commit is contained in:
2026-10-24 01:01:43 +02:00
parent 794ac578de
commit 3e2d292709
10 changed files with 264 additions and 36 deletions

View File

@@ -1547,6 +1547,11 @@ global_settings::ConfigParse_gfx( cParser &Parser, std::string_view const Token
Parser.getTokens(1);
Parser >> gfx_gpucull_bucketrange;
}
else if (Token == "gfx.gpucull.walkcache")
{
Parser.getTokens(1);
Parser >> gfx_gpucull_walkcache;
}
else if (Token == "gfx.depthprepass.scene")
{
Parser.getTokens(1);
@@ -2124,6 +2129,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "gfx.gpucull.sleepers", gfx_gpucull_sleepers );
export_as_text( Output, "gfx.gpucull.models", gfx_gpucull_models );
export_as_text( Output, "gfx.gpucull.bucketrange", gfx_gpucull_bucketrange );
export_as_text( Output, "gfx.gpucull.walkcache", gfx_gpucull_walkcache );
export_as_text( Output, "gfx.depthprepass.scene", gfx_depthprepass_scene );
export_as_text( Output, "gfx.depthprepass.replay", gfx_depthprepass_replay );
export_as_text( Output, "gfx.grass", gfx_grass );

View File

@@ -323,6 +323,10 @@ struct global_settings {
// the submodels of their model) are left out of a pass before the culling, the gpu one included, which would leave out
// each of their instances anyway
bool gfx_gpucull_bucketrange = true;
// the walks of the submodel trees which record the draws of the instances culled on the gpu are kept from frame to frame and
// made again only when the model changes: the trees of animated models, ones lit by the luminance and the models drawn on their
// own are walked every time
bool gfx_gpucull_walkcache = true;
// (opengl 4.6) the depth of the whole opaque scene of the main view is drawn before its colour, the instances included
bool gfx_depthprepass_scene = false;
// (opengl 4.6) the depth pass of the scene (gfx_depthprepass_scene, or the one of the contact shadows) walks the scene for