mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/sm4: Use a flat array to store source types.
This commit is contained in:
parent
e2aed38509
commit
4173158c8b
Notes:
Alexandre Julliard
2022-11-08 23:05:02 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/45
@ -109,7 +109,7 @@ struct vkd3d_sm4_opcode_info
|
||||
enum vkd3d_sm4_opcode opcode;
|
||||
enum vkd3d_shader_opcode handler_idx;
|
||||
const char *dst_info;
|
||||
const char *src_info;
|
||||
char src_info[SM4_MAX_SRC_COUNT];
|
||||
void (*read_opcode_func)(struct vkd3d_shader_instruction *ins, uint32_t opcode, uint32_t opcode_token,
|
||||
const uint32_t *tokens, unsigned int token_count, struct vkd3d_shader_sm4_parser *priv);
|
||||
};
|
||||
@ -1520,7 +1520,7 @@ static void shader_sm4_read_instruction(struct vkd3d_shader_parser *parser, stru
|
||||
ins->predicate = NULL;
|
||||
ins->dst_count = strlen(opcode_info->dst_info);
|
||||
ins->dst = sm4->dst_param;
|
||||
ins->src_count = strlen(opcode_info->src_info);
|
||||
ins->src_count = strnlen(opcode_info->src_info, SM4_MAX_SRC_COUNT);
|
||||
ins->src = sm4->src_param;
|
||||
assert(ins->dst_count <= ARRAY_SIZE(sm4->dst_param));
|
||||
assert(ins->src_count <= ARRAY_SIZE(sm4->src_param));
|
||||
|
Loading…
Reference in New Issue
Block a user