mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Implement basic support for #if and #endif.
Signed-off-by: Zebediah Figura <zfigura@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
5304cabf46
commit
86cb863bc2
@@ -22,6 +22,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "vkd3d_debug.h"
|
||||
|
||||
@@ -54,6 +55,16 @@ static inline void vkd3d_free(void *ptr)
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
static inline char *vkd3d_strdup(const char *string)
|
||||
{
|
||||
size_t len = strlen(string) + 1;
|
||||
char *ptr;
|
||||
|
||||
if ((ptr = vkd3d_malloc(len)))
|
||||
memcpy(ptr, string, len);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
bool vkd3d_array_reserve(void **elements, size_t *capacity,
|
||||
size_t element_count, size_t element_size) DECLSPEC_HIDDEN;
|
||||
|
||||
|
Reference in New Issue
Block a user