vsync_test | completely stupid amount of man hours

 by   bplu4t2f C Version: Current License: No License

kandi X-RAY | vsync_test Summary

kandi X-RAY | vsync_test Summary

vsync_test is a C library. vsync_test has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

OK I have spent a completely stupid amount of man hours making an extremely simple program -- drawing a single triangle that follows the mouse cursor with minimal input lag, and with vsync, perfectly smooth. I am confident I have found at least one pretty serious (at least in my opinion) bug in DWM (or two bugs that are somewhat connected -- I will be describing only one of them here). When you alt+tab out of a windowed application (there are possibly other triggers too), there's a chance that DWM (or something related to DWM) falls out of sync with either the presentation of the application's frames, or with the underlying hardware layer. It seems to be connected to the number of other windows that are open (speculation: it has to do with the time it takes to compose that alt+tab screen). On one of 3 machines I needed a substantial amount of other windows (>30), on another just having visual studio open was enough. When The Bug happens, the application will have 1 additional frame of input lag (regardless of OpenGL/D3D, how many buffers are used, whether the flip presentation model is used, whether DISCARD or SEQUENTIAL is used). This is because DWM will first drop a frame, and then queue one frame too much. It is the same symptom as if your application has at least 2 back buffers, and doesn't wait after presenting each frame and before processing input for the next frame using DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT (or an equivalent approach using DwmFlush), however this time it is not your application's swap chain that is clogged. Frame timings in the application may be completely normal -- the problem is in the underlying DWM. The application can sometimes resynchronize (and thereby fix The Bug until the next time it chooses to occur) by intentionally dropping a single frame, so that DWM cannot queue another frame exactly once, which will cause the additional frame it had queued up to be flushed. If the attempt was successful, input lag will be normal again. It will look like simulation ran twice as fast for exactly one frame, but no frame is actually dropped as far as visible frame rate is concerned. It is also possible to drop more than one frame, which will increase the chance of success (somehow it doesn't always work), however that will cause visible stutter. Additionally, it is possible that this method is unable to fix The Bug, although I was only able to reproduce this on one of the 3 machines (I wasn't trying very hard though) -- it just so happened that a youtube video was playing in the background. If The Bug occured while it was playing, it was impossible to undo The Bug even with more extreme methods such as reinitializing D3D, recreating the window, or restarting the entire process. Only when the video was paused, or the containing window minimized, it was possible to undo The Bug using the method described above.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              vsync_test has a low active ecosystem.
              It has 2 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              vsync_test has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of vsync_test is current.

            kandi-Quality Quality

              vsync_test has no bugs reported.

            kandi-Security Security

              vsync_test has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              vsync_test does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              vsync_test releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vsync_test
            Get all kandi verified functions for this library.

            vsync_test Key Features

            No Key Features are available at this moment for vsync_test.

            vsync_test Examples and Code Snippets

            No Code Snippets are available at this moment for vsync_test.

            Community Discussions

            No Community Discussions are available at this moment for vsync_test.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install vsync_test

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/bplu4t2f/vsync_test.git

          • CLI

            gh repo clone bplu4t2f/vsync_test

          • sshUrl

            git@github.com:bplu4t2f/vsync_test.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link