Skip to content

Commit

Permalink
removed lfs usage & added some fixes
Browse files Browse the repository at this point in the history
-stored pck files in single compressed file
-fixed gw2 hiend config
-updated license file
-removed not used code
  • Loading branch information
megai2 committed Aug 27, 2019
1 parent fa8a35f commit 5167849
Show file tree
Hide file tree
Showing 40 changed files with 1,416 additions and 287 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.c diff
*.cpp diff
*.h diff
*.pck filter=lfs diff=lfs merge=lfs -text
*.h diff
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,8 @@ bin/d912pxy/log.txt
bin/d912pxy/crash*.txt
bin/renderdoc.lnk
bin/d912pxy/dx12_perf_graph.html
bin/d912pxy/dx12_perf_graph.png
bin/d912pxy/dx9_perf_graph.png
bin/d912pxy/dx9_perf_graph.html
bin/d912pxy/installed.flag
bin/d912pxy_installer_backup._ll
16 changes: 16 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

MIT License

Copyright (c) 2018-2019 megai2
Copyright (c) 2017 Sean Barrett
Copyright (c) 2015-2018 Baldur Karlsson
Copyright (c) 2018 Jeremiah van Oosten
Copyright (C) 2007-2005 Ariya Hidayat (ariya@kde.org)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,3 +24,14 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Uses:

stb single-file public domain libraries for C/C++ https://github.com/nothings/stb
Proxy d3d9 library https://github.com/iorlas/D3D9Proxy
StackWalker https://github.com/JochenKalmbach/StackWalker
P7 http://baical.net/p7.html
LearningDirectX12 https://github.com/jpvanoosten/LearningDirectX12/
RenderDoc https://github.com/baldurk/renderdoc
fastlz https://github.com/ariya/fastlz
Binary file modified bin/d912pxy/gw2_hiend_config.ini
Binary file not shown.
16 changes: 15 additions & 1 deletion bin/d912pxy/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ WARNING: if you downloaded this software from web sources, other than github, yo
MIT License

Copyright (c) 2018-2019 megai2
Copyright (c) 2017 Sean Barrett
Copyright (c) 2015-2018 Baldur Karlsson
Copyright (c) 2018 Jeremiah van Oosten
Copyright (C) 2007-2005 Ariya Hidayat (ariya@kde.org)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,4 +32,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

########################################################
########################################################

Uses:

stb https://github.com/nothings/stb
Proxy d3d9 library https://github.com/iorlas/D3D9Proxy
StackWalker https://github.com/JochenKalmbach/StackWalker
P7 http://baical.net/p7.html
LearningDirectX12 https://github.com/jpvanoosten/LearningDirectX12/
RenderDoc https://github.com/baldurk/renderdoc
FastLZ https://github.com/ariya/fastlz
Binary file removed bin/d912pxy/pck/derived_cso_ps.pck
Binary file not shown.
Binary file removed bin/d912pxy/pck/derived_cso_vs.pck
Binary file not shown.
1 change: 0 additions & 1 deletion bin/d912pxy/pck/do_not_delete.txt

This file was deleted.

Binary file removed bin/d912pxy/pck/pso_cache.pck
Binary file not shown.
Binary file removed bin/d912pxy/pck/pso_precompile.pck
Binary file not shown.
Binary file removed bin/d912pxy/pck/shader_cso.pck
Binary file not shown.
Binary file removed bin/d912pxy/pck/shader_profiles.pck
Binary file not shown.
Binary file removed bin/d912pxy/pck/shader_sources.pck
Binary file not shown.
Binary file added bin/d912pxy/pck/vfs_archive.zpck
Binary file not shown.
3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/derived_cso_ps.pck

This file was deleted.

3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/derived_cso_vs.pck

This file was deleted.

3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/pso_cache.pck

This file was deleted.

3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/pso_precompile.pck

This file was deleted.

3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/shader_cso.pck

This file was deleted.

3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/shader_profiles.pck

This file was deleted.

3 changes: 0 additions & 3 deletions bin/d912pxy/pck_bns/shader_sources.pck

This file was deleted.

Binary file added bin/d912pxy/pck_bns/vfs_archive.zpck
Binary file not shown.
4 changes: 4 additions & 0 deletions d912pxy/d912pxy.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@
<ItemGroup>
<ClInclude Include="..\thirdparty\D3D9Proxy\d3d9.h" />
<ClInclude Include="..\thirdparty\D3D9Proxy\d3dx9.h" />
<ClInclude Include="..\thirdparty\fastlz\fastlz.h" />
<ClInclude Include="..\thirdparty\renderdoc_app.h" />
<ClInclude Include="..\thirdparty\StackWalker\StackWalker.h" />
<ClInclude Include="d3d9_proxy_dll.h" />
Expand Down Expand Up @@ -368,6 +369,7 @@
<ClInclude Include="d912pxy_upload_pool.h" />
<ClInclude Include="d912pxy_vdecl.h" />
<ClInclude Include="d912pxy_vfs.h" />
<ClInclude Include="d912pxy_vfs_packer.h" />
<ClInclude Include="d912pxy_vstream.h" />
<ClInclude Include="d912pxy_vstream_pool.h" />
<ClInclude Include="d912pxy_vtexture.h" />
Expand All @@ -382,6 +384,7 @@
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\thirdparty\fastlz\fastlz.cpp" />
<ClCompile Include="..\thirdparty\StackWalker\StackWalker.cpp" />
<ClCompile Include="d3d9_proxy_dll.cpp" />
<ClCompile Include="d912pxy_async_upload_thread.cpp" />
Expand Down Expand Up @@ -458,6 +461,7 @@
<ClCompile Include="d912pxy_upload_pool.cpp" />
<ClCompile Include="d912pxy_vdecl.cpp" />
<ClCompile Include="d912pxy_vfs.cpp" />
<ClCompile Include="d912pxy_vfs_packer.cpp" />
<ClCompile Include="d912pxy_vstream.cpp" />
<ClCompile Include="d912pxy_vstream_pool.cpp" />
<ClCompile Include="d912pxy_vtexture.cpp" />
Expand Down
12 changes: 12 additions & 0 deletions d912pxy/d912pxy.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@
<ClCompile Include="d912pxy_com_route_overhead_tracked.cpp">
<Filter>d3d9_proxy\com\routing</Filter>
</ClCompile>
<ClCompile Include="d912pxy_vfs_packer.cpp">
<Filter>base\vfs</Filter>
</ClCompile>
<ClCompile Include="..\thirdparty\fastlz\fastlz.cpp">
<Filter>base\utils\3rd_party</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
Expand Down Expand Up @@ -486,6 +492,12 @@
<ClInclude Include="d912pxy_replay_base.h">
<Filter>d3d9_impl\device\iframe\replay</Filter>
</ClInclude>
<ClInclude Include="d912pxy_vfs_packer.h">
<Filter>base\vfs</Filter>
</ClInclude>
<ClInclude Include="..\thirdparty\fastlz\fastlz.h">
<Filter>base\utils\3rd_party</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="deffile" />
Expand Down
4 changes: 3 additions & 1 deletion d912pxy/d912pxy_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ typedef enum d912pxy_config_value {
PXY_CFG_COMPAT_DUP_UNSAFE,
PXY_CFG_VFS_ROOT,
PXY_CFG_VFS_MEMCACHE_MASK,
PXY_CFG_VFS_PACK_DATA,
PXY_CFG_CNT
} d912pxy_config_value;

Expand Down Expand Up @@ -145,7 +146,8 @@ class d912pxy_config
{L"compat",L"track_rs",L"0"},//PXY_CFG_COMPAT_TRACK_RS
{L"compat",L"unsafe_dup",L"0"},//PXY_CFG_COMPAT_DUP_UNSAFE
{L"vfs", L"root", L"./d912pxy/pck"},//PXY_CFG_VFS_ROOT
{L"vfs", L"memcache_mask", L"6F"}//PXY_CFG_VFS_MEMCACHE_MASK
{L"vfs", L"memcache_mask", L"6F"},//PXY_CFG_VFS_MEMCACHE_MASK
{L"vfs", L"pack_data", L"0"}//PXY_CFG_VFS_PACK_DATA
};

};
Expand Down
2 changes: 1 addition & 1 deletion d912pxy/d912pxy_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class d912pxy_device: public d912pxy_vtable, public d912pxy_comhandler

void CopyOriginalDX9Data(IDirect3DDevice9* dev, D3DDEVICE_CREATION_PARAMETERS* origPars, D3DPRESENT_PARAMETERS* origPP);
void InitVFS();
void InitVFSitem(UINT id, const char* name, UINT64 memCache);
void InitVFSitem(d912pxy_vfs_id_name* id, UINT64 memCache);

void InitClassFields();
void InitThreadSyncObjects();
Expand Down
39 changes: 29 additions & 10 deletions d912pxy/d912pxy_device_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,39 @@ void d912pxy_device::InitVFS()

UINT64 memcacheMask = d912pxy_s.config.GetValueXI64(PXY_CFG_VFS_MEMCACHE_MASK);

InitVFSitem(PXY_VFS_BID_CSO, "shader_cso", memcacheMask);
InitVFSitem(PXY_VFS_BID_SHADER_PROFILE, "shader_profiles", memcacheMask);
InitVFSitem(PXY_VFS_BID_PSO_CACHE_KEYS, "pso_cache", memcacheMask);
InitVFSitem(PXY_VFS_BID_PSO_PRECOMPILE_LIST, "pso_precompile", memcacheMask);
InitVFSitem(PXY_VFS_BID_SHADER_SOURCES, "shader_sources", memcacheMask);
InitVFSitem(PXY_VFS_BID_DERIVED_CSO_VS, "derived_cso_vs", memcacheMask);
InitVFSitem(PXY_VFS_BID_DERIVED_CSO_PS, "derived_cso_ps", memcacheMask);
d912pxy_vfs_id_name vfsNames[] = {
{PXY_VFS_BID_CSO, "shader_cso"},
{PXY_VFS_BID_SHADER_PROFILE, "shader_profiles"},
{PXY_VFS_BID_PSO_CACHE_KEYS, "pso_cache"},
{PXY_VFS_BID_PSO_PRECOMPILE_LIST, "pso_precompile"},
{PXY_VFS_BID_SHADER_SOURCES, "shader_sources"},
{PXY_VFS_BID_DERIVED_CSO_VS, "derived_cso_vs"},
{PXY_VFS_BID_DERIVED_CSO_PS, "derived_cso_ps"},
{0, 0}
};

d912pxy_vfs_packer* packer = new d912pxy_vfs_packer(d912pxy_s.config.GetValueRaw(PXY_CFG_VFS_ROOT), vfsNames);

if (d912pxy_s.config.GetValueUI32(PXY_CFG_VFS_PACK_DATA))
{
packer->PackArchive(d912pxy_vfs_pack_file);
}
else if (packer->IsUnpackNeeded())
{
packer->UnpackArchive(d912pxy_vfs_pack_file);
}

delete packer;

for (int i = 0; i != PXY_VFS_BID_END; ++i)
InitVFSitem(&vfsNames[i], memcacheMask);
}

void d912pxy_device::InitVFSitem(UINT id, const char* name, UINT64 memCache)
void d912pxy_device::InitVFSitem(d912pxy_vfs_id_name* id, UINT64 memCache)
{
if (!d912pxy_s.vfs.LoadVFS(id, name, ((1ULL << id) & memCache)) != 0ULL)
if (!d912pxy_s.vfs.LoadVFS(id, ((1ULL << id->num) & memCache)) != 0ULL)
{
LOG_ERR_DTDM("%S VFS not loaded", name);
LOG_ERR_DTDM("%S VFS not loaded", id->name);
LOG_ERR_THROW2(-1, "VFS error");
}
}
Expand Down
1 change: 1 addition & 0 deletions d912pxy/d912pxy_fwdecl.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ SOFTWARE.
#define d912pxy_cs_cso_dir "cs/cso"
#define d912pxy_shader_db_hlsl_dir L"./d912pxy/shaders/hlsl"
#define d912pxy_vfs_lock_file "./d912pxy/pck/pid.lock"
#define d912pxy_vfs_pack_file "vfs_archive"
#define d912pxy_shader_db_hlsl_custom_dir L"./d912pxy/shaders/hlsl/custom"
#define d912pxy_shader_db_cso_dir "shaders/cso"
#define d912pxy_shader_db_bugs_dir "shaders/bugs"
Expand Down
2 changes: 0 additions & 2 deletions d912pxy/d912pxy_performance_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ SOFTWARE.
*/
#include "stdafx.h"

#include "../thirdparty/font.c"

d912pxy_performance_graph::d912pxy_performance_graph(UINT isDX9)
{
dx9 = isDX9;
Expand Down
Loading

0 comments on commit 5167849

Please sign in to comment.