vkd3d-shader: Enable Float64 capability if flagged in DXBC.

Based on a vkd3d-proton patch by Joshua Ashton.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2021-07-10 01:31:35 +10:00 committed by Alexandre Julliard
parent 1a542a4bba
commit d027ac4c15
2 changed files with 9 additions and 1 deletions

View File

@ -5128,6 +5128,12 @@ static void vkd3d_dxbc_compiler_emit_dcl_global_flags(struct vkd3d_dxbc_compiler
flags &= ~VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL;
}
if (flags & (VKD3DSGF_ENABLE_DOUBLE_PRECISION_FLOAT_OPS | VKD3DSGF_ENABLE_11_1_DOUBLE_EXTENSIONS))
{
vkd3d_spirv_enable_capability(&compiler->spirv_builder, SpvCapabilityFloat64);
flags &= ~(VKD3DSGF_ENABLE_DOUBLE_PRECISION_FLOAT_OPS | VKD3DSGF_ENABLE_11_1_DOUBLE_EXTENSIONS);
}
if (flags & ~(VKD3DSGF_REFACTORING_ALLOWED | VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS))
FIXME("Unhandled global flags %#x.\n", flags);
else

View File

@ -486,10 +486,12 @@ enum vkd3d_shader_interpolation_mode
enum vkd3d_shader_global_flags
{
VKD3DSGF_REFACTORING_ALLOWED = 0x01,
VKD3DSGF_ENABLE_DOUBLE_PRECISION_FLOAT_OPS = 0x02,
VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL = 0x04,
VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS = 0x08,
VKD3DSGF_SKIP_OPTIMIZATION = 0x10,
VKD3DSGF_ENABLE_MINIMUM_PRECISION = 0x20
VKD3DSGF_ENABLE_MINIMUM_PRECISION = 0x20,
VKD3DSGF_ENABLE_11_1_DOUBLE_EXTENSIONS = 0x40,
};
enum vkd3d_shader_sync_flags