vkd3d-shader: Recognize enableMinimumPrecision global flag.

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:
Józef Kucia 2018-10-11 15:33:33 +02:00 committed by Alexandre Julliard
parent 869602cbea
commit 970aafaf55
3 changed files with 25 additions and 20 deletions

View File

@ -3468,7 +3468,7 @@ static void vkd3d_dxbc_compiler_emit_dcl_global_flags(struct vkd3d_dxbc_compiler
const struct vkd3d_shader_instruction *instruction)
{
if (instruction->flags & ~(VKD3DSGF_REFACTORING_ALLOWED | VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS))
FIXME("Unrecognized global flags %#x.\n", instruction->flags);
FIXME("Unhandled global flags %#x.\n", instruction->flags);
else
WARN("Unhandled global flags %#x.\n", instruction->flags);
}

View File

@ -398,26 +398,30 @@ static unsigned int shader_get_float_offset(enum vkd3d_shader_register_type regi
static void shader_dump_global_flags(struct vkd3d_string_buffer *buffer, DWORD global_flags)
{
if (global_flags & VKD3DSGF_REFACTORING_ALLOWED)
{
shader_addline(buffer, "refactoringAllowed");
global_flags &= ~VKD3DSGF_REFACTORING_ALLOWED;
if (global_flags)
shader_addline(buffer, " | ");
}
unsigned int i;
if (global_flags & VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL)
static const struct
{
shader_addline(buffer, "forceEarlyDepthStencil");
global_flags &= ~VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL;
if (global_flags)
shader_addline(buffer, " | ");
unsigned int flag;
const char *name;
}
if (global_flags & VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS)
global_flag_info[] =
{
shader_addline(buffer, "enableRawAndStructuredBuffers");
global_flags &= ~VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS;
{VKD3DSGF_REFACTORING_ALLOWED, "refactoringAllowed"},
{VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL, "forceEarlyDepthStencil"},
{VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS, "enableRawAndStructuredBuffers"},
{VKD3DSGF_ENABLE_MINIMUM_PRECISION, "enableMinimumPrecision"},
};
for (i = 0; i < ARRAY_SIZE(global_flag_info); ++i)
{
if (global_flags & global_flag_info[i].flag)
{
shader_addline(buffer, global_flag_info[i].name);
global_flags &= ~global_flag_info[i].flag;
if (global_flags)
shader_addline(buffer, " | ");
}
}
if (global_flags)

View File

@ -439,9 +439,10 @@ enum vkd3d_shader_interpolation_mode
enum vkd3d_shader_global_flags
{
VKD3DSGF_REFACTORING_ALLOWED = 0x1,
VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL = 0x4,
VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS = 0x8,
VKD3DSGF_REFACTORING_ALLOWED = 0x01,
VKD3DSGF_FORCE_EARLY_DEPTH_STENCIL = 0x04,
VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS = 0x08,
VKD3DSGF_ENABLE_MINIMUM_PRECISION = 0x20
};
enum vkd3d_shader_sync_flags