示例#1
0
void trace_dump_surface_template(const struct pipe_surface *state,
                                 enum pipe_texture_target target)
{
   if (!trace_dumping_enabled_locked())
      return;

   if(!state) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_surface");

   trace_dump_member(format, state, format);
   trace_dump_member(uint, state, width);
   trace_dump_member(uint, state, height);

   trace_dump_member_begin("u");
   trace_dump_struct_begin(""); /* anonymous */
   if (target == PIPE_BUFFER) {
      trace_dump_member_begin("buf");
      trace_dump_struct_begin(""); /* anonymous */
      trace_dump_member(uint, &state->u.buf, first_element);
      trace_dump_member(uint, &state->u.buf, last_element);
      trace_dump_struct_end(); /* anonymous */
      trace_dump_member_end(); /* buf */
   } else {
      trace_dump_member_begin("tex");
      trace_dump_struct_begin(""); /* anonymous */
      trace_dump_member(uint, &state->u.tex, level);
      trace_dump_member(uint, &state->u.tex, first_layer);
      trace_dump_member(uint, &state->u.tex, last_layer);
      trace_dump_struct_end(); /* anonymous */
      trace_dump_member_end(); /* tex */
   }
   trace_dump_struct_end(); /* anonymous */
   trace_dump_member_end(); /* u */

   trace_dump_struct_end();
}
示例#2
0
void trace_dump_shader_state(const struct pipe_shader_state *state)
{
   static char str[8192];

   if (!trace_dumping_enabled_locked())
      return;

   if(!state) {
      trace_dump_null();
      return;
   }

   tgsi_dump_str(state->tokens, 0, str, sizeof(str));

   trace_dump_struct_begin("pipe_shader_state");

   trace_dump_member_begin("tokens");
   trace_dump_string(str);
   trace_dump_member_end();

   trace_dump_struct_end();
}
示例#3
0
void trace_dump_resource_template(const struct pipe_resource *templat)
{
   if (!trace_dumping_enabled_locked())
      return;

   if(!templat) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_resource");

   trace_dump_member(int, templat, target);
   trace_dump_member(format, templat, format);

   trace_dump_member_begin("width");
   trace_dump_uint(templat->width0);
   trace_dump_member_end();

   trace_dump_member_begin("height");
   trace_dump_uint(templat->height0);
   trace_dump_member_end();

   trace_dump_member_begin("depth");
   trace_dump_uint(templat->depth0);
   trace_dump_member_end();

   trace_dump_member_begin("array_size");
   trace_dump_uint(templat->array_size);
   trace_dump_member_end();

   trace_dump_member(uint, templat, last_level);
   trace_dump_member(uint, templat, nr_samples);
   trace_dump_member(uint, templat, usage);
   trace_dump_member(uint, templat, bind);
   trace_dump_member(uint, templat, flags);

   trace_dump_struct_end();
}
void trace_dump_sampler_view_template(const struct pipe_sampler_view *state)
{
   if (!trace_dumping_enabled_locked())
      return;

   if(!state) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_sampler_view");

   trace_dump_member(format, state, format);
   trace_dump_member(uint, state, first_level);
   trace_dump_member(uint, state, last_level);
   trace_dump_member(uint, state, swizzle_r);
   trace_dump_member(uint, state, swizzle_g);
   trace_dump_member(uint, state, swizzle_b);
   trace_dump_member(uint, state, swizzle_a);

   trace_dump_struct_end();
}
示例#5
0
void trace_dump_image_view(const struct pipe_image_view *state)
{
   if (!trace_dumping_enabled_locked())
      return;

   if(!state) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_image_view");
   trace_dump_member(resource_ptr, state, resource);
   trace_dump_member(uint, state, format);
   trace_dump_member(uint, state, access);

   trace_dump_member_begin("u");
   trace_dump_struct_begin(""); /* anonymous */
   if (state->resource->target == PIPE_BUFFER) {
      trace_dump_member_begin("buf");
      trace_dump_struct_begin(""); /* anonymous */
      trace_dump_member(uint, &state->u.buf, first_element);
      trace_dump_member(uint, &state->u.buf, last_element);
      trace_dump_struct_end(); /* anonymous */
      trace_dump_member_end(); /* buf */
   } else {
      trace_dump_member_begin("tex");
      trace_dump_struct_begin(""); /* anonymous */
      trace_dump_member(uint, &state->u.tex, first_layer);
      trace_dump_member(uint, &state->u.tex, last_layer);
      trace_dump_member(uint, &state->u.tex, level);
      trace_dump_struct_end(); /* anonymous */
      trace_dump_member_end(); /* tex */
   }
   trace_dump_struct_end(); /* anonymous */
   trace_dump_member_end(); /* u */

   trace_dump_struct_end();
}
示例#6
0
void trace_dump_draw_info(const struct pipe_draw_info *state)
{
   if (!trace_dumping_enabled_locked())
      return;

   if (!state) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_draw_info");

   trace_dump_member(bool, state, indexed);

   trace_dump_member(uint, state, mode);
   trace_dump_member(uint, state, start);
   trace_dump_member(uint, state, count);

   trace_dump_member(uint, state, start_instance);
   trace_dump_member(uint, state, instance_count);

   trace_dump_member(uint, state, vertices_per_patch);

   trace_dump_member(int,  state, index_bias);
   trace_dump_member(uint, state, min_index);
   trace_dump_member(uint, state, max_index);

   trace_dump_member(bool, state, primitive_restart);
   trace_dump_member(uint, state, restart_index);

   trace_dump_member(ptr, state, count_from_stream_output);

   trace_dump_member(ptr, state, indirect);
   trace_dump_member(uint, state, indirect_offset);

   trace_dump_struct_end();
}
示例#7
0
void trace_dump_template(const struct pipe_texture *templat)
{
   if (!trace_dumping_enabled_locked())
      return;

   if(!templat) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_texture");

   trace_dump_member(int, templat, target);
   trace_dump_member(format, templat, format);

   trace_dump_member_begin("width");
   trace_dump_array(uint, templat->width, 1);
   trace_dump_member_end();

   trace_dump_member_begin("height");
   trace_dump_array(uint, templat->height, 1);
   trace_dump_member_end();

   trace_dump_member_begin("depth");
   trace_dump_array(uint, templat->depth, 1);
   trace_dump_member_end();

   trace_dump_member_begin("block");
   trace_dump_block(&templat->block);
   trace_dump_member_end();

   trace_dump_member(uint, templat, last_level);
   trace_dump_member(uint, templat, tex_usage);

   trace_dump_struct_end();
}
示例#8
0
void
trace_dump_query_result(unsigned query_type,
                        const union pipe_query_result *result)
{
   if (!trace_dumping_enabled_locked())
      return;

   if (!result) {
      trace_dump_null();
      return;
   }

   switch (query_type) {
   case PIPE_QUERY_OCCLUSION_PREDICATE:
   case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
   case PIPE_QUERY_GPU_FINISHED:
      trace_dump_bool(result->b);
      break;

   case PIPE_QUERY_OCCLUSION_COUNTER:
   case PIPE_QUERY_TIMESTAMP:
   case PIPE_QUERY_TIME_ELAPSED:
   case PIPE_QUERY_PRIMITIVES_GENERATED:
   case PIPE_QUERY_PRIMITIVES_EMITTED:
      trace_dump_uint(result->u64);
      break;

   case PIPE_QUERY_SO_STATISTICS:
      trace_dump_struct_begin("pipe_query_data_so_statistics");
      trace_dump_member(uint, &result->so_statistics, num_primitives_written);
      trace_dump_member(uint, &result->so_statistics, primitives_storage_needed);
      trace_dump_struct_end();
      break;

   case PIPE_QUERY_TIMESTAMP_DISJOINT:
      trace_dump_struct_begin("pipe_query_data_timestamp_disjoint");
      trace_dump_member(uint, &result->timestamp_disjoint, frequency);
      trace_dump_member(bool, &result->timestamp_disjoint, disjoint);
      trace_dump_struct_end();
      break;

   case PIPE_QUERY_PIPELINE_STATISTICS:
      trace_dump_struct_begin("pipe_query_data_pipeline_statistics");
      trace_dump_member(uint, &result->pipeline_statistics, ia_vertices);
      trace_dump_member(uint, &result->pipeline_statistics, ia_primitives);
      trace_dump_member(uint, &result->pipeline_statistics, vs_invocations);
      trace_dump_member(uint, &result->pipeline_statistics, gs_invocations);
      trace_dump_member(uint, &result->pipeline_statistics, gs_primitives);
      trace_dump_member(uint, &result->pipeline_statistics, c_invocations);
      trace_dump_member(uint, &result->pipeline_statistics, c_primitives);
      trace_dump_member(uint, &result->pipeline_statistics, ps_invocations);
      trace_dump_member(uint, &result->pipeline_statistics, hs_invocations);
      trace_dump_member(uint, &result->pipeline_statistics, ds_invocations);
      trace_dump_member(uint, &result->pipeline_statistics, cs_invocations);
      trace_dump_struct_end();
      break;

   default:
      assert(query_type >= PIPE_QUERY_DRIVER_SPECIFIC);
      trace_dump_uint(result->u64);
      break;
   }
}
示例#9
0
void trace_dump_rasterizer_state(const struct pipe_rasterizer_state *state)
{
   if (!trace_dumping_enabled_locked())
      return;

   if(!state) {
      trace_dump_null();
      return;
   }

   trace_dump_struct_begin("pipe_rasterizer_state");

   trace_dump_member(bool, state, flatshade);
   trace_dump_member(bool, state, light_twoside);
   trace_dump_member(bool, state, clamp_vertex_color);
   trace_dump_member(bool, state, clamp_fragment_color);
   trace_dump_member(uint, state, front_ccw);
   trace_dump_member(uint, state, cull_face);
   trace_dump_member(uint, state, fill_front);
   trace_dump_member(uint, state, fill_back);
   trace_dump_member(bool, state, offset_point);
   trace_dump_member(bool, state, offset_line);
   trace_dump_member(bool, state, offset_tri);
   trace_dump_member(bool, state, scissor);
   trace_dump_member(bool, state, poly_smooth);
   trace_dump_member(bool, state, poly_stipple_enable);
   trace_dump_member(bool, state, point_smooth);
   trace_dump_member(bool, state, sprite_coord_mode);
   trace_dump_member(bool, state, point_quad_rasterization);
   trace_dump_member(bool, state, point_size_per_vertex);
   trace_dump_member(bool, state, multisample);
   trace_dump_member(bool, state, line_smooth);
   trace_dump_member(bool, state, line_stipple_enable);
   trace_dump_member(bool, state, line_last_pixel);

   trace_dump_member(bool, state, flatshade_first);

   trace_dump_member(bool, state, half_pixel_center);
   trace_dump_member(bool, state, bottom_edge_rule);

   trace_dump_member(bool, state, rasterizer_discard);

   trace_dump_member(bool, state, depth_clip);

   trace_dump_member(bool, state, clip_halfz);

   trace_dump_member(uint, state, clip_plane_enable);

   trace_dump_member(uint, state, line_stipple_factor);
   trace_dump_member(uint, state, line_stipple_pattern);

   trace_dump_member(uint, state, sprite_coord_enable);

   trace_dump_member(float, state, line_width);
   trace_dump_member(float, state, point_size);
   trace_dump_member(float, state, offset_units);
   trace_dump_member(float, state, offset_scale);
   trace_dump_member(float, state, offset_clamp);

   trace_dump_struct_end();
}