DRW: Fix signed/unsigned mismatches in shader code

Fix the following error messages on Blender startup
since commit 308a12ac64.

This commit fixes T98194.

Reviewed By: fclem
Differential Revision: https://developer.blender.org/D15007
This commit is contained in:
Johannes J
2022-05-23 16:29:22 +02:00
committed by Clément Foucault
parent aea59428eb
commit f4d31fbf6c
3 changed files with 15 additions and 14 deletions

View File

@@ -110,6 +110,7 @@ float len_squared(vec3 a) { return dot(a, a); }
float len_squared(vec2 a) { return dot(a, a); }
bool flag_test(uint flag, uint val) { return (flag & val) != 0u; }
bool flag_test(int flag, uint val) { return flag_test(uint(flag), val); }
bool flag_test(int flag, int val) { return (flag & val) != 0; }
void set_flag_from_test(inout uint value, bool test, uint flag) { if (test) { value |= flag; } else { value &= ~flag; } }