Add protocol -> version mapping table.

This commit is contained in:
Bartosz Taudul 2022-07-13 00:44:02 +02:00
parent 0624c592e3
commit b70321fe6a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
4 changed files with 54 additions and 0 deletions

View File

@ -127,6 +127,7 @@
<ClCompile Include="..\..\..\server\TracyMmap.cpp" /> <ClCompile Include="..\..\..\server\TracyMmap.cpp" />
<ClCompile Include="..\..\..\server\TracyMouse.cpp" /> <ClCompile Include="..\..\..\server\TracyMouse.cpp" />
<ClCompile Include="..\..\..\server\TracyPrint.cpp" /> <ClCompile Include="..\..\..\server\TracyPrint.cpp" />
<ClCompile Include="..\..\..\server\TracyProtoHistory.cpp" />
<ClCompile Include="..\..\..\server\TracySourceContents.cpp" /> <ClCompile Include="..\..\..\server\TracySourceContents.cpp" />
<ClCompile Include="..\..\..\server\TracySourceTokenizer.cpp" /> <ClCompile Include="..\..\..\server\TracySourceTokenizer.cpp" />
<ClCompile Include="..\..\..\server\TracySourceView.cpp" /> <ClCompile Include="..\..\..\server\TracySourceView.cpp" />
@ -244,6 +245,7 @@
<ClInclude Include="..\..\..\server\TracyMouse.hpp" /> <ClInclude Include="..\..\..\server\TracyMouse.hpp" />
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp" /> <ClInclude Include="..\..\..\server\TracyPopcnt.hpp" />
<ClInclude Include="..\..\..\server\TracyPrint.hpp" /> <ClInclude Include="..\..\..\server\TracyPrint.hpp" />
<ClInclude Include="..\..\..\server\TracyProtoHistory.hpp" />
<ClInclude Include="..\..\..\server\TracyShortPtr.hpp" /> <ClInclude Include="..\..\..\server\TracyShortPtr.hpp" />
<ClInclude Include="..\..\..\server\TracySlab.hpp" /> <ClInclude Include="..\..\..\server\TracySlab.hpp" />
<ClInclude Include="..\..\..\server\TracySort.hpp" /> <ClInclude Include="..\..\..\server\TracySort.hpp" />

View File

@ -324,6 +324,9 @@
<ClCompile Include="..\..\..\server\TracyView_Ranges.cpp"> <ClCompile Include="..\..\..\server\TracyView_Ranges.cpp">
<Filter>server</Filter> <Filter>server</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\..\server\TracyProtoHistory.cpp">
<Filter>server</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\common\tracy_lz4.hpp"> <ClInclude Include="..\..\..\common\tracy_lz4.hpp">
@ -656,6 +659,9 @@
<ClInclude Include="..\..\..\server\tracy_xxhash.h"> <ClInclude Include="..\..\..\server\tracy_xxhash.h">
<Filter>server</Filter> <Filter>server</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\..\server\TracyProtoHistory.hpp">
<Filter>server</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Natvis Include="DebugVis.natvis" /> <Natvis Include="DebugVis.natvis" />

View File

@ -0,0 +1,26 @@
#include "TracyFileHeader.hpp"
#include "TracyProtoHistory.hpp"
namespace tracy
{
constexpr ProtocolHistory_t ProtocolHistoryArr[] = {
{ 57, FileVersion( 0, 8, 2 ) },
{ 56, FileVersion( 0, 8, 1 ) },
{ 55, FileVersion( 0, 8, 0 ) },
{ 46, FileVersion( 0, 7, 6 ), FileVersion( 0, 7, 8 ) },
{ 44, FileVersion( 0, 7, 5 ) },
{ 42, FileVersion( 0, 7, 3 ), FileVersion( 0, 7, 4 ) },
{ 40, FileVersion( 0, 7, 1 ), FileVersion( 0, 7, 2 ) },
{ 35, FileVersion( 0, 7, 0 ) },
{ 25, FileVersion( 0, 6, 2 ), FileVersion( 0, 6, 3 ) },
{ 24, FileVersion( 0, 6, 1 ) },
{ 23, FileVersion( 0, 6, 0 ) },
{ 14, FileVersion( 0, 5, 0 ) },
{ 1, FileVersion( 0, 4, 1 ) },
{}
};
const ProtocolHistory_t* ProtocolHistory = ProtocolHistoryArr;
}

View File

@ -0,0 +1,20 @@
#ifndef __TRACYPROTOHISTORY_HPP__
#define __TRACYPROTOHISTORY_HPP__
#include <stdint.h>
namespace tracy
{
struct ProtocolHistory_t
{
uint32_t protocol;
uint32_t minVer;
uint32_t maxVer;
};
extern const ProtocolHistory_t* ProtocolHistory;
}
#endif