vkd3d-shader: Replace VKD3DSIH_TABLE_SIZE with VKD3DSIH_INVALID.

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 2019-02-20 13:42:48 +01:00 committed by Alexandre Julliard
parent 70822141b7
commit 3fbbc68160
4 changed files with 10 additions and 9 deletions

View File

@ -545,7 +545,7 @@ static void shader_sm4_read_shader_data(struct vkd3d_shader_instruction *ins,
if (icb_size % 4 || icb_size > MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE)
{
FIXME("Unexpected immediate constant buffer size %u.\n", icb_size);
ins->handler_idx = VKD3DSIH_TABLE_SIZE;
ins->handler_idx = VKD3DSIH_INVALID;
return;
}
@ -1689,7 +1689,7 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha
if (!(opcode_info = get_opcode_info(opcode)))
{
FIXME("Unrecognized opcode %#x, opcode_token 0x%08x.\n", opcode, opcode_token);
ins->handler_idx = VKD3DSIH_TABLE_SIZE;
ins->handler_idx = VKD3DSIH_INVALID;
*ptr += len;
return;
}
@ -1733,7 +1733,7 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha
if (!(shader_sm4_read_dst_param(priv, &p, *ptr, map_data_type(opcode_info->dst_info[i]),
&priv->dst_param[i])))
{
ins->handler_idx = VKD3DSIH_TABLE_SIZE;
ins->handler_idx = VKD3DSIH_INVALID;
return;
}
priv->dst_param[i].modifiers |= instruction_dst_modifier;
@ -1744,7 +1744,7 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha
if (!(shader_sm4_read_src_param(priv, &p, *ptr, map_data_type(opcode_info->src_info[i]),
&priv->src_param[i])))
{
ins->handler_idx = VKD3DSIH_TABLE_SIZE;
ins->handler_idx = VKD3DSIH_INVALID;
return;
}
}
@ -1754,7 +1754,7 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha
fail:
*ptr = priv->end;
ins->handler_idx = VKD3DSIH_TABLE_SIZE;
ins->handler_idx = VKD3DSIH_INVALID;
return;
}

View File

@ -1602,7 +1602,7 @@ void vkd3d_shader_trace(void *data)
struct vkd3d_shader_instruction ins;
shader_sm4_read_instruction(data, &ptr, &ins);
if (ins.handler_idx == VKD3DSIH_TABLE_SIZE)
if (ins.handler_idx == VKD3DSIH_INVALID)
{
WARN("Skipping unrecognized instruction.\n");
shader_addline(&buffer, "<unrecognized instruction>\n");

View File

@ -175,7 +175,7 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
{
shader_sm4_read_instruction(parser.data, &parser.ptr, &instruction);
if (instruction.handler_idx == VKD3DSIH_TABLE_SIZE)
if (instruction.handler_idx == VKD3DSIH_INVALID)
{
WARN("Encountered unrecognized or invalid instruction.\n");
vkd3d_dxbc_compiler_destroy(spirv_compiler);
@ -305,7 +305,7 @@ int vkd3d_shader_scan_dxbc(const struct vkd3d_shader_code *dxbc,
{
shader_sm4_read_instruction(parser.data, &parser.ptr, &instruction);
if (instruction.handler_idx == VKD3DSIH_TABLE_SIZE)
if (instruction.handler_idx == VKD3DSIH_INVALID)
{
WARN("Encountered unrecognized or invalid instruction.\n");
vkd3d_shader_parser_destroy(&parser);

View File

@ -300,7 +300,8 @@ enum VKD3D_SHADER_INSTRUCTION_HANDLER
VKD3DSIH_USHR,
VKD3DSIH_UTOF,
VKD3DSIH_XOR,
VKD3DSIH_TABLE_SIZE
VKD3DSIH_INVALID,
};
enum vkd3d_shader_register_type