mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Prefer immutable texture storage when available
This commit is contained in:
parent
427a7e4998
commit
d5bf094f9a
7 changed files with 42 additions and 24 deletions
|
@ -283,6 +283,17 @@ inline s32 s32_clamp(s32 value, s32 low, s32 high)
|
|||
return clamp(value, low, high);
|
||||
}
|
||||
|
||||
// integer log2 of an integer. returning 0 if denormal
|
||||
inline s32 u32_log2(u32 in)
|
||||
{
|
||||
s32 ret = 0;
|
||||
while (in > 1) {
|
||||
in >>= 1;
|
||||
ret++;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
float IEEE-754 bit representation
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue