Set api base line to 1.1 when using slang and enable SPIRV 1.4
This commit is contained in:
parent
702066e8af
commit
f441a3e0b3
2 changed files with 12 additions and 1 deletions
|
|
@ -89,6 +89,15 @@ VkResult VulkanExampleBase::createInstance()
|
|||
}
|
||||
}
|
||||
|
||||
// Shaders generated by Slang require a certain SPIR-V environment that can't be satisfied by Vulkan 1.0, so we need to expliclity up that to at least 1.1 and enable some required extensions
|
||||
if (shaderDir == "slang") {
|
||||
if (apiVersion < VK_API_VERSION_1_1) {
|
||||
apiVersion = VK_API_VERSION_1_1;
|
||||
}
|
||||
enabledDeviceExtensions.push_back(VK_KHR_SPIRV_1_4_EXTENSION_NAME);
|
||||
enabledDeviceExtensions.push_back(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
VkApplicationInfo appInfo{};
|
||||
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
||||
appInfo.pApplicationName = name.c_str();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue