Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 58
    • Issues 58
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 149
    • Merge requests 149
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • KWinKWin
  • Issues
  • #47
Closed
Open
Issue created Jun 20, 2021 by Vlad Zahorodnii@vladzDeveloper

Record GPU render time

The render loop only takes the CPU render time into account at the moment, i.e. how long it takes to record rendering commands.

When gaming, the GPU is moderately loaded so the GPU render time can outnumber the CPU render time. The render loop has to insert timer queries.

The easiest way to implement that is to make the render backend provide the frame timings along the vblank timestamp, i.e.

struct FrameInfo
{
    struct {
        std::chrono::time_point start;
        std::chrono::time_point end;
    } cpu, gpu;

    std::chrono::time_point vblankTimestamp;
};

and the RenderLoop private API must use it

class RenderLoopPrivate
{
public:
    void notifyFrameCompleted(const FrameInfo &frameInfo);
};

Q: Why not just make the RenderJournal insert the timer queries?

A: It's simpler if the render backend provides the frame timings, the render journal doesn't need to wait on any timer queries or handle graphics resets.

Assignee
Assign to
Time tracking