libs/vkd3d-shader: Introduce VKD3DSPR_INVALID.

Fixes clang warnings.

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-04-13 12:37:37 +02:00 committed by Alexandre Julliard
parent 7dd9420877
commit 83ce4553ea
2 changed files with 4 additions and 2 deletions

View File

@ -1378,8 +1378,8 @@ static BOOL shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr
token = *(*ptr)++;
register_type = (token & VKD3D_SM4_REGISTER_TYPE_MASK) >> VKD3D_SM4_REGISTER_TYPE_SHIFT;
if (register_type >= sizeof(register_type_table) / sizeof(*register_type_table)
|| register_type_table[register_type] == ~0u)
if (register_type >= ARRAY_SIZE(register_type_table)
|| register_type_table[register_type] == VKD3DSPR_INVALID)
{
FIXME("Unhandled register type %#x.\n", register_type);
param->type = VKD3DSPR_TEMP;

View File

@ -352,6 +352,8 @@ enum vkd3d_shader_register_type
VKD3DSPR_COVERAGE,
VKD3DSPR_SAMPLEMASK,
VKD3DSPR_GSINSTID,
VKD3DSPR_INVALID = ~0u,
};
enum vkd3d_shader_resource_type