build: Do not rebuild shaders when HLSLC is not found.
[vkmodelviewer.git] / Core / GpuTimeManager.h
blobb25375f6c3be1072ad695bdf414953e43a4cc53e
1 //
2 // Copyright (c) Microsoft. All rights reserved.
3 // This code is licensed under the MIT License (MIT).
4 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
5 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
6 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
7 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
8 //
9 // Developed by Minigraph
11 // Author: James Stanard
14 #pragma once
16 #include "GameCore.h"
18 class CommandContext;
20 namespace GpuTimeManager
22 void Initialize( uint32_t MaxNumTimers = 4096 );
23 void Shutdown();
25 // Reserve a unique timer index
26 uint32_t NewTimer(void);
28 // Write start and stop time stamps on the GPU timeline
29 void StartTimer(CommandContext& Context, uint32_t TimerIdx);
30 void StopTimer(CommandContext& Context, uint32_t TimerIdx);
32 // Bookend all calls to GetTime() with Begin/End which correspond to Map/Unmap. This
33 // needs to happen either at the very start or very end of a frame.
34 void BeginReadBack(void);
35 void EndReadBack(void);
37 // Returns the time in milliseconds between start and stop queries
38 float GetTime(uint32_t TimerIdx);