mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Expose key-based lookup hash in DxvkShader
This commit is contained in:
parent
54ff7bf769
commit
5115a42b08
@ -223,6 +223,7 @@ namespace dxvk {
|
|||||||
*/
|
*/
|
||||||
void setShaderKey(const DxvkShaderKey& key) {
|
void setShaderKey(const DxvkShaderKey& key) {
|
||||||
m_key = key;
|
m_key = key;
|
||||||
|
m_hash = key.hash();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -232,6 +233,18 @@ namespace dxvk {
|
|||||||
DxvkShaderKey getShaderKey() const {
|
DxvkShaderKey getShaderKey() const {
|
||||||
return m_key;
|
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
|
* \brief Retrieves debug name
|
||||||
@ -252,6 +265,7 @@ namespace dxvk {
|
|||||||
DxvkShaderOptions m_options;
|
DxvkShaderOptions m_options;
|
||||||
DxvkShaderConstData m_constData;
|
DxvkShaderConstData m_constData;
|
||||||
DxvkShaderKey m_key;
|
DxvkShaderKey m_key;
|
||||||
|
size_t m_hash = 0;
|
||||||
|
|
||||||
std::vector<spv::Capability> m_capabilities;
|
std::vector<spv::Capability> m_capabilities;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user