From ced85439526733ba33aebba1a5c176485c3eae0a Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 23 Jan 2024 18:05:26 +0100 Subject: [PATCH] vkd3d-shader: Use vkd3d_atomic_increment_u32() in vkd3d_shader_dump_blob(). --- libs/vkd3d-shader/vkd3d_shader_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index ac13be89..1ef8d949 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -424,12 +424,12 @@ void set_string(struct vkd3d_bytecode_buffer *buffer, size_t offset, const char static void vkd3d_shader_dump_blob(const char *path, const char *profile, const char *suffix, const void *data, size_t size) { - static LONG shader_id = 0; + static unsigned int shader_id = 0; char filename[1024]; unsigned int id; FILE *f; - id = InterlockedIncrement(&shader_id) - 1; + id = vkd3d_atomic_increment_u32(&shader_id) - 1; if (profile) snprintf(filename, ARRAY_SIZE(filename), "%s/vkd3d-shader-%u-%s.%s", path, id, profile, suffix);