Permalink
Browse files

Add Vulkan 1.1 Subgroup Tests

Vulkan 1.1 has subgroup functionality that these tests verify.

Affects:

deQP-VK.subgroups.*

Components: Vulkan

VK-GL-CTS issue: 120
Vulkan issue: 423

Change-Id: I2ff925cc9647718d7e4c4218efbc3b08f773c250
  • Loading branch information...
Neil Henning authored and alegal-arm committed Jan 17, 2017
1 parent 3230043 commit 69593fca6204550740739cc03ec9a51d29f5d8c5
Showing with 19,903 additions and 10 deletions.
  1. +15 −0 AndroidGen.mk
  2. +4,227 −0 android/cts/master/vk-master.txt
  3. +9 −9 external/fetch_sources.py
  4. +14 −0 external/vulkancts/framework/vulkan/vkBasicTypes.inl
  5. +5 −0 external/vulkancts/framework/vulkan/vkGetStructureTypeImpl.inl
  6. +1 −1 external/vulkancts/framework/vulkan/vkSpirVAsm.cpp
  7. +2 −0 external/vulkancts/framework/vulkan/vkStrUtil.inl
  8. +30 −0 external/vulkancts/framework/vulkan/vkStrUtilImpl.inl
  9. +10 −0 external/vulkancts/framework/vulkan/vkStructTypes.inl
  10. +3 −0 external/vulkancts/modules/vulkan/CMakeLists.txt
  11. +40 −0 external/vulkancts/modules/vulkan/subgroups/CMakeLists.txt
  12. +934 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp
  13. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.hpp
  14. +564 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp
  15. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.hpp
  16. +571 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp
  17. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.hpp
  18. +473 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp
  19. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.hpp
  20. +1,136 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBasicTests.cpp
  21. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBasicTests.hpp
  22. +449 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp
  23. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.hpp
  24. +758 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp
  25. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.hpp
  26. +829 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp
  27. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.hpp
  28. +671 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp
  29. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.hpp
  30. +499 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp
  31. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.hpp
  32. +660 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp
  33. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.hpp
  34. +75 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTests.cpp
  35. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTests.hpp
  36. +2,303 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp
  37. +136 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp
  38. +718 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp
  39. +40 −0 external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.hpp
  40. +2 −0 external/vulkancts/modules/vulkan/vktTestPackage.cpp
  41. +4,227 −0 external/vulkancts/mustpass/1.0.3/vk-default.txt
  42. +22 −0 external/vulkancts/scripts/src/vulkan.h.in
@@ -224,6 +224,20 @@ LOCAL_SRC_FILES := \
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp \
external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp \
external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBasicTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTests.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp \
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp \
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicEventTests.cpp \
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicFenceTests.cpp \
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicSemaphoreTests.cpp \
@@ -990,6 +1004,7 @@ LOCAL_C_INCLUDES := \
$(deqp_dir)/external/vulkancts/modules/vulkan/sparse_resources \
$(deqp_dir)/external/vulkancts/modules/vulkan/spirv_assembly \
$(deqp_dir)/external/vulkancts/modules/vulkan/ssbo \
$(deqp_dir)/external/vulkancts/modules/vulkan/subgroups \
$(deqp_dir)/external/vulkancts/modules/vulkan/synchronization \
$(deqp_dir)/external/vulkancts/modules/vulkan/tessellation \
$(deqp_dir)/external/vulkancts/modules/vulkan/texture \

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -241,19 +241,19 @@ def postExtractLibpng (path):
"libpng",
postExtract = postExtractLibpng),
GitRepo(
"https://github.com/KhronosGroup/SPIRV-Tools.git",
None,
"0b0454c42c6b6f6746434bd5c78c5c70f65d9c51",
"https://gitlab.khronos.org/spirv/spirv-tools.git",
"git@gitlab.khronos.org:spirv/spirv-tools.git",
"5ef1440f3ec5a5fc6e5cf368383c4b1ae323f0f8",
"spirv-tools"),
GitRepo(
"https://github.com/KhronosGroup/glslang.git",
None,
"a5c5fb61180e8703ca85f36d618f98e16dc317e2",
"https://gitlab.khronos.org/GLSL/glslang.git",
"git@gitlab.khronos.org:GLSL/glslang.git",
"bac5d60bdf5df38bc4d3d58379aa6efc45f1ea83",
"glslang"),
GitRepo(
"https://github.com/KhronosGroup/SPIRV-Headers.git",
None,
"2bf02308656f97898c5f7e433712f21737c61e4e",
"https://gitlab.khronos.org/spirv/SPIRV-Headers.git",
"git@gitlab.khronos.org:spirv/SPIRV-Headers.git",
"73a7a9e467b42ca696e9c1f1b4ea37776c79b9f8",
"spirv-headers"),
]
@@ -211,6 +211,7 @@ enum VkStructureType
VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000093000,
VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000,
VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001,
@@ -1358,6 +1359,19 @@ enum VkDisplayPlaneAlphaFlagBitsKHR
};
typedef deUint32 VkDisplayPlaneAlphaFlagsKHR;
enum VkSubgroupFeatureFlagBits
{
VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001,
VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002,
VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004,
VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008,
VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010,
VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020,
VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040,
VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080,
};
typedef deUint32 VkSubgroupFeatureFlags;
enum VkExternalFenceHandleTypeFlagBitsKHR
{
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
@@ -336,6 +336,11 @@ template<> VkStructureType getStructureType<VkPhysicalDeviceSparseImageFormatInf
return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR;
}
template<> VkStructureType getStructureType<VkPhysicalDeviceSubgroupProperties> (void)
{
return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES;
}
template<> VkStructureType getStructureType<VkPhysicalDevicePushDescriptorPropertiesKHR> (void)
{
return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR;
@@ -39,7 +39,7 @@ using std::vector;
#if defined(DEQP_HAVE_SPIRV_TOOLS)
static const spv_target_env s_defaultEnvironment = SPV_ENV_VULKAN_1_0;
static const spv_target_env s_defaultEnvironment = SPV_ENV_VULKAN_1_1;
bool assembleSpirV (const SpirVAsmSource* program, std::vector<deUint32>* dst, SpirVProgramInfo* buildInfo)
{
@@ -178,6 +178,7 @@ tcu::Format::Bitfield<32> getSurfaceTransformFlagsKHRStr (VkSurfaceTransform
tcu::Format::Bitfield<32> getCompositeAlphaFlagsKHRStr (VkCompositeAlphaFlagsKHR value);
tcu::Format::Bitfield<32> getSwapchainCreateFlagsKHRStr (VkSwapchainCreateFlagsKHR value);
tcu::Format::Bitfield<32> getDisplayPlaneAlphaFlagsKHRStr (VkDisplayPlaneAlphaFlagsKHR value);
tcu::Format::Bitfield<32> getSubgroupFeatureFlagsStr (VkSubgroupFeatureFlags value);
tcu::Format::Bitfield<32> getExternalFenceHandleTypeFlagsKHRStr (VkExternalFenceHandleTypeFlagsKHR value);
tcu::Format::Bitfield<32> getExternalFenceFeatureFlagsKHRStr (VkExternalFenceFeatureFlagsKHR value);
tcu::Format::Bitfield<32> getFenceImportFlagsKHRStr (VkFenceImportFlagsKHR value);
@@ -361,6 +362,7 @@ std::ostream& operator<< (std::ostream& s, const VkQueueFamilyProperties2KHR& va
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceMemoryProperties2KHR& value);
std::ostream& operator<< (std::ostream& s, const VkSparseImageFormatProperties2KHR& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceSparseImageFormatInfo2KHR& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceSubgroupProperties& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDevicePushDescriptorPropertiesKHR& value);
std::ostream& operator<< (std::ostream& s, const VkPhysicalDevice16BitStorageFeaturesKHR& value);
std::ostream& operator<< (std::ostream& s, const VkRectLayerKHR& value);
@@ -222,6 +222,7 @@ const char* getStructureTypeName (VkStructureType value)
case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: return "VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR";
case VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR: return "VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR";
case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: return "VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES";
case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: return "VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR";
case VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR: return "VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR";
@@ -1577,6 +1578,22 @@ tcu::Format::Bitfield<32> getDisplayPlaneAlphaFlagsKHRStr (VkDisplayPlaneAlphaFl
return tcu::Format::Bitfield<32>(value, DE_ARRAY_BEGIN(s_desc), DE_ARRAY_END(s_desc));
}
tcu::Format::Bitfield<32> getSubgroupFeatureFlagsStr (VkSubgroupFeatureFlags value)
{
static const tcu::Format::BitDesc s_desc[] =
{
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_BASIC_BIT, "VK_SUBGROUP_FEATURE_BASIC_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_VOTE_BIT, "VK_SUBGROUP_FEATURE_VOTE_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_ARITHMETIC_BIT, "VK_SUBGROUP_FEATURE_ARITHMETIC_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_BALLOT_BIT, "VK_SUBGROUP_FEATURE_BALLOT_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_SHUFFLE_BIT, "VK_SUBGROUP_FEATURE_SHUFFLE_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT, "VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_CLUSTERED_BIT, "VK_SUBGROUP_FEATURE_CLUSTERED_BIT"),
tcu::Format::BitDesc(VK_SUBGROUP_FEATURE_QUAD_BIT, "VK_SUBGROUP_FEATURE_QUAD_BIT"),
};
return tcu::Format::Bitfield<32>(value, DE_ARRAY_BEGIN(s_desc), DE_ARRAY_END(s_desc));
}
tcu::Format::Bitfield<32> getExternalFenceHandleTypeFlagsKHRStr (VkExternalFenceHandleTypeFlagsKHR value)
{
static const tcu::Format::BitDesc s_desc[] =
@@ -3728,6 +3745,19 @@ std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceSparseImageForm
return s;
}
std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceSubgroupProperties& value)
{
s << "VkPhysicalDeviceSubgroupProperties = {\n";
s << "\tsType = " << value.sType << '\n';
s << "\tpNext = " << value.pNext << '\n';
s << "\tsubgroupSize = " << value.subgroupSize << '\n';
s << "\tsupportedStages = " << getShaderStageFlagsStr(value.supportedStages) << '\n';
s << "\tsupportedOperations = " << getSubgroupFeatureFlagsStr(value.supportedOperations) << '\n';
s << "\tquadOperationsInAllStages = " << value.quadOperationsInAllStages << '\n';
s << '}';
return s;
}
std::ostream& operator<< (std::ostream& s, const VkPhysicalDevicePushDescriptorPropertiesKHR& value)
{
s << "VkPhysicalDevicePushDescriptorPropertiesKHR = {\n";
@@ -1434,6 +1434,16 @@ struct VkPhysicalDeviceSparseImageFormatInfo2KHR
VkImageTiling tiling;
};
struct VkPhysicalDeviceSubgroupProperties
{
VkStructureType sType;
void* pNext;
deUint32 subgroupSize;
VkShaderStageFlags supportedStages;
VkSubgroupFeatureFlags supportedOperations;
VkBool32 quadOperationsInAllStages;
};
struct VkPhysicalDevicePushDescriptorPropertiesKHR
{
VkStructureType sType;
@@ -26,6 +26,7 @@ add_subdirectory(texture)
add_subdirectory(robustness)
add_subdirectory(renderpass)
add_subdirectory(multiview)
add_subdirectory(subgroups)
add_subdirectory(ycbcr)
include_directories(
@@ -55,6 +56,7 @@ include_directories(
robustness
renderpass
multiview
subgroups
ycbcr
)
@@ -109,6 +111,7 @@ set(DEQP_VK_LIBS
deqp-vk-robustness
deqp-vk-render-pass
deqp-vk-multiview
deqp-vk-subgroups
deqp-vk-ycbcr
)
@@ -0,0 +1,40 @@
include_directories(..)
set(DEQP_VK_SUBGROUPS_SRCS
vktSubgroupsTests.cpp
vktSubgroupsTests.hpp
vktSubgroupsBuiltinVarTests.cpp
vktSubgroupsBuiltinVarTests.hpp
vktSubgroupsBuiltinMaskVarTests.cpp
vktSubgroupsBuiltinMaskVarTests.hpp
vktSubgroupsBasicTests.cpp
vktSubgroupsBasicTests.hpp
vktSubgroupsVoteTests.cpp
vktSubgroupsVoteTests.hpp
vktSubgroupsBallotTests.cpp
vktSubgroupsBallotTests.hpp
vktSubgroupsBallotBroadcastTests.cpp
vktSubgroupsBallotBroadcastTests.hpp
vktSubgroupsBallotOtherTests.cpp
vktSubgroupsBallotOtherTests.hpp
vktSubgroupsArithmeticTests.cpp
vktSubgroupsArithmeticTests.hpp
vktSubgroupsClusteredTests.cpp
vktSubgroupsClusteredTests.hpp
vktSubgroupsShuffleTests.cpp
vktSubgroupsShuffleTests.hpp
vktSubgroupsQuadTests.cpp
vktSubgroupsQuadTests.hpp
vktSubgroupsShapeTests.cpp
vktSubgroupsShapeTests.hpp
vktSubgroupsTestsUtils.cpp
vktSubgroupsTestsUtils.hpp
)
set(DEQP_VK_SUBGROUPS_LIBS
tcutil
vkutil
)
add_library(deqp-vk-subgroups STATIC ${DEQP_VK_SUBGROUPS_SRCS})
target_link_libraries(deqp-vk-subgroups ${DEQP_VK_SUBGROUPS_LIBS})
Oops, something went wrong.

0 comments on commit 69593fc

Please sign in to comment.