Fixed both false negative and false positive result in -m 3000 in -a 3 (affected only NVIDIA GPU)

This commit is contained in:
Jens Steube
2021-04-20 17:14:13 +02:00
parent 4ddbd7e047
commit 73cc3170f4
2 changed files with 14 additions and 9 deletions
+7 -3
View File
@@ -87,15 +87,19 @@ CONSTANT_VK u32 generic_constant[8192]; // 32k
DECLSPEC u32 atomic_dec (u32 *p)
{
return atomicSub (p, 1);
volatile const u32 val = 1;
return atomicSub (p, val);
}
DECLSPEC u32 atomic_inc (u32 *p)
{
return atomicAdd (p, 1);
volatile const u32 val = 1;
return atomicAdd (p, val);
}
DECLSPEC u32 atomic_or (u32 *p, u32 val)
DECLSPEC u32 atomic_or (u32 *p, volatile const u32 val)
{
return atomicOr (p, val);
}