[Shader JIT[ Cache harder

This commit is contained in:
wheremyfoodat 2023-06-07 21:25:46 +03:00
parent 4064abfdeb
commit 6a70edca7e
3 changed files with 19 additions and 1 deletions

View file

@ -3,13 +3,19 @@
#if defined(PANDA3DS_DYNAPICA_SUPPORTED) && defined(PANDA3DS_X64_HOST)
#define PANDA3DS_SHADER_JIT_SUPPORTED
#include <memory>
#include <unordered_map>
#ifdef PANDA3DS_X64_HOST
#include "xbyak/xbyak.h"
using ShaderEmitter = Xbyak::CodeGenerator;
#endif
#endif
class ShaderJIT {
#ifdef PANDA3DS_SHADER_JIT_SUPPORTED
using Hash = PICAShader::Hash;
using ShaderCache = std::unordered_map<Hash, int>;
using ShaderCache = std::unordered_map<Hash, std::unique_ptr<ShaderEmitter>>;
ShaderCache cache;
void compileShader(PICAShader& shaderUnit);