예제 #1
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(uint, templat, last_level);
   trace_dump_member(uint, templat, usage);
   trace_dump_member(uint, templat, bind);
   trace_dump_member(uint, templat, flags);

   trace_dump_struct_end();
}
예제 #2
0
void trace_dump_grid_info(const struct pipe_grid_info *state)
{
   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_grid_info");

   trace_dump_member(uint, state, pc);
   trace_dump_member(ptr, state, input);

   trace_dump_member_begin("block");
   trace_dump_array(uint, state->block, ARRAY_SIZE(state->block));
   trace_dump_member_end();

   trace_dump_member_begin("grid");
   trace_dump_array(uint, state->grid, ARRAY_SIZE(state->grid));
   trace_dump_member_end();

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

   trace_dump_struct_end();
}
예제 #3
0
void trace_dump_depth_stencil_alpha_state(const struct pipe_depth_stencil_alpha_state *state)
{
   unsigned i;

   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_depth_stencil_alpha_state");

   trace_dump_member_begin("depth");
   trace_dump_struct_begin("pipe_depth_state");
   trace_dump_member(bool, &state->depth, enabled);
   trace_dump_member(bool, &state->depth, writemask);
   trace_dump_member(uint, &state->depth, func);
   trace_dump_struct_end();
   trace_dump_member_end();

   trace_dump_member_begin("stencil");
   trace_dump_array_begin();
   for(i = 0; i < Elements(state->stencil); ++i) {
      trace_dump_elem_begin();
      trace_dump_struct_begin("pipe_stencil_state");
      trace_dump_member(bool, &state->stencil[i], enabled);
      trace_dump_member(uint, &state->stencil[i], func);
      trace_dump_member(uint, &state->stencil[i], fail_op);
      trace_dump_member(uint, &state->stencil[i], zpass_op);
      trace_dump_member(uint, &state->stencil[i], zfail_op);
      trace_dump_member(uint, &state->stencil[i], ref_value);
      trace_dump_member(uint, &state->stencil[i], valuemask);
      trace_dump_member(uint, &state->stencil[i], writemask);
      trace_dump_struct_end();
      trace_dump_elem_end();
   }
   trace_dump_array_end();
   trace_dump_member_end();

   trace_dump_member_begin("alpha");
   trace_dump_struct_begin("pipe_alpha_state");
   trace_dump_member(bool, &state->alpha, enabled);
   trace_dump_member(uint, &state->alpha, func);
   trace_dump_member(float, &state->alpha, ref_value);
   trace_dump_struct_end();
   trace_dump_member_end();

   trace_dump_struct_end();
}
예제 #4
0
void trace_dump_shader_state(const struct pipe_shader_state *state)
{
   unsigned i;

   if (!trace_dumping_enabled_locked())
      return;

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


   trace_dump_struct_begin("pipe_shader_state");

   trace_dump_member_begin("tokens");
   if (state->tokens) {
      static char str[64 * 1024];
      tgsi_dump_str(state->tokens, 0, str, sizeof(str));
      trace_dump_string(str);
   } else {
      trace_dump_null();
   }
   trace_dump_member_end();

   trace_dump_member_begin("stream_output");
   trace_dump_struct_begin("pipe_stream_output_info");
   trace_dump_member(uint, &state->stream_output, num_outputs);
   trace_dump_member_array(uint, &state->stream_output, stride);
   trace_dump_member_begin("output");
   trace_dump_array_begin();
   for(i = 0; i < state->stream_output.num_outputs; ++i) {
      trace_dump_elem_begin();
      trace_dump_struct_begin(""); /* anonymous */
      trace_dump_member(uint, &state->stream_output.output[i], register_index);
      trace_dump_member(uint, &state->stream_output.output[i], start_component);
      trace_dump_member(uint, &state->stream_output.output[i], num_components);
      trace_dump_member(uint, &state->stream_output.output[i], output_buffer);
      trace_dump_member(uint, &state->stream_output.output[i], dst_offset);
      trace_dump_member(uint, &state->stream_output.output[i], stream);
      trace_dump_struct_end();
      trace_dump_elem_end();
   }
   trace_dump_array_end();
   trace_dump_member_end(); // output
   trace_dump_struct_end();
   trace_dump_member_end(); // stream_output

   trace_dump_struct_end();
}
예제 #5
0
void trace_dump_blend_state(const struct pipe_blend_state *state)
{
   unsigned valid_entries = 1;

   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_blend_state");

   trace_dump_member(bool, state, dither);

   trace_dump_member(bool, state, logicop_enable);
   trace_dump_member(uint, state, logicop_func);

   trace_dump_member(bool, state, independent_blend_enable);

   trace_dump_member_begin("rt");
   if (state->independent_blend_enable)
      valid_entries = PIPE_MAX_COLOR_BUFS;
   trace_dump_struct_array(rt_blend_state, state->rt, valid_entries);
   trace_dump_member_end();

   trace_dump_struct_end();
}
예제 #6
0
void trace_dump_clip_state(const struct pipe_clip_state *state)
{
   unsigned i;

   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_clip_state");

   trace_dump_member_begin("ucp");
   trace_dump_array_begin();
   for(i = 0; i < PIPE_MAX_CLIP_PLANES; ++i) {
      trace_dump_elem_begin();
      trace_dump_array(float, state->ucp[i], 4);
      trace_dump_elem_end();
   }
   trace_dump_array_end();
   trace_dump_member_end();

   trace_dump_struct_end();
}
예제 #7
0
void trace_dump_compute_state(const struct pipe_compute_state *state)
{
   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_compute_state");

   trace_dump_member(uint, state, ir_type);

   trace_dump_member_begin("prog");
   if (state->prog && state->ir_type == PIPE_SHADER_IR_TGSI) {
      static char str[64 * 1024];
      tgsi_dump_str(state->prog, 0, str, sizeof(str));
      trace_dump_string(str);
   } else {
      trace_dump_null();
   }
   trace_dump_member_end();

   trace_dump_member(uint, state, req_local_mem);
   trace_dump_member(uint, state, req_private_mem);
   trace_dump_member(uint, state, req_input_mem);

   trace_dump_struct_end();
}
예제 #8
0
void trace_dump_transfer(const struct pipe_transfer *state)
{
   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_transfer");

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

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

   trace_dump_member(uint, state, nblocksx);
   trace_dump_member(uint, state, nblocksy);
   trace_dump_member(uint, state, stride);
   trace_dump_member(uint, state, usage);

   trace_dump_member(ptr, state, texture);
   trace_dump_member(uint, state, face);
   trace_dump_member(uint, state, level);
   trace_dump_member(uint, state, zslice);

   trace_dump_struct_end();
}
예제 #9
0
void trace_dump_sampler_view_template(const struct pipe_sampler_view *state,
                                      enum pipe_texture_target target)
{
   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_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, first_layer);
      trace_dump_member(uint, &state->u.tex, last_layer);
      trace_dump_member(uint, &state->u.tex, first_level);
      trace_dump_member(uint, &state->u.tex, last_level);
      trace_dump_struct_end(); /* anonymous */
      trace_dump_member_end(); /* tex */
   }
   trace_dump_struct_end(); /* anonymous */
   trace_dump_member_end(); /* u */

   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();
}
예제 #10
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();
}
예제 #11
0
void trace_dump_blit_info(const struct pipe_blit_info *info)
{
   char mask[7];

   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_blit_info");

   trace_dump_member_begin("dst");
   trace_dump_struct_begin("dst");
   trace_dump_member(resource_ptr, &info->dst, resource);
   trace_dump_member(uint, &info->dst, level);
   trace_dump_member(format, &info->dst, format);
   trace_dump_member_begin("box");
   trace_dump_box(&info->dst.box);
   trace_dump_member_end();
   trace_dump_struct_end();
   trace_dump_member_end();

   trace_dump_member_begin("src");
   trace_dump_struct_begin("src");
   trace_dump_member(resource_ptr, &info->src, resource);
   trace_dump_member(uint, &info->src, level);
   trace_dump_member(format, &info->src, format);
   trace_dump_member_begin("box");
   trace_dump_box(&info->src.box);
   trace_dump_member_end();
   trace_dump_struct_end();
   trace_dump_member_end();

   mask[0] = (info->mask & PIPE_MASK_R) ? 'R' : '-';
   mask[1] = (info->mask & PIPE_MASK_G) ? 'G' : '-';
   mask[2] = (info->mask & PIPE_MASK_B) ? 'B' : '-';
   mask[3] = (info->mask & PIPE_MASK_A) ? 'A' : '-';
   mask[4] = (info->mask & PIPE_MASK_Z) ? 'Z' : '-';
   mask[5] = (info->mask & PIPE_MASK_S) ? 'S' : '-';
   mask[6] = 0;

   trace_dump_member_begin("mask");
   trace_dump_string(mask);
   trace_dump_member_end();
   trace_dump_member(uint, info, filter);

   trace_dump_member(bool, info, scissor_enable);
   trace_dump_member_begin("scissor");
   trace_dump_scissor_state(&info->scissor);
   trace_dump_member_end();

   trace_dump_struct_end();
}
예제 #12
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();
}
예제 #13
0
void trace_dump_poly_stipple(const struct pipe_poly_stipple *state)
{
   if (!trace_dumping_enabled_locked())
      return;

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

   trace_dump_struct_begin("pipe_poly_stipple");

   trace_dump_member_begin("stipple");
   trace_dump_array(uint,
                    state->stipple,
                    Elements(state->stipple));
   trace_dump_member_end();

   trace_dump_struct_end();
}
예제 #14
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();
}