image-regions-v2 branch: layer cache invalidation and sort key
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 42/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp
- Domaine
- computer-graphics, performance
Piste de recherche
Start in engine/render/r_main.cpp, reading IsDirty, ProcessCommands, MakeShapeSortKey, EmitSprite and DispatchGroup around the cited lines on branch feat/image-regions-v2 at commit 1b51acd. Trace how texture completion, viewport and texture IDs, screen size, and sampler setup affect cached layer replay. Done when the four reported cache invalidation, sort key, resize, and texture setup issues are addressed and the affected rendering behavior is verified.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
This is about the WIP branch feat/image-regions-v2 on your fork (at 1b51acd), since issues are turned off there. I read through it and these are the places where I think changes are needed.
Pending textures keep a layer dirty forever. usedIncompleteTextures is only ever set to true (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2373-L2375) and ProcessCommands doesn't reset it (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L748-L758). When an async texture finishes, the command bytes stay the same (same pointer), so the layer isn't reassembled either, and IsDirty() always returns false (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L193-L197). I think that means elision stays off once a layer has drawn a loading texture, and region UVs stay based on the placeholder size, since EmitSprite clamps the size to 1 (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2466-L2468). A texture generation counter that IsDirty() checks would cover both.
Sort key arguments are swapped. MakeShapeSortKey takes (effectTag, effectUser, viewportId, texId) (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2263), but both callers pass texMemo, vpMemo (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2601 and https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2634). With the viewport bits masked out, shapes are sorted by viewport instead of texture.
Screen size isn't in the cache key. screenSize is latched in ProcessCommands (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L751) and used for glViewport, u_screenSize and the scissor flip (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2677-L2680, https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2711-L2713). A layer whose commands stay the same across a resize would replay with the old size.
Cache hits still pay the full texture setup. DispatchGroup sets every sampler uniform and rebinds every unit for each batch (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/1b51acd62a6beac96bdf5c26c3e02e484b68d255/engine/render/r_main.cpp#L2718-L2730). Setting the uniforms once after linking and binding only the used units would make a replay much cheaper.
- Langage dominant
- C++
- Étoiles
- 23
- Forks
- 69
- Merge moyen
- 2 h 50 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
-
Difficulté 4/5 1-2 jours Accessibilité débutants 48/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
Toutes les issues de PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic
Issues similaires
-
enhancement help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
difficulty:easy prio:normal type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
NatronGitHub/openfx-supportext#326 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
zucch1/android-auto-jetson#293 ·
Les mainteneurs répondent en général sous 1 jour
-
lfortran -E exits with status 0 after a C preprocessor error (#error, wrong macro argument count)Ouvertebug low priority preprocessor
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 1 jour
-
difficulty:easy enhancement prio:low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
NatronGitHub/openfx-misc#502 ·
Les mainteneurs répondent en général sous 1 jour