protonscr

Structure of the DXVK shader cache file

dxvkclosed
doitsujin/dxvk#2411 · opened 2021-12-23 by FleetAdmiralButter · updated 2022-03-28 · 1 comments · github
FFleetAdmiralButter 2021-12-23 github

Hi,

First of all, I apologise if I'm asking about this in the wrong place.

I'm coming over from https://github.com/rphsoftware/dxvk-state-cache-merging-tool/issues/1 and I've been trying to figure out how the DXVK shader cache file is structured in order to get that project working again.

From what I can see, the file has a header made up of the following:

magic number (4 bytes) + version (4 bytes) + entry length (4 bytes) + number of entries (4 bytes)

So, as an example, the following file header decodes to "DXVK", version 10, entry length of 0, and entry count of 48913 (please correct me if I'm wrong).

4458 564b 0a00 0000 0000 0000 11bf 0000

On old versions of the DXVK state cache file, the entry length was set to 1888 bytes - but on newer versions it is set to 0 bytes.

Is there any documentation or commit you can point me to that explains this change (I believe DXVK 1.4.x moved to this new format) or explains the format of the file header in more detail?

Thanks!

DDadSchoorse 2022-03-28 github

See #2527

Nothing extracted yet.