mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-06 13:54:14 +01:00
[dxvk] Move tess state validation to validatePipelineState
This commit is contained in:
parent
ec161823e5
commit
5c2144b55d
@ -248,11 +248,6 @@ namespace dxvk {
|
|||||||
if (tsInfo.patchControlPoints == 0)
|
if (tsInfo.patchControlPoints == 0)
|
||||||
info.pTessellationState = nullptr;
|
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;
|
VkPipeline pipeline = VK_NULL_HANDLE;
|
||||||
if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(),
|
if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(),
|
||||||
m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) {
|
m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) {
|
||||||
@ -289,6 +284,13 @@ namespace dxvk {
|
|||||||
return false;
|
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
|
// No errors
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user