The test code dereferences first element of empty std::vector, what
may cause an assert in debug builds (depending on toolchain and it's
settings).
Addects: dEQP-VK.tessellation.*
Components: Vulkan
VK-GL-CTS issue: 710
Change-Id: I2b94a0d03c3523ebf1380a9371765c616fd21b82
(cherry picked from commit
b81810d2446bac26ea0d5fb017250934842eb643)
{
std::vector<float> results(count);
- const float* pFloatData = reinterpret_cast<const float*>(static_cast<const deUint8*>(memory) + offset);
- deMemcpy(&results[0], pFloatData, sizeof(float) * count);
+ if (count != 0)
+ {
+ const float* pFloatData = reinterpret_cast<const float*>(static_cast<const deUint8*>(memory) + offset);
+ deMemcpy(&results[0], pFloatData, sizeof(float) * count);
+ }
return results;
}