SWDEV-469825 - Modified the kernel argument readback to use a pointer to volatile
This change modifies the readback mechanism to use a pointer to volatile instead of a volatile pointer. This ensures that the compiler does not optimize away the read operation. Change-Id: I79ff925d615aa8cc4f950e8ff4b7e608fcb179a4
This commit is contained in:
1 förälder
7257f56c60
incheckning
ea50d2c0c2
2 files changed
+4
-3
No files matched your search
@@ -3259,7 +3259,8 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes,
|
||||
_mm_sfence();
|
||||
*(argBuffer + argSize - 1) = *(parameters + argSize - 1);
|
||||
_mm_mfence();
|
||||
auto kSentinel = *reinterpret_cast<volatile address>(argBuffer + argSize - 1);
|
||||
auto kSentinel = *reinterpret_cast<volatile unsigned char*>(
|
||||
argBuffer + argSize - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user