From 84fd0affa89b0677bb09e0fb3442266f1e192f50 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Thu, 29 Jun 2023 21:37:31 +0300 Subject: [PATCH] [GL renderer] Fix up float * vec4 mul --- include/PICA/dynapica/shader_rec_emitter_x64.hpp | 4 ++-- src/core/renderer_gl/renderer_gl.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/PICA/dynapica/shader_rec_emitter_x64.hpp b/include/PICA/dynapica/shader_rec_emitter_x64.hpp index 4b26b80c..61b5e37d 100644 --- a/include/PICA/dynapica/shader_rec_emitter_x64.hpp +++ b/include/PICA/dynapica/shader_rec_emitter_x64.hpp @@ -65,8 +65,8 @@ class ShaderEmitter : public Xbyak::CodeGenerator { // Result is returned in the zero flag. If the comparison is true then zero == 0, else zero == 1 (Opposite of checkCmpRegister) void checkBoolUniform(const PICAShader& shader, u32 instruction); - // Emit a call to a C++ function - void callCppFunc(void* function) { Helpers::panic("[ShaderJIT] Unimplemented: Add support for calling C++ functions in JITted code"); } + // Prints a log. This is not meant to be used outside of debugging so it is very slow with our internal ABI. + void printLog(void* ptr); // Instruction recompilation functions void recADD(const PICAShader& shader, u32 instruction); diff --git a/src/core/renderer_gl/renderer_gl.cpp b/src/core/renderer_gl/renderer_gl.cpp index ca22b4e8..0cbc9cbc 100644 --- a/src/core/renderer_gl/renderer_gl.cpp +++ b/src/core/renderer_gl/renderer_gl.cpp @@ -32,11 +32,11 @@ const char* vertexShader = R"( vec4 abgr8888ToVec4(uint abgr) { const float scale = 1.0 / 255.0; - return vec4( - scale * float(abgr & 0xffu), - scale * float((abgr >> 8) & 0xffu), - scale * float((abgr >> 16) & 0xffu), - scale * float(abgr >> 24) + return scale * vec4( + float(abgr & 0xffu), + float((abgr >> 8) & 0xffu), + float((abgr >> 16) & 0xffu), + float(abgr >> 24) ); }