GitRepo(
"https://github.com/KhronosGroup/SPIRV-Tools.git",
None,
- "11cd875ed88484f93943071083b4821b4c3d2193",
+ "ee30773650eca50b1cd3c913babcc2b50d7b91fd",
"spirv-tools"),
GitRepo(
"https://github.com/KhronosGroup/glslang.git",
GitRepo(
"https://github.com/KhronosGroup/SPIRV-Headers.git",
None,
- "cf653e4ca4858583802b0d1656bc934edff6bd7f",
+ "449bc986ba6f4c5e10e32828783f9daef2a77644",
"spirv-headers"),
GitRepo(
"https://github.com/google/amber.git",
spvValidatorOptionsSetWorkgroupScalarBlockLayout(options, true);
}
+ if (val_options.flags & SpirvValidatorOptions::FLAG_SPIRV_VALIDATOR_ALLOW_LOCALSIZEID)
+ spvValidatorOptionsSetAllowLocalSizeId(options, true);
+
const spv_result_t valid = spvValidateWithOptions(context, options, &cbinary, &diagnostic);
const bool passed = (valid == SPV_SUCCESS);
deUint32 vulkanVersion;
SpirvVersion targetVersion;
bool supports_VK_KHR_spirv_1_4;
+ bool supports_VK_KHR_maintenance4;
- SpirVAsmBuildOptions (deUint32 vulkanVersion_, SpirvVersion targetVersion_, bool allowSpirv14 = false)
- : vulkanVersion (vulkanVersion_)
- , targetVersion (targetVersion_)
- , supports_VK_KHR_spirv_1_4 (allowSpirv14)
+ SpirVAsmBuildOptions (deUint32 vulkanVersion_, SpirvVersion targetVersion_, bool allowSpirv14 = false, bool allowMaintenance4 = false)
+ : vulkanVersion (vulkanVersion_)
+ , targetVersion (targetVersion_)
+ , supports_VK_KHR_spirv_1_4 (allowSpirv14)
+ , supports_VK_KHR_maintenance4 (allowMaintenance4)
{}
SpirVAsmBuildOptions (void)
- : vulkanVersion (VK_MAKE_VERSION(1, 0, 0))
- , targetVersion (SPIRV_VERSION_1_0)
- , supports_VK_KHR_spirv_1_4 (false)
+ : vulkanVersion (VK_MAKE_VERSION(1, 0, 0))
+ , targetVersion (SPIRV_VERSION_1_0)
+ , supports_VK_KHR_spirv_1_4 (false)
+ , supports_VK_KHR_maintenance4 (false)
{}
SpirvValidatorOptions getSpirvValidatorOptions() const
{
SpirvValidatorOptions result(vulkanVersion);
result.supports_VK_KHR_spirv_1_4 = supports_VK_KHR_spirv_1_4;
+ if (supports_VK_KHR_maintenance4)
+ result.flags = result.flags | SpirvValidatorOptions::FLAG_SPIRV_VALIDATOR_ALLOW_LOCALSIZEID;
return result;
}
};
enum Flags
{
- FLAG_SPIRV_VALIDATOR_WORKGROUP_SCALAR_BLOCK_LAYOUT = (1u<<0)
+ FLAG_SPIRV_VALIDATOR_WORKGROUP_SCALAR_BLOCK_LAYOUT = (1u<<0),
+ FLAG_SPIRV_VALIDATOR_ALLOW_LOCALSIZEID = (1u<<1)
};
SpirvValidatorOptions(deUint32 the_vulkan_version = VK_MAKE_VERSION(1, 0, 0), BlockLayoutRules the_layout = kDefaultBlockLayout, bool allowSpirv14 = false, deUint32 the_flags = 0)
void SpvAsmComputeShaderCase::initPrograms (SourceCollections& programCollection) const
{
- const auto& extensions = m_shaderSpec.extensions;
- const bool allowSpirv14 = (std::find(extensions.begin(), extensions.end(), "VK_KHR_spirv_1_4") != extensions.end());
+ const auto& extensions = m_shaderSpec.extensions;
+ const bool allowSpirv14 = (std::find(extensions.begin(), extensions.end(), "VK_KHR_spirv_1_4") != extensions.end());
+ const bool allowMaintenance4 = (std::find(extensions.begin(), extensions.end(), "VK_KHR_maintenance4") != extensions.end());
programCollection.spirvAsmSources.add("compute")
<< m_shaderSpec.assembly.c_str()
- << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, m_shaderSpec.spirvVersion, allowSpirv14);
+ << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, m_shaderSpec.spirvVersion, allowSpirv14, allowMaintenance4);
}
TestInstance* SpvAsmComputeShaderCase::createInstance (Context& ctx) const