mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Add some C HLSL preprocessor tests.
That is, tests in C, for features of the HLSL preprocessor which are difficult to test using the shader_runner framework. 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
e44f2fbf43
commit
ffa7bd39f3
@@ -120,6 +120,20 @@ static inline unsigned int vkd3d_log2i(unsigned int x)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void *vkd3d_memmem( const void *haystack, size_t haystack_len, const void *needle, size_t needle_len)
|
||||
{
|
||||
const char *str = haystack;
|
||||
|
||||
while (haystack_len >= needle_len)
|
||||
{
|
||||
if (!memcmp(str, needle, needle_len))
|
||||
return (char *)str;
|
||||
++str;
|
||||
--haystack_len;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int ascii_isupper(int c)
|
||||
{
|
||||
return 'A' <= c && c <= 'Z';
|
||||
|
Reference in New Issue
Block a user