Robin Kertels : vkd3d: Ignore D3D12_SO_NO_RASTERIZED_STREAM when stream output is disabled.

Alexandre Julliard julliard at winehq.org
Mon Oct 11 15:36:42 CDT 2021


Module: vkd3d
Branch: master
Commit: 21725c5c083be7f9652f625040c4bb34f84fbaa5
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=21725c5c083be7f9652f625040c4bb34f84fbaa5

Author: Robin Kertels <robin.kertels at gmail.com>
Date:   Mon Oct 11 17:55:07 2021 +0200

vkd3d: Ignore D3D12_SO_NO_RASTERIZED_STREAM when stream output is disabled.

Fixes the black screen problem in Diablo 2: Resurrected.

Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d/state.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index 78b0c71..701af89 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -2034,7 +2034,8 @@ static void rs_stream_info_from_d3d12(VkPipelineRasterizationStateStreamCreateIn
         VkPipelineRasterizationStateCreateInfo *vk_rs_desc, const D3D12_STREAM_OUTPUT_DESC *so_desc,
         const struct vkd3d_vulkan_info *vk_info)
 {
-    if (!so_desc->RasterizedStream || so_desc->RasterizedStream == D3D12_SO_NO_RASTERIZED_STREAM)
+    if (!so_desc->NumEntries || !so_desc->RasterizedStream
+            || so_desc->RasterizedStream == D3D12_SO_NO_RASTERIZED_STREAM)
         return;
 
     if (!vk_info->rasterization_stream)
@@ -2811,7 +2812,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
     rs_desc_from_d3d12(&graphics->rs_desc, &desc->RasterizerState);
     have_attachment = graphics->rt_count || graphics->dsv_format || is_dsv_format_unknown;
     if ((!have_attachment && !(desc->PS.pShaderBytecode && desc->PS.BytecodeLength))
-            || so_desc->RasterizedStream == D3D12_SO_NO_RASTERIZED_STREAM)
+            || (graphics->xfb_enabled && so_desc->RasterizedStream == D3D12_SO_NO_RASTERIZED_STREAM))
         graphics->rs_desc.rasterizerDiscardEnable = VK_TRUE;
 
     rs_stream_info_from_d3d12(&graphics->rs_stream_info, &graphics->rs_desc, so_desc, vk_info);




More information about the wine-cvs mailing list