mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +01:00
[dxvk] Validate tessellation state for graphics pipeline
This should help with freezes as long as Tessellation is not properly implemented.
This commit is contained in:
parent
8813ff979a
commit
e4dae74865
@ -807,6 +807,11 @@ namespace dxvk {
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(bindings.begin(), bindings.end(),
|
||||
[] (const DxvkVertexBinding& a, const DxvkVertexBinding& b) {
|
||||
return a.binding < b.binding;
|
||||
});
|
||||
|
||||
// Create the actual input layout object
|
||||
// if the application requests it.
|
||||
if (ppInputLayout != nullptr) {
|
||||
|
@ -50,6 +50,7 @@ namespace dxvk {
|
||||
DxvkInputAssemblyState iaState;
|
||||
iaState.primitiveTopology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
|
||||
iaState.primitiveRestart = VK_FALSE;
|
||||
iaState.patchVertexCount = 0;
|
||||
m_context->setInputAssemblyState(iaState);
|
||||
|
||||
m_context->setInputLayout(
|
||||
|
@ -247,6 +247,11 @@ 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) {
|
||||
|
@ -31,6 +31,7 @@ namespace dxvk::hud {
|
||||
DxvkInputAssemblyState iaState;
|
||||
iaState.primitiveTopology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
iaState.primitiveRestart = VK_FALSE;
|
||||
iaState.patchVertexCount = 0;
|
||||
context->setInputAssemblyState(iaState);
|
||||
|
||||
const std::array<DxvkVertexAttribute, 3> ilAttributes = {{
|
||||
|
Loading…
Reference in New Issue
Block a user