util_dump_enum(stream, util_dump_func(value, TRUE));
}
+static void
+util_dump_enum_prim_mode(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_prim_mode(value, TRUE));
+}
+
+static void
+util_dump_enum_tex_target(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_tex_target(value, TRUE));
+}
+
+static void
+util_dump_enum_tex_filter(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_tex_filter(value, TRUE));
+}
+
+static void
+util_dump_enum_tex_mipfilter(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_tex_mipfilter(value, TRUE));
+}
+
+static void
+util_dump_enum_tex_wrap(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_tex_wrap(value, TRUE));
+}
+
+static void
+util_dump_enum_stencil_op(FILE *stream, unsigned value)
+{
+ util_dump_enum(stream, util_dump_stencil_op(value, TRUE));
+}
+
/*
* Public functions
void
-util_dump_template(FILE *stream, const struct pipe_resource *templat)
+util_dump_resource(FILE *stream, const struct pipe_resource *state)
{
- if(!templat) {
+ if (!state) {
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(stream, enum_tex_target, state, target);
+ util_dump_member(stream, format, state, format);
- util_dump_member_begin(stream, "array_size");
- util_dump_uint(stream, templat->array_size);
- util_dump_member_end(stream);
+ util_dump_member(stream, uint, state, width0);
+ util_dump_member(stream, uint, state, height0);
+ util_dump_member(stream, uint, state, depth0);
+ util_dump_member(stream, uint, state, array_size);
- 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_member(stream, uint, state, last_level);
+ util_dump_member(stream, uint, state, nr_samples);
+ util_dump_member(stream, uint, state, usage);
+ util_dump_member(stream, uint, state, bind);
+ util_dump_member(stream, uint, state, flags);
util_dump_struct_end(stream);
}
util_dump_member(stream, uint, state, sprite_coord_enable);
util_dump_member(stream, bool, state, sprite_coord_mode);
util_dump_member(stream, bool, state, point_quad_rasterization);
+ util_dump_member(stream, bool, state, point_tri_clip);
util_dump_member(stream, bool, state, point_size_per_vertex);
util_dump_member(stream, bool, state, multisample);
util_dump_member(stream, bool, state, line_smooth);
util_dump_member(stream, bool, state, bottom_edge_rule);
util_dump_member(stream, bool, state, rasterizer_discard);
util_dump_member(stream, bool, state, depth_clip);
+ util_dump_member(stream, bool, state, clip_halfz);
util_dump_member(stream, uint, state, clip_plane_enable);
util_dump_member(stream, float, state, line_width);
fprintf(stream, "\"");
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);
+ 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,
+ 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_elem_end(stream);
+ util_dump_member_end(stream);
}
- util_dump_array_end(stream);
- util_dump_struct_end(stream);
- util_dump_member_end(stream);
util_dump_struct_end(stream);
}
util_dump_member(stream, bool, &state->stencil[i], enabled);
if (state->stencil[i].enabled) {
util_dump_member(stream, enum_func, &state->stencil[i], func);
- util_dump_member(stream, uint, &state->stencil[i], fail_op);
- util_dump_member(stream, uint, &state->stencil[i], zpass_op);
- util_dump_member(stream, uint, &state->stencil[i], zfail_op);
+ util_dump_member(stream, enum_stencil_op,
+ &state->stencil[i], fail_op);
+ util_dump_member(stream, enum_stencil_op,
+ &state->stencil[i], zpass_op);
+ util_dump_member(stream, enum_stencil_op,
+ &state->stencil[i], zfail_op);
util_dump_member(stream, uint, &state->stencil[i], valuemask);
util_dump_member(stream, uint, &state->stencil[i], writemask);
}
util_dump_struct_begin(stream, "pipe_blend_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, bool, state, logicop_enable);
if (state->logicop_enable) {
util_dump_struct_begin(stream, "pipe_sampler_state");
- util_dump_member(stream, uint, state, wrap_s);
- util_dump_member(stream, uint, state, wrap_t);
- util_dump_member(stream, uint, state, wrap_r);
- util_dump_member(stream, uint, state, min_img_filter);
- util_dump_member(stream, uint, state, min_mip_filter);
- util_dump_member(stream, uint, state, mag_img_filter);
+ util_dump_member(stream, enum_tex_wrap, state, wrap_s);
+ util_dump_member(stream, enum_tex_wrap, state, wrap_t);
+ util_dump_member(stream, enum_tex_wrap, state, wrap_r);
+ util_dump_member(stream, enum_tex_filter, state, min_img_filter);
+ util_dump_member(stream, enum_tex_mipfilter, state, min_mip_filter);
+ util_dump_member(stream, enum_tex_filter, state, mag_img_filter);
util_dump_member(stream, uint, state, compare_mode);
util_dump_member(stream, enum_func, state, compare_func);
util_dump_member(stream, bool, state, normalized_coords);
util_dump_member(stream, uint, state, max_anisotropy);
+ util_dump_member(stream, bool, state, seamless_cube_map);
util_dump_member(stream, float, state, lod_bias);
util_dump_member(stream, float, state, min_lod);
util_dump_member(stream, float, state, max_lod);
void
+util_dump_sampler_view(FILE *stream, const struct pipe_sampler_view *state)
+{
+ if (!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_sampler_view");
+
+ util_dump_member(stream, enum_tex_target, state, target);
+ util_dump_member(stream, format, state, format);
+ util_dump_member(stream, ptr, state, texture);
+
+ if (state->target == PIPE_BUFFER) {
+ util_dump_member(stream, uint, state, u.buf.first_element);
+ util_dump_member(stream, uint, state, u.buf.last_element);
+ }
+ else {
+ util_dump_member(stream, uint, state, u.tex.first_layer);
+ util_dump_member(stream, uint, state, u.tex.last_layer);
+ util_dump_member(stream, uint, state, u.tex.last_level);
+ util_dump_member(stream, uint, state, u.tex.last_level);
+ }
+
+ util_dump_member(stream, uint, state, swizzle_r);
+ util_dump_member(stream, uint, state, swizzle_g);
+ util_dump_member(stream, uint, state, swizzle_b);
+ util_dump_member(stream, uint, state, swizzle_a);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
util_dump_transfer(FILE *stream, const struct pipe_transfer *state)
{
if(!state) {
void
+util_dump_constant_buffer(FILE *stream,
+ const struct pipe_constant_buffer *state)
+{
+ if (!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_constant_buffer");
+
+ util_dump_member(stream, ptr, state, buffer);
+ util_dump_member(stream, uint, state, buffer_offset);
+ util_dump_member(stream, uint, state, buffer_size);
+ util_dump_member(stream, ptr, state, user_buffer);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
+util_dump_index_buffer(FILE *stream, const struct pipe_index_buffer *state)
+{
+ if (!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_index_buffer");
+
+ util_dump_member(stream, uint, state, index_size);
+ util_dump_member(stream, uint, state, offset);
+ util_dump_member(stream, ptr, state, buffer);
+ util_dump_member(stream, ptr, state, user_buffer);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
util_dump_vertex_buffer(FILE *stream, const struct pipe_vertex_buffer *state)
{
if(!state) {
util_dump_member(stream, uint, state, stride);
util_dump_member(stream, uint, state, buffer_offset);
util_dump_member(stream, ptr, state, buffer);
+ util_dump_member(stream, ptr, state, user_buffer);
util_dump_struct_end(stream);
}
void
+util_dump_stream_output_target(FILE *stream,
+ const struct pipe_stream_output_target *state)
+{
+ if (!state) {
+ util_dump_null(stream);
+ return;
+ }
+
+ util_dump_struct_begin(stream, "pipe_stream_output_target");
+
+ util_dump_member(stream, ptr, state, buffer);
+ util_dump_member(stream, uint, state, buffer_offset);
+ util_dump_member(stream, uint, state, buffer_size);
+
+ util_dump_struct_end(stream);
+}
+
+
+void
util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state)
{
if(!state) {
util_dump_member(stream, bool, state, indexed);
- util_dump_member(stream, uint, state, mode);
+ 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_begin(stream, "mask");
util_dump_string(stream, mask);
util_dump_member_end(stream);
- util_dump_member(stream, uint, info, filter);
+ util_dump_member(stream, enum_tex_filter, info, filter);
util_dump_member(stream, bool, info, scissor_enable);
util_dump_member_begin(stream, "scissor");
util_dump_scissor_state(stream, &info->scissor);
util_dump_member_end(stream);
+ util_dump_member(stream, bool, info, render_condition_enable);
+
util_dump_struct_end(stream);
}