mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-18 09:43:58 +12:00
[Shader JIT] Add caching
This commit is contained in:
parent
364443d66f
commit
4064abfdeb
9 changed files with 77 additions and 5 deletions
src/core/PICA/dynapica
|
@ -1,7 +1,14 @@
|
|||
#include "PICA/dynapica/shader_rec.hpp"
|
||||
#include "cityhash.hpp"
|
||||
|
||||
#ifdef PANDA3DS_SHADER_JIT_SUPPORTED
|
||||
void ShaderJIT::reset() {
|
||||
cache.clear();
|
||||
}
|
||||
|
||||
void ShaderJIT::prepare(PICAShader& shaderUnit) {
|
||||
printf("HAPPY HAPPY HAPPY\n");
|
||||
// We construct a shader hash from both the code and operand descriptor hashes
|
||||
// This is so that if only one of them changes, we still properly recompile the shader
|
||||
Hash hash = shaderUnit.getCodeHash() ^ shaderUnit.getOpdescHash();
|
||||
}
|
||||
#endif // PANDA3DS_SHADER_JIT_SUPPORTED
|
Loading…
Add table
Add a link
Reference in a new issue