Skip to content
Permalink
Browse files

Add tests for VK_EXT_host_query_reset

Added tests for Occlusion, Statistics and Timestamp queries.

New tests:

dEQP-VK.pipeline.timestamp.*host_query_reset*
dEQP-VK.query_pool.*host_query_reset*

Components: Vulkan
VK-GL-CTS issue: 1653

Change-Id: Ic828de11bd0782bed75833a252a1b07a066aa635
  • Loading branch information...
samuelig authored and alegal-arm committed Mar 20, 2019
1 parent 4698845 commit f9e6d24c35efcd0753d52002d9ea12b1ace48145
Showing with 1,758 additions and 148 deletions.
  1. +327 −0 android/cts/master/vk-master.txt
  2. +2 −0 external/vulkancts/framework/vulkan/vkBasicTypes.inl
  3. +1 −0 external/vulkancts/framework/vulkan/vkConcreteDeviceInterface.inl
  4. +5 −0 external/vulkancts/framework/vulkan/vkDeviceDriverImpl.inl
  5. +1 −0 external/vulkancts/framework/vulkan/vkDeviceFunctionPointers.inl
  6. +4 −1 external/vulkancts/framework/vulkan/vkExtensionFunctions.inl
  7. +1 −0 external/vulkancts/framework/vulkan/vkFunctionPointerTypes.inl
  8. +5 −0 external/vulkancts/framework/vulkan/vkGetStructureTypeImpl.inl
  9. +1 −0 external/vulkancts/framework/vulkan/vkInitDeviceFunctionPointers.inl
  10. +9 −0 external/vulkancts/framework/vulkan/vkNullDriverImpl.inl
  11. +1 −0 external/vulkancts/framework/vulkan/vkStrUtil.inl
  12. +11 −0 external/vulkancts/framework/vulkan/vkStrUtilImpl.inl
  13. +7 −0 external/vulkancts/framework/vulkan/vkStructTypes.inl
  14. +1 −0 external/vulkancts/framework/vulkan/vkVirtualDeviceInterface.inl
  15. +22 −2 external/vulkancts/framework/vulkan/vkVulkan_c.inl
  16. +184 −41 external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp
  17. +95 −15 external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp
  18. +392 −87 external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp
  19. +11 −0 external/vulkancts/modules/vulkan/vktTestCase.cpp
  20. +2 −0 external/vulkancts/modules/vulkan/vktTestCase.hpp
  21. +327 −0 external/vulkancts/mustpass/1.1.4/vk-default-no-waivers.txt
  22. +327 −0 external/vulkancts/mustpass/1.1.4/vk-default.txt
  23. +22 −2 external/vulkancts/scripts/src/vulkan.h.in

Large diffs are not rendered by default.

@@ -359,6 +359,7 @@ enum VkStructureType
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002,
VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000,
};

enum VkSystemAllocationScope
@@ -2289,3 +2290,4 @@ VK_DEFINE_PLATFORM_TYPE(RROutput, void*);
#define VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION 1
#define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2
#define VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION 1
#define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1
@@ -204,3 +204,4 @@ virtual VkResult getMemoryHostPointerPropertiesEXT (VkDevice device, VkExter
virtual VkResult getAndroidHardwareBufferPropertiesANDROID (VkDevice device, const struct pt::AndroidHardwareBufferPtr buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) const;
virtual VkResult getMemoryAndroidHardwareBufferANDROID (VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct pt::AndroidHardwareBufferPtr* pBuffer) const;
virtual VkDeviceAddress getBufferDeviceAddressEXT (VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo) const;
virtual void resetQueryPoolEXT (VkDevice device, VkQueryPool queryPool, deUint32 firstQuery, deUint32 queryCount) const;
@@ -1016,3 +1016,8 @@ VkDeviceAddress DeviceDriver::getBufferDeviceAddressEXT (VkDevice device, const
{
return m_vk.getBufferDeviceAddressEXT(device, pInfo);
}

void DeviceDriver::resetQueryPoolEXT (VkDevice device, VkQueryPool queryPool, deUint32 firstQuery, deUint32 queryCount) const
{
m_vk.resetQueryPoolEXT(device, queryPool, firstQuery, queryCount);
}
@@ -204,3 +204,4 @@ GetMemoryHostPointerPropertiesEXTFunc getMemoryHostPointerPropertiesEXT;
GetAndroidHardwareBufferPropertiesANDROIDFunc getAndroidHardwareBufferPropertiesANDROID;
GetMemoryAndroidHardwareBufferANDROIDFunc getMemoryAndroidHardwareBufferANDROID;
GetBufferDeviceAddressEXTFunc getBufferDeviceAddressEXT;
ResetQueryPoolEXTFunc resetQueryPoolEXT;
@@ -276,6 +276,8 @@ void getDeviceExtensionFunctions (::std::string extName, ::std::vector<const cha
}
else if (extName == "VK_EXT_buffer_device_address")
functions.push_back("vkGetBufferDeviceAddressEXT");
else if (extName == "VK_EXT_host_query_reset")
functions.push_back("vkResetQueryPoolEXT");
else
DE_ASSERT("Extension name not found");
}
@@ -342,5 +344,6 @@ void getDeviceExtensionFunctions (::std::string extName, ::std::vector<const cha
"VK_EXT_sample_locations",
"VK_EXT_validation_cache",
"VK_ANDROID_external_memory_android_hardware_buffer",
"VK_EXT_buffer_device_address"
"VK_EXT_buffer_device_address",
"VK_EXT_host_query_reset"
};
@@ -302,3 +302,4 @@ typedef VKAPI_ATTR VkResult (VKAPI_CALL* GetAndroidHardwareBufferPropertiesAN
typedef VKAPI_ATTR VkResult (VKAPI_CALL* GetMemoryAndroidHardwareBufferANDROIDFunc) (VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct pt::AndroidHardwareBufferPtr* pBuffer);
typedef VKAPI_ATTR VkDeviceAddress (VKAPI_CALL* GetBufferDeviceAddressEXTFunc) (VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo);
typedef VKAPI_ATTR VkResult (VKAPI_CALL* GetPhysicalDeviceCooperativeMatrixPropertiesNVFunc) (VkPhysicalDevice physicalDevice, deUint32* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties);
typedef VKAPI_ATTR void (VKAPI_CALL* ResetQueryPoolEXTFunc) (VkDevice device, VkQueryPool queryPool, deUint32 firstQuery, deUint32 queryCount);
@@ -1296,3 +1296,8 @@ template<> VkStructureType getStructureType<VkPhysicalDeviceCooperativeMatrixFea
return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV;
}

template<> VkStructureType getStructureType<VkPhysicalDeviceHostQueryResetFeaturesEXT> (void)
{
return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT;
}

@@ -234,3 +234,4 @@ m_vk.getMemoryHostPointerPropertiesEXT = (GetMemoryHostPointerPropertiesEXTFun
m_vk.getAndroidHardwareBufferPropertiesANDROID = (GetAndroidHardwareBufferPropertiesANDROIDFunc) GET_PROC_ADDR("vkGetAndroidHardwareBufferPropertiesANDROID");
m_vk.getMemoryAndroidHardwareBufferANDROID = (GetMemoryAndroidHardwareBufferANDROIDFunc) GET_PROC_ADDR("vkGetMemoryAndroidHardwareBufferANDROID");
m_vk.getBufferDeviceAddressEXT = (GetBufferDeviceAddressEXTFunc) GET_PROC_ADDR("vkGetBufferDeviceAddressEXT");
m_vk.resetQueryPoolEXT = (ResetQueryPoolEXTFunc) GET_PROC_ADDR("vkResetQueryPoolEXT");
@@ -1888,6 +1888,14 @@ VKAPI_ATTR VkResult VKAPI_CALL getPhysicalDeviceCooperativeMatrixPropertiesNV (V
return VK_SUCCESS;
}

VKAPI_ATTR void VKAPI_CALL resetQueryPoolEXT (VkDevice device, VkQueryPool queryPool, deUint32 firstQuery, deUint32 queryCount)
{
DE_UNREF(device);
DE_UNREF(queryPool);
DE_UNREF(firstQuery);
DE_UNREF(queryCount);
}

static const tcu::StaticFunctionLibrary::Entry s_platformFunctions[] =
{
VK_NULL_FUNC_ENTRY(vkCreateInstance, createInstance),
@@ -2199,5 +2207,6 @@ static const tcu::StaticFunctionLibrary::Entry s_deviceFunctions[] =
VK_NULL_FUNC_ENTRY(vkGetAndroidHardwareBufferPropertiesANDROID, getAndroidHardwareBufferPropertiesANDROID),
VK_NULL_FUNC_ENTRY(vkGetMemoryAndroidHardwareBufferANDROID, getMemoryAndroidHardwareBufferANDROID),
VK_NULL_FUNC_ENTRY(vkGetBufferDeviceAddressEXT, getBufferDeviceAddressEXT),
VK_NULL_FUNC_ENTRY(vkResetQueryPoolEXT, resetQueryPoolEXT),
};

@@ -638,3 +638,4 @@ std::ostream& operator<< (std::ostream& s, const VkBufferDeviceAddressCreateInfo
std::ostream& operator<< (std::ostream& s, const VkCooperativeMatrixPropertiesNV& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceCooperativeMatrixPropertiesNV& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceCooperativeMatrixFeaturesNV& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceHostQueryResetFeaturesEXT& value);
@@ -368,6 +368,7 @@ const char* getStructureTypeName (VkStructureType value)
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV";
case VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV: return "VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT";
default: return DE_NULL;
}
}
@@ -6771,3 +6772,13 @@ std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceCooperativeMatr
s << '}';
return s;
}

std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceHostQueryResetFeaturesEXT& value)
{
s << "VkPhysicalDeviceHostQueryResetFeaturesEXT = {\n";
s << "\tsType = " << value.sType << '\n';
s << "\tpNext = " << value.pNext << '\n';
s << "\thostQueryReset = " << value.hostQueryReset << '\n';
s << '}';
return s;
}
@@ -3306,6 +3306,13 @@ struct VkPhysicalDeviceCooperativeMatrixFeaturesNV
VkBool32 cooperativeMatrixRobustBufferAccess;
};

struct VkPhysicalDeviceHostQueryResetFeaturesEXT
{
VkStructureType sType;
void* pNext;
VkBool32 hostQueryReset;
};




@@ -204,3 +204,4 @@ virtual VkResult getMemoryHostPointerPropertiesEXT (VkDevice device, VkExter
virtual VkResult getAndroidHardwareBufferPropertiesANDROID (VkDevice device, const struct pt::AndroidHardwareBufferPtr buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) const = 0;
virtual VkResult getMemoryAndroidHardwareBufferANDROID (VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct pt::AndroidHardwareBufferPtr* pBuffer) const = 0;
virtual VkDeviceAddress getBufferDeviceAddressEXT (VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo) const = 0;
virtual void resetQueryPoolEXT (VkDevice device, VkQueryPool queryPool, deUint32 firstQuery, deUint32 queryCount) const = 0;
@@ -425,8 +425,9 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002,
VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001,
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT,
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000,
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT,
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_END_RANGE - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkStructureType;

@@ -8262,6 +8263,25 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
VkCooperativeMatrixPropertiesNV* pProperties);
#endif

#define VK_EXT_host_query_reset 1
#define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1
#define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset"
typedef struct VkPhysicalDeviceHostQueryResetFeaturesEXT {
VkStructureType sType;
void* pNext;
VkBool32 hostQueryReset;
} VkPhysicalDeviceHostQueryResetFeaturesEXT;

typedef void (VKAPI_PTR *PFN_vkResetQueryPoolEXT)(VkDevice device, VkQueryPool queryPool, deUint32 firstQuery, deUint32 queryCount);

#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkResetQueryPoolEXT(
VkDevice device,
VkQueryPool queryPool,
deUint32 firstQuery,
deUint32 queryCount);
#endif

#ifdef __cplusplus
}
#endif

0 comments on commit f9e6d24

Please sign in to comment.
You can’t perform that action at this time.