mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Introduce vkd3d_make_u{16, 32}() helpers.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
2dedc937a0
commit
ed7cdb3940
@@ -26,6 +26,7 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <intrin.h>
|
||||
@@ -145,6 +146,16 @@ static inline bool vkd3d_bound_range(size_t start, size_t count, size_t limit)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint16_t vkd3d_make_u16(uint8_t low, uint8_t high)
|
||||
{
|
||||
return low | ((uint16_t)high << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t vkd3d_make_u32(uint16_t low, uint16_t high)
|
||||
{
|
||||
return low | ((uint32_t)high << 16);
|
||||
}
|
||||
|
||||
static inline int ascii_isupper(int c)
|
||||
{
|
||||
return 'A' <= c && c <= 'Z';
|
||||
|
Reference in New Issue
Block a user