SWDEV-360706 - Fix WriteAqlArgAt() crash in X86

In X86 on Windows, sizeof(size_t)=4, but size=8, for
amd::KernelParameterDescriptor::HiddenGlobalOffsetX/Y/Z items.
Loose the condition to prevent crash.

Change-Id: I2216f71f4d4fd6dd3766023b1c821cb3d35d7848
这个提交包含在:
Tao Sang
2022-10-19 22:52:45 -04:00
提交者 Tao Sang
父节点 b2665ccc4b
当前提交 3d281114fb
+1 -1
查看文件
@@ -228,7 +228,7 @@ inline void WriteAqlArgAt(unsigned char* dst, //!< The write pointer to the buff
uint size, //!< The size in bytes to copy uint size, //!< The size in bytes to copy
size_t offset //!< The alignment to follow while writing to the buffer size_t offset //!< The alignment to follow while writing to the buffer
) { ) {
assert(sizeof(T) == size && "Argument's size mismatches ABI!"); assert(sizeof(T) <= size && "Argument's size mismatches ABI!");
*(reinterpret_cast<T*>(dst + offset)) = src; *(reinterpret_cast<T*>(dst + offset)) = src;
} }