[ShaderJIT] Add const qualifier to JIT callbacks

This commit is contained in:
wheremyfoodat 2023-06-08 22:44:57 +03:00
parent 77cba3110d
commit 46a47912d8
2 changed files with 28 additions and 2 deletions

View file

@ -35,9 +35,9 @@ class ShaderEmitter : public Xbyak::CodeGenerator {
void scanForCalls(const PICAShader& shader);
public:
using InstructionCallback = void(*)(PICAShader& shaderUnit); // Callback type used for instructions
using InstructionCallback = const void(*)(PICAShader& shaderUnit); // Callback type used for instructions
// Callback type used for the JIT prologue. This is what the caller will call
using PrologueCallback = void(*)(PICAShader& shaderUnit, InstructionCallback cb);
using PrologueCallback = const void(*)(PICAShader& shaderUnit, InstructionCallback cb);
PrologueCallback prologueCb;
// Initialize our emitter with "allocSize" bytes of RWX memory