=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Allow depth rendering without pixel shader.
Alexandre Julliard
julliard at winehq.org
Thu Nov 15 16:42:52 CST 2018
Module: vkd3d
Branch: master
Commit: a39d2aa3a850b237bbc23ff0b870ce11297f99d4
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=a39d2aa3a850b237bbc23ff0b870ce11297f99d4
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Thu Nov 15 16:32:38 2018 +0100
vkd3d: Allow depth rendering without pixel shader.
Signed-off-by: Józef Kucia <jkucia 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 | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index 35b9000..bf4eee9 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -1893,6 +1893,17 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
HRESULT hr;
int ret;
+ static const DWORD default_ps_code[] =
+ {
+#if 0
+ ps_4_0
+ ret
+#endif
+ 0x43425844, 0x19cbf606, 0x18f562b9, 0xdaeed4db, 0xc324aa46, 0x00000001, 0x00000060, 0x00000003,
+ 0x0000002c, 0x0000003c, 0x0000004c, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
+ 0x00000008, 0x00000000, 0x00000008, 0x52444853, 0x0000000c, 0x00000040, 0x00000003, 0x0100003e,
+ };
+ static const D3D12_SHADER_BYTECODE default_ps = {default_ps_code, sizeof(default_ps_code)};
static const struct
{
enum VkShaderStageFlagBits stage;
@@ -1984,6 +1995,15 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
graphics->attachment_references[0].attachment = 0;
graphics->attachment_references[0].layout = depth_layout;
++graphics->rt_idx;
+
+ if (!desc->PS.pShaderBytecode)
+ {
+ if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count],
+ VK_SHADER_STAGE_FRAGMENT_BIT, &default_ps, NULL, NULL)))
+ goto fail;
+
+ ++graphics->stage_count;
+ }
}
for (i = 0; i < rt_count; ++i)
More information about the wine-cvs
mailing list