The destination buffer may not be aligned as required to
cast as a float* or deFloat16*. This was causing crashes
due to bus errors on 32-bit ARM systems in several of the
dEQP-VK.pipeline.vertex_input.multiple_attributes.* tests.
switch (componentSize)
{
- case 2:
- *((deFloat16*)destFormatPtr) = deFloat32To16(value);
+ case 2: {
+ deFloat16 f16 = deFloat32To16(value);
+ memcpy(destFormatPtr, &f16, sizeof(f16));
break;
+ }
case 4:
- *((float*)destFormatPtr) = value;
+ memcpy(destFormatPtr, &value, sizeof(value));
break;
default: