diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-22 10:50:50 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-22 10:50:50 +0000 |
commit | 9130ec005fbc78a62420643414d8354d0929ca50 (patch) | |
tree | 6762777acdd2d4eee17ef87290e80dc7afe2b73d /lib/mesa/src/gallium/auxiliary/util/u_dump_state.c | |
parent | ca11beabae33eb59fb981b8adf50b1d47a2a98f0 (diff) |
Merge Mesa 21.1.5
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/util/u_dump_state.c')
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/util/u_dump_state.c | 65 |
1 files changed, 36 insertions, 29 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/util/u_dump_state.c b/lib/mesa/src/gallium/auxiliary/util/u_dump_state.c index 422dc8675..a72b3722f 100644 --- a/lib/mesa/src/gallium/auxiliary/util/u_dump_state.c +++ b/lib/mesa/src/gallium/auxiliary/util/u_dump_state.c @@ -521,15 +521,11 @@ util_dump_depth_stencil_alpha_state(FILE *stream, const struct pipe_depth_stenci util_dump_struct_begin(stream, "pipe_depth_stencil_alpha_state"); - util_dump_member_begin(stream, "depth"); - util_dump_struct_begin(stream, "pipe_depth_state"); - util_dump_member(stream, bool, &state->depth, enabled); - if (state->depth.enabled) { - util_dump_member(stream, bool, &state->depth, writemask); - util_dump_member(stream, enum_func, &state->depth, func); + util_dump_member(stream, bool, state, depth_enabled); + if (state->depth_enabled) { + util_dump_member(stream, bool, state, depth_writemask); + util_dump_member(stream, enum_func, state, depth_func); } - util_dump_struct_end(stream); - util_dump_member_end(stream); util_dump_member_begin(stream, "stencil"); util_dump_array_begin(stream); @@ -554,15 +550,11 @@ util_dump_depth_stencil_alpha_state(FILE *stream, const struct pipe_depth_stenci util_dump_array_end(stream); util_dump_member_end(stream); - util_dump_member_begin(stream, "alpha"); - util_dump_struct_begin(stream, "pipe_alpha_state"); - util_dump_member(stream, bool, &state->alpha, enabled); - if (state->alpha.enabled) { - util_dump_member(stream, enum_func, &state->alpha, func); - util_dump_member(stream, float, &state->alpha, ref_value); + util_dump_member(stream, bool, state, alpha_enabled); + if (state->alpha_enabled) { + util_dump_member(stream, enum_func, state, alpha_func); + util_dump_member(stream, float, state, alpha_ref_value); } - util_dump_struct_end(stream); - util_dump_member_end(stream); util_dump_struct_end(stream); } @@ -603,6 +595,7 @@ util_dump_blend_state(FILE *stream, const struct pipe_blend_state *state) util_dump_member(stream, bool, state, dither); util_dump_member(stream, bool, state, alpha_to_coverage); util_dump_member(stream, bool, state, alpha_to_one); + util_dump_member(stream, uint, state, max_rt); util_dump_member(stream, bool, state, logicop_enable); if (state->logicop_enable) { @@ -613,7 +606,7 @@ util_dump_blend_state(FILE *stream, const struct pipe_blend_state *state) util_dump_member_begin(stream, "rt"); if (state->independent_blend_enable) - valid_entries = PIPE_MAX_COLOR_BUFS; + valid_entries = state->max_rt + 1; util_dump_struct_array(stream, rt_blend_state, state->rt, valid_entries); util_dump_member_end(stream); } @@ -916,8 +909,6 @@ util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state) util_dump_member(stream, uint, state, has_user_indices); util_dump_member(stream, enum_prim_mode, state, mode); - util_dump_member(stream, uint, state, start); - util_dump_member(stream, uint, state, count); util_dump_member(stream, uint, state, start_instance); util_dump_member(stream, uint, state, instance_count); @@ -940,19 +931,35 @@ util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state) else util_dump_member(stream, ptr, state, index.resource); } - util_dump_member(stream, ptr, state, count_from_stream_output); + util_dump_struct_end(stream); +} + +void +util_dump_draw_start_count(FILE *stream, const struct pipe_draw_start_count *state) +{ + util_dump_struct_begin(stream, "pipe_draw_start_count"); + util_dump_member(stream, uint, state, start); + util_dump_member(stream, uint, state, count); + util_dump_struct_end(stream); +} - if (!state->indirect) { - util_dump_member(stream, ptr, state, indirect); - } else { - util_dump_member(stream, uint, state, indirect->offset); - util_dump_member(stream, uint, state, indirect->stride); - util_dump_member(stream, uint, state, indirect->draw_count); - util_dump_member(stream, uint, state, indirect->indirect_draw_count_offset); - util_dump_member(stream, ptr, state, indirect->buffer); - util_dump_member(stream, ptr, state, indirect->indirect_draw_count); +void +util_dump_draw_indirect_info(FILE *stream, + const struct pipe_draw_indirect_info *state) +{ + if (!state) { + util_dump_null(stream); + return; } + util_dump_struct_begin(stream, "pipe_draw_indirect_info"); + util_dump_member(stream, uint, state, offset); + util_dump_member(stream, uint, state, stride); + util_dump_member(stream, uint, state, draw_count); + util_dump_member(stream, uint, state, indirect_draw_count_offset); + util_dump_member(stream, ptr, state, buffer); + util_dump_member(stream, ptr, state, indirect_draw_count); + util_dump_member(stream, ptr, state, count_from_stream_output); util_dump_struct_end(stream); } |