mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Use vkd3d_atomic_increment_u32() in vkd3d_shader_dump_blob().
This commit is contained in:
parent
fef30dac2c
commit
ced8543952
Notes:
Alexandre Julliard
2024-02-01 00:31:05 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/613
@ -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,
|
static void vkd3d_shader_dump_blob(const char *path, const char *profile,
|
||||||
const char *suffix, const void *data, size_t size)
|
const char *suffix, const void *data, size_t size)
|
||||||
{
|
{
|
||||||
static LONG shader_id = 0;
|
static unsigned int shader_id = 0;
|
||||||
char filename[1024];
|
char filename[1024];
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
id = InterlockedIncrement(&shader_id) - 1;
|
id = vkd3d_atomic_increment_u32(&shader_id) - 1;
|
||||||
|
|
||||||
if (profile)
|
if (profile)
|
||||||
snprintf(filename, ARRAY_SIZE(filename), "%s/vkd3d-shader-%u-%s.%s", path, id, profile, suffix);
|
snprintf(filename, ARRAY_SIZE(filename), "%s/vkd3d-shader-%u-%s.%s", path, id, profile, suffix);
|
||||||
|
Loading…
Reference in New Issue
Block a user