mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +01:00
[dxvk] Use new shader lookup hash in pipeline manager
This commit is contained in:
parent
5115a42b08
commit
ba5f319809
@ -12,15 +12,18 @@ namespace dxvk {
|
||||
|
||||
size_t DxvkPipelineKeyHash::operator () (const DxvkGraphicsPipelineShaders& key) const {
|
||||
DxvkHashState state;
|
||||
|
||||
std::hash<DxvkShader*> hash;
|
||||
state.add(hash(key.vs.ptr()));
|
||||
state.add(hash(key.tcs.ptr()));
|
||||
state.add(hash(key.tes.ptr()));
|
||||
state.add(hash(key.gs.ptr()));
|
||||
state.add(hash(key.fs.ptr()));
|
||||
state.add(getShaderHash(key.vs));
|
||||
state.add(getShaderHash(key.tcs));
|
||||
state.add(getShaderHash(key.tes));
|
||||
state.add(getShaderHash(key.gs));
|
||||
state.add(getShaderHash(key.fs));
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
size_t DxvkPipelineKeyHash::getShaderHash(const Rc<DxvkShader>& shader) {
|
||||
return shader != nullptr ? shader->getHash() : 0;
|
||||
}
|
||||
|
||||
|
||||
bool DxvkPipelineKeyEq::operator () (
|
||||
|
@ -26,6 +26,7 @@ namespace dxvk {
|
||||
struct DxvkPipelineKeyHash {
|
||||
size_t operator () (const DxvkComputePipelineShaders& key) const;
|
||||
size_t operator () (const DxvkGraphicsPipelineShaders& key) const;
|
||||
static size_t getShaderHash(const Rc<DxvkShader>& shader);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user