void util_dump_shader_state(FILE *stream, const struct pipe_shader_state *state) { unsigned i; if (!state) { util_dump_null(stream); return; } util_dump_struct_begin(stream, "pipe_shader_state"); if (state->type == PIPE_SHADER_IR_TGSI) { util_dump_member_begin(stream, "tokens"); fprintf(stream, "\"\n"); tgsi_dump_to_file(state->tokens, 0, stream); fprintf(stream, "\""); util_dump_member_end(stream); } if (state->stream_output.num_outputs) { util_dump_member_begin(stream, "stream_output"); util_dump_struct_begin(stream, "pipe_stream_output_info"); util_dump_member(stream, uint, &state->stream_output, num_outputs); util_dump_array(stream, uint, state->stream_output.stride, ARRAY_SIZE(state->stream_output.stride)); util_dump_array_begin(stream); for(i = 0; i < state->stream_output.num_outputs; ++i) { util_dump_elem_begin(stream); util_dump_struct_begin(stream, ""); /* anonymous */ util_dump_member(stream, uint, &state->stream_output.output[i], register_index); util_dump_member(stream, uint, &state->stream_output.output[i], start_component); util_dump_member(stream, uint, &state->stream_output.output[i], num_components); util_dump_member(stream, uint, &state->stream_output.output[i], output_buffer); util_dump_struct_end(stream); util_dump_elem_end(stream); } util_dump_array_end(stream); util_dump_struct_end(stream); util_dump_member_end(stream); } util_dump_struct_end(stream); }
void util_dump_shader_state(FILE *stream, const struct pipe_shader_state *state) { char str[8192]; unsigned i; if(!state) { util_dump_null(stream); return; } tgsi_dump_str(state->tokens, 0, str, sizeof(str)); util_dump_struct_begin(stream, "pipe_shader_state"); util_dump_member_begin(stream, "tokens"); util_dump_string(stream, str); util_dump_member_end(stream); util_dump_member_begin(stream, "stream_output"); util_dump_struct_begin(stream, "pipe_stream_output_info"); util_dump_member(stream, uint, &state->stream_output, num_outputs); util_dump_array(stream, uint, state->stream_output.stride, Elements(state->stream_output.stride)); util_dump_array_begin(stream); for(i = 0; i < state->stream_output.num_outputs; ++i) { util_dump_elem_begin(stream); util_dump_struct_begin(stream, ""); /* anonymous */ util_dump_member(stream, uint, &state->stream_output.output[i], register_index); util_dump_member(stream, uint, &state->stream_output.output[i], start_component); util_dump_member(stream, uint, &state->stream_output.output[i], num_components); util_dump_member(stream, uint, &state->stream_output.output[i], output_buffer); util_dump_struct_end(stream); util_dump_elem_end(stream); } util_dump_array_end(stream); util_dump_struct_end(stream); util_dump_member_end(stream); util_dump_struct_end(stream); }
void util_dump_template(FILE *stream, const struct pipe_resource *templat) { if(!templat) { util_dump_null(stream); return; } util_dump_struct_begin(stream, "pipe_resource"); util_dump_member(stream, int, templat, target); util_dump_member(stream, format, templat, format); util_dump_member_begin(stream, "width"); util_dump_uint(stream, templat->width0); util_dump_member_end(stream); util_dump_member_begin(stream, "height"); util_dump_uint(stream, templat->height0); util_dump_member_end(stream); util_dump_member_begin(stream, "depth"); util_dump_uint(stream, templat->depth0); util_dump_member_end(stream); util_dump_member_begin(stream, "array_size"); util_dump_uint(stream, templat->array_size); util_dump_member_end(stream); util_dump_member(stream, uint, templat, last_level); util_dump_member(stream, uint, templat, usage); util_dump_member(stream, uint, templat, bind); util_dump_member(stream, uint, templat, flags); util_dump_struct_end(stream); }
void util_dump_poly_stipple(FILE *stream, const struct pipe_poly_stipple *state) { if(!state) { util_dump_null(stream); return; } util_dump_struct_begin(stream, "pipe_poly_stipple"); util_dump_member_begin(stream, "stipple"); util_dump_member_array(stream, uint, state, stipple); util_dump_member_end(stream); util_dump_struct_end(stream); }
void util_dump_depth_stencil_alpha_state(FILE *stream, const struct pipe_depth_stencil_alpha_state *state) { unsigned i; if(!state) { util_dump_null(stream); return; } 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); }
void util_dump_clip_state(FILE *stream, const struct pipe_clip_state *state) { unsigned i; if(!state) { util_dump_null(stream); return; } util_dump_struct_begin(stream, "pipe_clip_state"); util_dump_member_begin(stream, "ucp"); util_dump_array_begin(stream); for(i = 0; i < PIPE_MAX_CLIP_PLANES; ++i) { util_dump_elem_begin(stream); util_dump_array(stream, float, state->ucp[i], 4); util_dump_elem_end(stream); } util_dump_array_end(stream); util_dump_member_end(stream); util_dump_struct_end(stream); }