Fix OpenGL error on M1 Mac.

Followup to #10466. Resolves the following error:

ERROR: 0:85: '&' does not operate on 'uvec3' and 'int'
This commit is contained in:
Joon Park 2022-07-17 08:53:43 -04:00
parent 70b0b03c3c
commit 319288de8e
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ static void WriteSampleFunction(ShaderCode& code, const EFBCopyParams& params, A
" dot(u_const, float4(texcol_raw.rgb, 256)),\n" " dot(u_const, float4(texcol_raw.rgb, 256)),\n"
" dot(v_const, float4(texcol_raw.rgb, 256)));\n" " dot(v_const, float4(texcol_raw.rgb, 256)));\n"
" // Divide by 256 and round .5 and higher up\n" " // Divide by 256 and round .5 and higher up\n"
" texcol_raw.rgb = (texcol_raw.rgb >> 8) + ((texcol_raw.rgb >> 7) & 1);\n"); " texcol_raw.rgb = (texcol_raw.rgb >> 8) + ((texcol_raw.rgb >> 7) & 1u);\n");
} }
code.Write(" return float4(texcol_raw) / 255.0;\n"); code.Write(" return float4(texcol_raw) / 255.0;\n");

View File

@ -161,7 +161,7 @@ ShaderCode GeneratePixelShader(APIType api_type, const UidData* uid_data)
" dot(u_const, float4(texcol_raw.rgb, 256)),\n" " dot(u_const, float4(texcol_raw.rgb, 256)),\n"
" dot(v_const, float4(texcol_raw.rgb, 256)));\n" " dot(v_const, float4(texcol_raw.rgb, 256)));\n"
" // Divide by 256 and round .5 and higher up\n" " // Divide by 256 and round .5 and higher up\n"
" texcol_raw.rgb = (texcol_raw.rgb >> 8) + ((texcol_raw.rgb >> 7) & 1);\n"); " texcol_raw.rgb = (texcol_raw.rgb >> 8) + ((texcol_raw.rgb >> 7) & 1u);\n");
} }
switch (uid_data->dst_format) switch (uid_data->dst_format)