mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-24 04:20:13 +00:00
Vulkan 1.3 (#4686)
* Add new environment enum for Vulkan 1,3 * Do not require --allow-localsizeid in Vulkan 1.3 to use LocalSizeId execution mode
This commit is contained in:
parent
e8439c1c9d
commit
6938af7f82
@ -482,6 +482,7 @@ SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionDetailsString(void);
|
||||
// SPV_ENV_VULKAN_1_1 -> SPIR-V 1.3
|
||||
// SPV_ENV_VULKAN_1_1_SPIRV_1_4 -> SPIR-V 1.4
|
||||
// SPV_ENV_VULKAN_1_2 -> SPIR-V 1.5
|
||||
// SPV_ENV_VULKAN_1_3 -> SPIR-V 1.6
|
||||
// Consult the description of API entry points for specific rules.
|
||||
typedef enum {
|
||||
SPV_ENV_UNIVERSAL_1_0, // SPIR-V 1.0 latest revision, no other restrictions.
|
||||
@ -518,7 +519,9 @@ typedef enum {
|
||||
SPV_ENV_VULKAN_1_2, // Vulkan 1.2 latest revision.
|
||||
|
||||
SPV_ENV_UNIVERSAL_1_6, // SPIR-V 1.6 latest revision, no other restrictions.
|
||||
SPV_ENV_MAX // Keep this as the last enum value.
|
||||
SPV_ENV_VULKAN_1_3, // Vulkan 1.3 latest revision.
|
||||
|
||||
SPV_ENV_MAX // Keep this as the last enum value.
|
||||
} spv_target_env;
|
||||
|
||||
// SPIR-V Validator can be parameterized with the following Universal Limits.
|
||||
|
@ -97,6 +97,7 @@ spv_result_t spvExtInstTableGet(spv_ext_inst_table* pExtInstTable,
|
||||
case SPV_ENV_UNIVERSAL_1_5:
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
*pExtInstTable = &kTable_1_0;
|
||||
return SPV_SUCCESS;
|
||||
default:
|
||||
|
@ -74,6 +74,8 @@ const char* spvTargetEnvDescription(spv_target_env env) {
|
||||
return "SPIR-V 1.5 (under Vulkan 1.2 semantics)";
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
return "SPIR-V 1.6";
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
return "SPIR-V 1.6 (under Vulkan 1.3 semantics)";
|
||||
case SPV_ENV_MAX:
|
||||
assert(false && "Invalid target environment value.");
|
||||
break;
|
||||
@ -116,6 +118,7 @@ uint32_t spvVersionForTargetEnv(spv_target_env env) {
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
return SPV_SPIRV_VERSION_WORD(1, 5);
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
return SPV_SPIRV_VERSION_WORD(1, 6);
|
||||
case SPV_ENV_MAX:
|
||||
assert(false && "Invalid target environment value.");
|
||||
@ -129,6 +132,7 @@ static const std::pair<const char*, spv_target_env> spvTargetEnvNameMap[] = {
|
||||
{"vulkan1.0", SPV_ENV_VULKAN_1_0},
|
||||
{"vulkan1.1", SPV_ENV_VULKAN_1_1},
|
||||
{"vulkan1.2", SPV_ENV_VULKAN_1_2},
|
||||
{"vulkan1.3", SPV_ENV_VULKAN_1_3},
|
||||
{"spv1.0", SPV_ENV_UNIVERSAL_1_0},
|
||||
{"spv1.1", SPV_ENV_UNIVERSAL_1_1},
|
||||
{"spv1.2", SPV_ENV_UNIVERSAL_1_2},
|
||||
@ -182,7 +186,8 @@ static const VulkanEnv ordered_vulkan_envs[] = {
|
||||
{SPV_ENV_VULKAN_1_0, VULKAN_VER(1, 0), SPIRV_VER(1, 0)},
|
||||
{SPV_ENV_VULKAN_1_1, VULKAN_VER(1, 1), SPIRV_VER(1, 3)},
|
||||
{SPV_ENV_VULKAN_1_1_SPIRV_1_4, VULKAN_VER(1, 1), SPIRV_VER(1, 4)},
|
||||
{SPV_ENV_VULKAN_1_2, VULKAN_VER(1, 2), SPIRV_VER(1, 5)}};
|
||||
{SPV_ENV_VULKAN_1_2, VULKAN_VER(1, 2), SPIRV_VER(1, 5)},
|
||||
{SPV_ENV_VULKAN_1_3, VULKAN_VER(1, 3), SPIRV_VER(1, 6)}};
|
||||
|
||||
bool spvParseVulkanEnv(uint32_t vulkan_ver, uint32_t spirv_ver,
|
||||
spv_target_env* env) {
|
||||
@ -222,6 +227,7 @@ bool spvIsVulkanEnv(spv_target_env env) {
|
||||
case SPV_ENV_VULKAN_1_1:
|
||||
case SPV_ENV_VULKAN_1_1_SPIRV_1_4:
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
return true;
|
||||
case SPV_ENV_WEBGPU_0:
|
||||
assert(false && "Deprecated target environment value.");
|
||||
@ -251,6 +257,7 @@ bool spvIsOpenCLEnv(spv_target_env env) {
|
||||
case SPV_ENV_UNIVERSAL_1_5:
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
return false;
|
||||
case SPV_ENV_OPENCL_1_2:
|
||||
case SPV_ENV_OPENCL_EMBEDDED_1_2:
|
||||
@ -292,6 +299,7 @@ bool spvIsOpenGLEnv(spv_target_env env) {
|
||||
case SPV_ENV_UNIVERSAL_1_5:
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
return false;
|
||||
case SPV_ENV_OPENGL_4_0:
|
||||
case SPV_ENV_OPENGL_4_1:
|
||||
@ -330,6 +338,7 @@ bool spvIsValidEnv(spv_target_env env) {
|
||||
case SPV_ENV_UNIVERSAL_1_5:
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
case SPV_ENV_OPENGL_4_0:
|
||||
case SPV_ENV_OPENGL_4_1:
|
||||
case SPV_ENV_OPENGL_4_2:
|
||||
@ -365,7 +374,8 @@ std::string spvLogStringForEnv(spv_target_env env) {
|
||||
case SPV_ENV_VULKAN_1_0:
|
||||
case SPV_ENV_VULKAN_1_1:
|
||||
case SPV_ENV_VULKAN_1_1_SPIRV_1_4:
|
||||
case SPV_ENV_VULKAN_1_2: {
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_VULKAN_1_3: {
|
||||
return "Vulkan";
|
||||
}
|
||||
case SPV_ENV_UNIVERSAL_1_0:
|
||||
|
@ -42,6 +42,7 @@ spv_context spvContextCreate(spv_target_env env) {
|
||||
case SPV_ENV_UNIVERSAL_1_5:
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
break;
|
||||
default:
|
||||
return nullptr;
|
||||
|
@ -175,7 +175,7 @@ ValidationState_t::ValidationState_t(const spv_const_context ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// LocalSizeId is only disallowed without maintainence4.
|
||||
// LocalSizeId is only disallowed prior to Vulkan 1.3 without maintenance4.
|
||||
switch (env) {
|
||||
case SPV_ENV_VULKAN_1_0:
|
||||
case SPV_ENV_VULKAN_1_1:
|
||||
|
@ -135,6 +135,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
{VK(1, 0), SPV(1, 3), true, SPV_ENV_VULKAN_1_1},
|
||||
{VK(1, 0), SPV(1, 4), true, SPV_ENV_VULKAN_1_1_SPIRV_1_4},
|
||||
{VK(1, 0), SPV(1, 5), true, SPV_ENV_VULKAN_1_2},
|
||||
{VK(1, 0), SPV(1, 6), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 0), SPV(1, 7), false, SPV_ENV_UNIVERSAL_1_0},
|
||||
// Vulkan 1.1 cases
|
||||
{VK(1, 1), SPV(1, 0), true, SPV_ENV_VULKAN_1_1},
|
||||
@ -143,6 +144,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
{VK(1, 1), SPV(1, 3), true, SPV_ENV_VULKAN_1_1},
|
||||
{VK(1, 1), SPV(1, 4), true, SPV_ENV_VULKAN_1_1_SPIRV_1_4},
|
||||
{VK(1, 1), SPV(1, 5), true, SPV_ENV_VULKAN_1_2},
|
||||
{VK(1, 1), SPV(1, 6), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 1), SPV(1, 7), false, SPV_ENV_UNIVERSAL_1_0},
|
||||
// Vulkan 1.2 cases
|
||||
{VK(1, 2), SPV(1, 0), true, SPV_ENV_VULKAN_1_2},
|
||||
@ -151,7 +153,17 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
{VK(1, 2), SPV(1, 3), true, SPV_ENV_VULKAN_1_2},
|
||||
{VK(1, 2), SPV(1, 4), true, SPV_ENV_VULKAN_1_2},
|
||||
{VK(1, 2), SPV(1, 5), true, SPV_ENV_VULKAN_1_2},
|
||||
{VK(1, 2), SPV(1, 6), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 2), SPV(1, 7), false, SPV_ENV_UNIVERSAL_1_0},
|
||||
// Vulkan 1.3 cases
|
||||
{VK(1, 3), SPV(1, 0), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 1), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 2), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 3), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 4), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 5), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 6), true, SPV_ENV_VULKAN_1_3},
|
||||
{VK(1, 3), SPV(1, 7), false, SPV_ENV_UNIVERSAL_1_0},
|
||||
// Vulkan 2.0 cases
|
||||
{VK(2, 0), SPV(1, 0), false, SPV_ENV_UNIVERSAL_1_0},
|
||||
// Vulkan 99.0 cases
|
||||
|
@ -959,7 +959,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
Combine(
|
||||
Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_5,
|
||||
SPV_ENV_UNIVERSAL_1_6, SPV_ENV_VULKAN_1_0, SPV_ENV_VULKAN_1_1,
|
||||
SPV_ENV_VULKAN_1_2),
|
||||
SPV_ENV_VULKAN_1_2, SPV_ENV_VULKAN_1_3),
|
||||
ValuesIn(std::vector<AssemblyCase>{
|
||||
{"OpExtension \"SPV_KHR_integer_dot_product\"\n",
|
||||
MakeInstruction(SpvOpExtension,
|
||||
|
@ -1178,6 +1178,26 @@ OpFunctionEnd
|
||||
HasSubstr("Expected bool scalar type as Result Type"));
|
||||
}
|
||||
|
||||
TEST_F(ValidateMode, LocalSizeIdVulkan1p3DoesNotRequireOption) {
|
||||
const std::string spirv = R"(
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main "main"
|
||||
OpExecutionModeId %main LocalSizeId %int_1 %int_1 %int_1
|
||||
%void = OpTypeVoid
|
||||
%int = OpTypeInt 32 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%void_fn = OpTypeFunction %void
|
||||
%main = OpFunction %void None %void_fn
|
||||
%entry = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
)";
|
||||
|
||||
CompileSuccessfully(spirv, SPV_ENV_VULKAN_1_3);
|
||||
EXPECT_EQ(SPV_SUCCESS, ValidateInstructions(SPV_ENV_VULKAN_1_3));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace val
|
||||
} // namespace spvtools
|
||||
|
@ -78,6 +78,7 @@ std::string version(spv_target_env env) {
|
||||
case SPV_ENV_VULKAN_1_2:
|
||||
return "1.5";
|
||||
case SPV_ENV_UNIVERSAL_1_6:
|
||||
case SPV_ENV_VULKAN_1_3:
|
||||
return "1.6";
|
||||
default:
|
||||
return "0";
|
||||
@ -115,6 +116,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_VULKAN_1_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_VULKAN_1_1_SPIRV_1_4,vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_OPENGL_4_0, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_OPENGL_4_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_OPENGL_4_2, vulkan_spirv, true),
|
||||
@ -132,6 +134,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_VULKAN_1_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_1, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -149,6 +152,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_VULKAN_1_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_2, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -166,6 +170,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_VULKAN_1_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_3, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -183,6 +188,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_VULKAN_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_4, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -200,6 +206,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_VULKAN_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_5, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -217,6 +224,7 @@ INSTANTIATE_TEST_SUITE_P(Universal, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_VULKAN_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_VULKAN_1_2, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_UNIVERSAL_1_6, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -239,6 +247,7 @@ INSTANTIATE_TEST_SUITE_P(Vulkan, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_VULKAN_1_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_OPENGL_4_0, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_OPENGL_4_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_0, SPV_ENV_OPENGL_4_2, vulkan_spirv, true),
|
||||
@ -256,6 +265,7 @@ INSTANTIATE_TEST_SUITE_P(Vulkan, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_VULKAN_1_1, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -273,6 +283,7 @@ INSTANTIATE_TEST_SUITE_P(Vulkan, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_VULKAN_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_1_SPIRV_1_4, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
@ -290,11 +301,30 @@ INSTANTIATE_TEST_SUITE_P(Vulkan, ValidateVersion,
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_VULKAN_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_VULKAN_1_2, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_OPENGL_4_3, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_OPENGL_4_5, vulkan_spirv, false)
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_2, SPV_ENV_OPENGL_4_5, vulkan_spirv, false),
|
||||
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_2, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_3, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_4, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_5, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_UNIVERSAL_1_6, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_VULKAN_1_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_VULKAN_1_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_VULKAN_1_1_SPIRV_1_4, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_VULKAN_1_2, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_VULKAN_1_3, vulkan_spirv, true),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_OPENGL_4_0, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_OPENGL_4_1, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_OPENGL_4_2, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_OPENGL_4_3, vulkan_spirv, false),
|
||||
std::make_tuple(SPV_ENV_VULKAN_1_3, SPV_ENV_OPENGL_4_5, vulkan_spirv, false)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -111,7 +111,7 @@ int main(int argc, char** argv) {
|
||||
printf("%s\n", spvSoftwareVersionDetailsString());
|
||||
printf(
|
||||
"Targets:\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n "
|
||||
"%s\n %s\n %s\n",
|
||||
"%s\n %s\n %s\n %s\n",
|
||||
spvTargetEnvDescription(SPV_ENV_UNIVERSAL_1_0),
|
||||
spvTargetEnvDescription(SPV_ENV_UNIVERSAL_1_1),
|
||||
spvTargetEnvDescription(SPV_ENV_UNIVERSAL_1_2),
|
||||
@ -123,7 +123,8 @@ int main(int argc, char** argv) {
|
||||
spvTargetEnvDescription(SPV_ENV_VULKAN_1_0),
|
||||
spvTargetEnvDescription(SPV_ENV_VULKAN_1_1),
|
||||
spvTargetEnvDescription(SPV_ENV_VULKAN_1_1_SPIRV_1_4),
|
||||
spvTargetEnvDescription(SPV_ENV_VULKAN_1_2));
|
||||
spvTargetEnvDescription(SPV_ENV_VULKAN_1_2),
|
||||
spvTargetEnvDescription(SPV_ENV_VULKAN_1_3));
|
||||
continue_processing = false;
|
||||
return_code = 0;
|
||||
} else if (0 == strcmp(cur_arg, "--help") || 0 == strcmp(cur_arg, "-h")) {
|
||||
|
Loading…
Reference in New Issue
Block a user