Use aapcs-vfp calling convention for ARMv7A
authorMark Adams <marka@nvidia.com>
Sat, 16 Jan 2016 01:48:20 +0000 (20:48 -0500)
committerMark Adams <marka@nvidia.com>
Sat, 16 Jan 2016 01:48:20 +0000 (20:48 -0500)
This is required to match the calling convention specified in
vk_platform.h. Tests using functions with float parameters were failing
when built for 32-bit ARM since the values were in different registers
than expected.

external/vulkancts/framework/vulkan/vkDefs.hpp

index af1c558..2bf29fa 100644 (file)
 
 #include "tcuDefs.hpp"
 
-#if (DE_OS == DE_OS_ANDROID)
-#      include <sys/cdefs.h>
-#      if !defined(__NDK_FPABI__)
-#              define __NDK_FPABI__
-#      endif
-#      define VKAPI_ATTR __NDK_FPABI__
+#if (DE_OS == DE_OS_ANDROID) && defined(__ARM_ARCH_7A__)
+#      define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
 #else
 #      define VKAPI_ATTR
 #endif