vkd3d-shader/dxil: Pass the function emission state to sm6_parser_emit_br().

This commit is contained in:
Giovanni Mascellani
2025-12-02 15:05:07 +01:00
committed by Henri Verbeet
parent 83ebe58984
commit 2855f2d605
Notes: Henri Verbeet 2025-12-03 15:30:32 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1852

View File

@@ -4941,9 +4941,11 @@ static bool sm6_function_validate_block_index(const struct sm6_function *functio
return true; return true;
} }
static void sm6_parser_emit_br(struct sm6_parser *dxil, const struct dxil_record *record, static void sm6_parser_emit_br(struct sm6_parser *dxil, struct function_emission_state *state)
struct sm6_function *function, struct vkd3d_shader_instruction *ins)
{ {
struct vkd3d_shader_instruction *ins = state->ins;
const struct dxil_record *record = state->record;
struct sm6_function *function = state->function;
struct vkd3d_shader_src_param *src_params; struct vkd3d_shader_src_param *src_params;
const struct sm6_value *value; const struct sm6_value *value;
unsigned int i = 2; unsigned int i = 2;
@@ -8568,7 +8570,7 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6,
sm6_parser_emit_binop(sm6, &state); sm6_parser_emit_binop(sm6, &state);
break; break;
case FUNC_CODE_INST_BR: case FUNC_CODE_INST_BR:
sm6_parser_emit_br(sm6, record, function, ins); sm6_parser_emit_br(sm6, &state);
is_terminator = true; is_terminator = true;
break; break;
case FUNC_CODE_INST_CALL: case FUNC_CODE_INST_CALL: