return context->resource_commit(context, resource, level, box, commit);
}
+static struct pipe_video_codec *
+trace_context_create_video_codec(struct pipe_context *_context,
+ const struct pipe_video_codec *templat)
+{
+ struct trace_context *tr_context = trace_context(_context);
+ struct pipe_context *context = tr_context->pipe;
+ struct pipe_video_codec *result;
+
+ trace_dump_call_begin("pipe_context", "create_video_codec");
+
+ trace_dump_arg(ptr, context);
+ trace_dump_arg(video_codec_template, templat);
+
+ result = context->create_video_codec(context, templat);
+
+ trace_dump_ret(ptr, result);
+ trace_dump_call_end();
+
+ return result;
+}
+
+static struct pipe_video_buffer *
+trace_context_create_video_buffer_with_modifiers(struct pipe_context *_context,
+ const struct pipe_video_buffer *templat,
+ const uint64_t *modifiers,
+ unsigned int modifiers_count)
+{
+ struct trace_context *tr_context = trace_context(_context);
+ struct pipe_context *context = tr_context->pipe;
+ struct pipe_video_buffer *result;
+
+ trace_dump_call_begin("pipe_screen", "create_video_buffer_with_modifiers");
+
+ trace_dump_arg(ptr, context);
+ trace_dump_arg(video_buffer_template, templat);
+ trace_dump_arg_array(uint, modifiers, modifiers_count);
+ trace_dump_arg(uint, modifiers_count);
+
+ result = context->create_video_buffer_with_modifiers(context, templat, modifiers, modifiers_count);
+
+ trace_dump_ret(ptr, result);
+ trace_dump_call_end();
+
+ return result;
+}
+
+static struct pipe_video_buffer *
+trace_context_create_video_buffer(struct pipe_context *_context,
+ const struct pipe_video_buffer *templat)
+{
+ struct trace_context *tr_context = trace_context(_context);
+ struct pipe_context *context = tr_context->pipe;
+ struct pipe_video_buffer *result;
+
+ trace_dump_call_begin("pipe_screen", "create_video_buffer");
+
+ trace_dump_arg(ptr, context);
+ trace_dump_arg(video_buffer_template, templat);
+
+ result = context->create_video_buffer(context, templat);
+
+ trace_dump_ret(ptr, result);
+ trace_dump_call_end();
+
+ return result;
+}
+
static void
trace_context_set_tess_state(struct pipe_context *_context,
const float default_outer_level[4],
TR_CTX_INIT(texture_barrier);
TR_CTX_INIT(memory_barrier);
TR_CTX_INIT(resource_commit);
+ TR_CTX_INIT(create_video_codec);
+ TR_CTX_INIT(create_video_buffer_with_modifiers);
+ TR_CTX_INIT(create_video_buffer);
TR_CTX_INIT(set_tess_state);
TR_CTX_INIT(set_patch_vertices);
TR_CTX_INIT(set_shader_buffers);
}
+void trace_dump_video_codec_template(const struct pipe_video_codec *templat)
+{
+ if (!trace_dumping_enabled_locked())
+ return;
+
+ if (!templat) {
+ trace_dump_null();
+ return;
+ }
+
+ trace_dump_struct_begin("pipe_video_codec");
+
+ trace_dump_member_enum(pipe_video_profile, templat, profile);
+ trace_dump_member(uint, templat, level);
+ trace_dump_member_enum(pipe_video_entrypoint, templat, entrypoint);
+ trace_dump_member(chroma_format, templat, chroma_format);
+ trace_dump_member(uint, templat, width);
+ trace_dump_member(uint, templat, height);
+ trace_dump_member(uint, templat, max_references);
+ trace_dump_member(bool, templat, expect_chunked_decode);
+
+ trace_dump_struct_end();
+}
+
+
+void trace_dump_video_buffer_template(const struct pipe_video_buffer *templat)
+{
+ if (!trace_dumping_enabled_locked())
+ return;
+
+ if (!templat) {
+ trace_dump_null();
+ return;
+ }
+
+ trace_dump_struct_begin("pipe_video_buffer");
+
+ trace_dump_member(format, templat, buffer_format);
+ trace_dump_member(uint, templat, width);
+ trace_dump_member(uint, templat, height);
+ trace_dump_member(bool, templat, interlaced);
+ trace_dump_member(uint, templat, bind);
+
+ trace_dump_struct_end();
+}
+
+
void trace_dump_box(const struct pipe_box *box)
{
if (!trace_dumping_enabled_locked())
return desc->short_name;
}
+static inline const char *
+util_chroma_format_name(enum pipe_video_chroma_format chroma_format)
+{
+ switch (chroma_format) {
+ case PIPE_VIDEO_CHROMA_FORMAT_400:
+ return "PIPE_VIDEO_CHROMA_FORMAT_400";
+ case PIPE_VIDEO_CHROMA_FORMAT_420:
+ return "PIPE_VIDEO_CHROMA_FORMAT_420";
+ case PIPE_VIDEO_CHROMA_FORMAT_422:
+ return "PIPE_VIDEO_CHROMA_FORMAT_422";
+ case PIPE_VIDEO_CHROMA_FORMAT_444:
+ return "PIPE_VIDEO_CHROMA_FORMAT_444";
+ case PIPE_VIDEO_CHROMA_FORMAT_NONE:
+ return "PIPE_VIDEO_CHROMA_FORMAT_NONE";
+ default:
+ return "PIPE_VIDEO_CHROMA_FORMAT_???";
+ }
+}
+
/**
* Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info.
*/