1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 01:24:11 +01:00

[dxvk] Expose key-based lookup hash in DxvkShader

This commit is contained in:
Philip Rebohle 2019-09-30 02:08:09 +02:00
parent 54ff7bf769
commit 5115a42b08

View File

@ -223,6 +223,7 @@ namespace dxvk {
*/
void setShaderKey(const DxvkShaderKey& key) {
m_key = key;
m_hash = key.hash();
}
/**
@ -233,6 +234,18 @@ namespace dxvk {
return m_key;
}
/**
* \brief Get lookup hash
*
* Retrieves a non-unique hash value derived from the
* shader key which can be used to perform lookups.
* This is better than relying on the pointer value.
* \returns Hash value for map lookups
*/
size_t getHash() const {
return m_hash;
}
/**
* \brief Retrieves debug name
* \returns The shader's name
@ -252,6 +265,7 @@ namespace dxvk {
DxvkShaderOptions m_options;
DxvkShaderConstData m_constData;
DxvkShaderKey m_key;
size_t m_hash = 0;
std::vector<spv::Capability> m_capabilities;