mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Allow depth rendering without pixel shader.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fa0f6f584a
commit
a39d2aa3a8
@ -1893,6 +1893,17 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
int ret;
|
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
|
static const struct
|
||||||
{
|
{
|
||||||
enum VkShaderStageFlagBits stage;
|
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].attachment = 0;
|
||||||
graphics->attachment_references[0].layout = depth_layout;
|
graphics->attachment_references[0].layout = depth_layout;
|
||||||
++graphics->rt_idx;
|
++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)
|
for (i = 0; i < rt_count; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user