1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-29 17:52:18 +01:00

[dxvk] Move tess state validation to validatePipelineState

This commit is contained in:
Philip Rebohle 2018-03-21 15:22:18 +01:00
parent ec161823e5
commit 5c2144b55d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -248,11 +248,6 @@ namespace dxvk {
if (tsInfo.patchControlPoints == 0)
info.pTessellationState = nullptr;
if ((tsInfo.patchControlPoints != 0) && (m_tcs == nullptr || m_tes == nullptr)) {
Logger::err("DxvkGraphicsPipeline: Cannot use tessellation patches without tessellation shaders");
return VK_NULL_HANDLE;
}
VkPipeline pipeline = VK_NULL_HANDLE;
if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(),
m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) {
@ -289,6 +284,13 @@ namespace dxvk {
return false;
}
// If there are no tessellation shaders, we
// obviously cannot use tessellation patches.
if ((state.iaPatchVertexCount != 0) && (m_tcs == nullptr || m_tes == nullptr)) {
Logger::err("DxvkGraphicsPipeline: Cannot use tessellation patches without tessellation shaders");
return false;
}
// No errors
return true;
}