mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Provide our own dot functions in GLSL since GLSL doesn't provide integer versions of this function, even though AMD and Nvidia provide their own.
This commit is contained in:
parent
bed442198f
commit
22c989de9a
@ -257,6 +257,19 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
||||
uid_data.genMode_numtevstages = bpmem.genMode.numtevstages;
|
||||
uid_data.genMode_numtexgens = bpmem.genMode.numtexgens;
|
||||
|
||||
// dot product for integer vectors
|
||||
out.Write( "int idot(int3 x, int3 y)\n"
|
||||
"{\n"
|
||||
"\tint3 tmp = x * y;\n"
|
||||
"\treturn tmp.x + tmp.y + tmp.z;\n"
|
||||
"}\n");
|
||||
|
||||
out.Write( "int idot(int4 x, int4 y)\n"
|
||||
"{\n"
|
||||
"\tint4 tmp = x * y;\n"
|
||||
"\treturn tmp.x + tmp.y + tmp.z + tmp.w;\n"
|
||||
"}\n");
|
||||
|
||||
if (ApiType == API_OPENGL)
|
||||
{
|
||||
// Fmod implementation gleaned from Nvidia
|
||||
|
Loading…
Reference in New Issue
Block a user