DX12 Dx12 - timestamp queries

Recommended Posts

Hi all,

Any idea what the mechanism is for timing commands in the GPU command buffer in DX12 now? In DX11 it was BeginDisjoint, End's, EndDisjoint, GetData's. But in DX12, I see I can place EndQuery with a timestamp type, and I also see GetTimestampFrequency to get the frequency, but how do I get the tick value for each of the timestamp EndQuery's? I see ResolveQueryData, but that places the data in a GPU buffer, am I supposed to call that and then copy the data over? If so what is the format of that data? Unfortunately, I have yet to see a sample for timestamp queries yet. 

Thanks!

Share this post


Link to post
Share on other sites

Yep, you're totally on the right track. The ResolveQueryData takes data from the query heap, which can be in a hardware-dependent format, and puts it in a buffer, one which is probably CPU-accessible, in the canonical format. Once the resolve operation is complete, you can read the contents of the buffer to get your timestamps.

Resolve can handle data from multiple query heap entries, and the output is one UINT64 per resolved timestamp, just like D3D11's GetData.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Forum Statistics

    • Total Topics
      628707
    • Total Posts
      2984310
  • Similar Content

    • By NexusDivision
      Hello people of gamedev.net

      Me and my team have been working on a MMORPG game with Unreal Engine 4 for quite some time now.
      We are seeking beta tester's and have beta key's available to people who sign up on our website.
      Please visit the website https://nexusdivision.com
      Feel free to register on our forums, We can talk about the game and help everyone get a better idea of what type of game it is. 

      Legion is a 3D fantasy MMORPG that has features including massive scale battles, unique characters and monsters, customization of avatars, special equipment and more. Players choose between the starter stats of Warrior, Magician, Archer and character advancement occurs through a mix of questing, PvP, Guild Wars, and hunting, depending upon player preference. In Legion, completely open PvP battles take place between members of the two warring factions.

      We plan to make this game very competitive and exciting 
    • By Matuda
      Hello!
      Trying to create a physics puzzle game in my "free" time.
      So far it's going very steady, but slow.
      Hope to get some feedback from you!



      Area 86 is a physics-based game, that lets you control a robot at a secret place in space.
      From simple item moving to custom imagined solutions with item picking, throwing, combining and activating!
      Explore & examine all possibilities each place has to offer and do your best to get further.
      But remember, each action has consequences and thus could break or make something unexpected.


      Quick overlook of main features:
      Physics-based gameplay with no bugs or whatsoever Tasks that give you more clue on how to do things wrong Controllable robot who can be blamed for all consequences Includes more than 1 level and each level contains less than 12 possible tasks to complete [ not in free version ] Secret places and hidden objects for extra challenge  
      What can you find in the free downloadable version:
      One fully completable level with 6 tasks and 2 hidden special items to discover.
      From the task list, 2 are main tasks which you should complete to get further and then there are 4 other tasks that should challenge your thinking.
      One of the secret items is visible instant, but you need to figure out how to collect it, while the other special item is hiding.
      Another extra feature is visual hints, that should force your thinking of discovering features.

      Download playable version for your system:

          



    • By mister345
      Hi, I'm building a game engine using DirectX11 in c++.
      I need a basic physics engine to handle collisions and motion, and no time to write my own.
      What is the easiest solution for this? Bullet and PhysX both seem too complicated and would still require writing my own wrapper classes, it seems. 
      I found this thing called PAL - physics abstraction layer that can support bullet, physx, etc, but it's so old and no info on how to download or install it.
      The simpler the better. Please let me know, thanks!
    • By DaddyEso
      Hello there, I am a former player in the small, but dedicated community for the long dead MMO game Wind Slayer.

      I have been looking to play the game for 7 years, and just assumed that someone else would come along and create a private server. Since I've been waiting about 4 years since the last time I heard any discussion about a private server, I figured I'd have to do this myself.

      I have all of the game's files, I am looking for a team who would be willing to develop a private server. Already checked on the status of the game's IP and the developer (Hamelin) is a dead company, also; none of the former publishers (Outspark, and Ignited) exist either. So copyright concerns won't be an issue since the game isn't owned by any companies as of today.

      Link to the game's files for anyone who's interested: http://download.cnet.com/Windslayer/3000-7540_4-10857324.html

      (@Mods, I accidentally posted this before in the wrong section. Which is the reason for the double post.
      My apologies)

    • By EvaBalikova
      One of the hamster-powered bosses we created for our fishbowl-powered medieval robots game Feudal Alloy.
       More info: WEB
      twitter
      facebook
       
       
       
  • Popular Now