[PATCH vkd3d 1/5] vkd3d: Enable rasterization discard if possible.

Józef Kucia joseph.kucia at gmail.com
Thu Nov 15 09:32:37 CST 2018


From: Józef Kucia <jkucia at codeweavers.com>

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 libs/vkd3d/state.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index 3f3de4de29be..35b900016256 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -2235,6 +2235,8 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
     }
 
     rs_desc_from_d3d12(&graphics->rs_desc, &desc->RasterizerState);
+    if (!graphics->attachment_count && !(desc->PS.pShaderBytecode && desc->PS.BytecodeLength))
+        graphics->rs_desc.rasterizerDiscardEnable = VK_TRUE;
 
     graphics->ms_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
     graphics->ms_desc.pNext = NULL;
-- 
2.18.1




More information about the wine-devel mailing list