[GL renderer] Fix up float * vec4 mul
This commit is contained in:
@@ -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)
|
// 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);
|
void checkBoolUniform(const PICAShader& shader, u32 instruction);
|
||||||
|
|
||||||
// Emit a call to a C++ function
|
// Prints a log. This is not meant to be used outside of debugging so it is very slow with our internal ABI.
|
||||||
void callCppFunc(void* function) { Helpers::panic("[ShaderJIT] Unimplemented: Add support for calling C++ functions in JITted code"); }
|
void printLog(void* ptr);
|
||||||
|
|
||||||
// Instruction recompilation functions
|
// Instruction recompilation functions
|
||||||
void recADD(const PICAShader& shader, u32 instruction);
|
void recADD(const PICAShader& shader, u32 instruction);
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ const char* vertexShader = R"(
|
|||||||
vec4 abgr8888ToVec4(uint abgr) {
|
vec4 abgr8888ToVec4(uint abgr) {
|
||||||
const float scale = 1.0 / 255.0;
|
const float scale = 1.0 / 255.0;
|
||||||
|
|
||||||
return vec4(
|
return scale * vec4(
|
||||||
scale * float(abgr & 0xffu),
|
float(abgr & 0xffu),
|
||||||
scale * float((abgr >> 8) & 0xffu),
|
float((abgr >> 8) & 0xffu),
|
||||||
scale * float((abgr >> 16) & 0xffu),
|
float((abgr >> 16) & 0xffu),
|
||||||
scale * float(abgr >> 24)
|
float(abgr >> 24)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user